This commit is contained in:
zhx 2026-06-18 18:24:24 +08:00
parent 6c4c0cd739
commit 591b316c16
20 changed files with 53 additions and 6 deletions

View File

@ -165,7 +165,10 @@
></span>
</div>
<div class="qualification-grid">
<article class="qualification-card">
<article
class="qualification-card"
id="agencyIdentityCard"
>
<p data-i18n="agencyOpening.agencyIdentity">
Agency Identity
</p>
@ -173,21 +176,29 @@
>Agency</strong
>
<img
class="status-icon"
src="./assets/status-check.png"
alt=""
/>
</article>
<article class="qualification-card">
<article
class="qualification-card"
id="hostCountCard"
>
<p data-i18n="agencyOpening.hostCount">
Host Count
</p>
<strong id="hostCountText">12 / 10+</strong>
<strong id="hostCountText">12 > 10</strong>
<img
class="status-icon"
src="./assets/status-check.png"
alt=""
/>
</article>
<article class="qualification-card">
<article
class="qualification-card"
id="openingStatusCard"
>
<p data-i18n="agencyOpening.openingStatus">
Opening Status
</p>
@ -195,6 +206,7 @@
>Not Joined</strong
>
<img
class="status-icon"
src="./assets/status-check.png"
alt=""
/>

View File

@ -120,6 +120,13 @@
['eligible', 'can_apply', 'canApply'],
true
);
var ineligibleReason = String(
firstValue(
data,
['ineligible_reason', 'ineligibleReason'],
''
) || ''
);
var hostCount =
Number(
firstValue(qualification, ['host_count', 'hostCount'], 12)
@ -170,6 +177,7 @@
? t('agencyOpening.joined', 'Joined')
: t('agencyOpening.notJoined', 'Not Joined')
),
ineligibleReason: ineligibleReason,
eligible: Boolean(eligible) && !joined,
},
rewards: Array.isArray(
@ -306,15 +314,31 @@
state = data || mockStatus();
timeOffsetMS = Date.now() - state.serverTimeMS;
countdownEndAt = state.endAt;
var identityQualified =
String(state.qualification.identity || '')
.toLowerCase()
.indexOf('agency') >= 0 &&
state.qualification.ineligibleReason !==
'active_agency_owner_required';
var hostQualified =
Number(state.qualification.hostCount || 0) >
Number(state.qualification.hostRequirement || 0);
var statusQualified =
!state.joined &&
String(state.qualification.openingStatus || '').toLowerCase() !==
'disabled';
document.getElementById('agencyIdentityText').textContent =
state.qualification.identity;
document.getElementById('hostCountText').textContent =
state.qualification.hostCount +
' / > ' +
' > ' +
state.qualification.hostRequirement;
document.getElementById('openingStatusText').textContent =
state.qualification.openingStatus;
setQualified('agencyIdentityCard', identityQualified);
setQualified('hostCountCard', hostQualified);
setQualified('openingStatusCard', statusQualified);
document.getElementById('eligibilityText').textContent = state
.qualification.eligible
? t('agencyOpening.eligible', 'Eligible To Apply')
@ -338,6 +362,12 @@
countdownTimer = window.setInterval(updateCountdown, 1000);
}
function setQualified(id, qualified) {
var node = document.getElementById(id);
if (!node) return;
node.classList.toggle('is-qualified', Boolean(qualified));
}
function showToast(message) {
if (window.HyAppToast && window.HyAppToast.show) {
window.HyAppToast.show(message);

View File

@ -456,16 +456,21 @@ button:focus-visible {
white-space: nowrap;
}
.qualification-card img {
.qualification-card .status-icon {
position: absolute;
right: -14px;
bottom: -12px;
display: none;
width: 70px;
height: 70px;
object-fit: contain;
pointer-events: none;
}
.qualification-card.is-qualified .status-icon {
display: block;
}
.apply-button {
position: absolute;
left: 217px;

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB