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