feat: redesign promotion earnings cards
This commit is contained in:
@@ -407,13 +407,6 @@
|
||||
if (navigator.clipboard && navigator.clipboard.writeText) navigator.clipboard.writeText(input.value).then(done).catch(function () { input.focus(); input.select(); setFeedback('复制失败,请手动复制。', true); });
|
||||
else { input.focus(); input.select(); try { document.execCommand('copy'); done(); } catch (e) { setFeedback('复制失败,请手动复制。', true); } }
|
||||
});
|
||||
var accountForm = root.querySelector('[data-affiliate-accounts]');
|
||||
if (accountForm) accountForm.addEventListener('submit', function (event) {
|
||||
event.preventDefault();
|
||||
var feedback = accountForm.querySelector('[data-affiliate-account-feedback]');
|
||||
var accounts = {}; new FormData(accountForm).forEach(function (value, key) { if (String(value).trim()) accounts[key] = String(value).trim(); });
|
||||
api('/promotion/payout-accounts', { method: 'PUT', body: JSON.stringify({ accounts: accounts }) }).then(function (r) { if (feedback) feedback.textContent = r.ok ? '收款方式已保存。' : ((r.json && r.json.message) || '保存失败。'); }).catch(function () { if (feedback) feedback.textContent = '网络错误,请稍后重试。'; });
|
||||
});
|
||||
}
|
||||
|
||||
window.AKSRTAffiliatePromotionInit = initAffiliatePromotion;
|
||||
|
||||
Reference in New Issue
Block a user