fix h5 center display text
This commit is contained in:
parent
805cd8c991
commit
d1a2220183
@ -380,7 +380,7 @@
|
||||
"agency_center.host_list": "Host List",
|
||||
"agency_center.salary_bills": "Salary Bills",
|
||||
"agency_center.agency_policy": "Agency Policy",
|
||||
"agency_center.invite_host": "How to invite host",
|
||||
"agency_center.invite_host": "Invite Host",
|
||||
"agency_center.close": "Close",
|
||||
"agency_center.daily_data": "Daily data",
|
||||
"agency_center.gift_points": "Gift points",
|
||||
|
||||
@ -347,7 +347,7 @@
|
||||
"agency_center.host_list": "Host List",
|
||||
"agency_center.salary_bills": "Salary Bills",
|
||||
"agency_center.agency_policy": "Agency Policy",
|
||||
"agency_center.invite_host": "How to invite host",
|
||||
"agency_center.invite_host": "Invite Host",
|
||||
"agency_center.close": "关闭",
|
||||
"agency_center.daily_data": "Daily data",
|
||||
"agency_center.gift_points": "Gift points",
|
||||
|
||||
@ -197,7 +197,7 @@
|
||||
<span
|
||||
class="menu-label"
|
||||
data-i18n="agency_center.invite_host"
|
||||
>How to invite host</span
|
||||
>Invite Host</span
|
||||
>
|
||||
<span class="chevron" aria-hidden="true">›</span>
|
||||
</button>
|
||||
@ -299,12 +299,7 @@
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="sheet-modal"
|
||||
id="policyModal"
|
||||
hidden
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div class="sheet-modal" id="policyModal" hidden aria-hidden="true">
|
||||
<button
|
||||
class="modal-backdrop"
|
||||
type="button"
|
||||
@ -340,11 +335,7 @@
|
||||
<strong id="policyName">Current policy</strong>
|
||||
<span id="policyMeta"></span>
|
||||
</div>
|
||||
<div
|
||||
class="policy-empty"
|
||||
id="policyEmpty"
|
||||
hidden
|
||||
></div>
|
||||
<div class="policy-empty" id="policyEmpty" hidden></div>
|
||||
<div
|
||||
class="policy-level-list"
|
||||
id="policyLevelList"
|
||||
|
||||
@ -222,15 +222,14 @@
|
||||
function normalizeInvitationMessage(item) {
|
||||
var invitation = (item && item.invitation) || item || {};
|
||||
var inviter = (item && item.inviter) || {};
|
||||
var id = String(invitation.invitation_id || invitation.invitationId || '');
|
||||
var id = String(
|
||||
invitation.invitation_id || invitation.invitationId || ''
|
||||
);
|
||||
var type = firstValue(invitation, [
|
||||
'invitation_type',
|
||||
'invitationType',
|
||||
]);
|
||||
var agencyName = firstValue(invitation, [
|
||||
'agency_name',
|
||||
'agencyName',
|
||||
]);
|
||||
var agencyName = firstValue(invitation, ['agency_name', 'agencyName']);
|
||||
var inviterName =
|
||||
firstValue(inviter, ['username', 'name', 'display_user_id']) ||
|
||||
firstValue(invitation, ['inviter_user_id', 'inviterUserId']) ||
|
||||
@ -255,7 +254,10 @@
|
||||
'{name} invited you to join {agency}'
|
||||
)
|
||||
.replace('{name}', inviterName)
|
||||
.replace('{agency}', agencyName || t('host_center.agency', 'Agency'));
|
||||
.replace(
|
||||
'{agency}',
|
||||
agencyName || t('host_center.agency', 'Agency')
|
||||
);
|
||||
}
|
||||
if (type === 'agency') {
|
||||
return t(
|
||||
@ -263,7 +265,10 @@
|
||||
'{name} invited you to create agency {agency}'
|
||||
)
|
||||
.replace('{name}', inviterName)
|
||||
.replace('{agency}', agencyName || t('host_center.agency', 'Agency'));
|
||||
.replace(
|
||||
'{agency}',
|
||||
agencyName || t('host_center.agency', 'Agency')
|
||||
);
|
||||
}
|
||||
if (type === 'bd') {
|
||||
return t(
|
||||
@ -448,7 +453,10 @@
|
||||
setSkeleton(
|
||||
$('incomeFoot'),
|
||||
loading,
|
||||
t('host_center.salary_month_note', '{month} settlement · {currency}')
|
||||
t(
|
||||
'host_center.salary_month_note',
|
||||
'{month} settlement · {currency}'
|
||||
)
|
||||
.replace('{month}', salaryMonthLabel(salary))
|
||||
.replace('{currency}', salaryCurrencyLabel(salary))
|
||||
);
|
||||
@ -540,7 +548,10 @@
|
||||
if (container) {
|
||||
container.scrollTop =
|
||||
row.offsetTop -
|
||||
Math.max(0, (container.clientHeight - row.offsetHeight) / 2);
|
||||
Math.max(
|
||||
0,
|
||||
(container.clientHeight - row.offsetHeight) / 2
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -626,16 +637,15 @@
|
||||
'Host salary',
|
||||
policyAmount(level.host_salary_usd_minor)
|
||||
);
|
||||
appendPolicyCell(
|
||||
grid,
|
||||
'Host coin reward',
|
||||
integer(level.host_coin_reward)
|
||||
);
|
||||
appendPolicyCell(
|
||||
grid,
|
||||
'Agency salary',
|
||||
policyAmount(level.agency_salary_usd_minor)
|
||||
);
|
||||
var hostCoinReward = toNumber(level.host_coin_reward);
|
||||
// Host 端只展示主播能直接获得的有效奖励;为 0 或缺失时隐藏,避免把无收益项误读成待完成权益。
|
||||
if (hostCoinReward > 0) {
|
||||
appendPolicyCell(
|
||||
grid,
|
||||
'Host coin reward',
|
||||
integer(hostCoinReward)
|
||||
);
|
||||
}
|
||||
row.appendChild(head);
|
||||
row.appendChild(grid);
|
||||
list.appendChild(row);
|
||||
@ -1161,17 +1171,21 @@
|
||||
openWithdrawExchange
|
||||
);
|
||||
|
||||
document.querySelectorAll('[data-action="policy"]').forEach(function (button) {
|
||||
button.addEventListener('click', openPolicy);
|
||||
});
|
||||
document
|
||||
.querySelectorAll('[data-action="policy"]')
|
||||
.forEach(function (button) {
|
||||
button.addEventListener('click', openPolicy);
|
||||
});
|
||||
document
|
||||
.querySelectorAll('[data-action="messages"]')
|
||||
.forEach(function (button) {
|
||||
button.addEventListener('click', openMessages);
|
||||
});
|
||||
document.querySelectorAll('[data-close-policy]').forEach(function (button) {
|
||||
button.addEventListener('click', closePolicy);
|
||||
});
|
||||
document
|
||||
.querySelectorAll('[data-close-policy]')
|
||||
.forEach(function (button) {
|
||||
button.addEventListener('click', closePolicy);
|
||||
});
|
||||
$('messageBackdrop').addEventListener('click', closeMessages);
|
||||
$('messageCloseButton').addEventListener('click', closeMessages);
|
||||
document.addEventListener('keydown', function (event) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user