feat(user-center): task list go-to actions for free points

Add per-task CTAs (去签到 / 去完成 / 去看看) on the free points tasks list,
with sign-in proxying to the asset-card button and bbs actions gated
on forum availability.
This commit is contained in:
2026-07-16 22:11:52 +08:00
parent 17cb9b8542
commit a3585b0f96
3 changed files with 150 additions and 4 deletions
+23
View File
@@ -180,6 +180,28 @@
refresh();
}
// Task-list "去签到" → scroll + click the real asset-card sign-in button.
function initSigninGoto() {
document.querySelectorAll('[data-aksrt-signin-goto]').forEach(function (el) {
el.addEventListener('click', function (e) {
e.preventDefault();
var root = document.querySelector('[data-aksrt-signin]');
var btn = root ? root.querySelector('[data-signin-btn]') : null;
if (!btn) return;
try {
if (root && typeof root.scrollIntoView === 'function') {
root.scrollIntoView({ behavior: 'smooth', block: 'center' });
}
} catch (_) {}
if (!btn.disabled) {
btn.click();
} else {
btn.focus();
}
});
});
}
// ===== 邀请 =====
function initInvite() {
var root = document.querySelector('[data-aksrt-invite]');
@@ -944,6 +966,7 @@
function bootAssets() {
initSignin();
initSigninGoto();
initInvite();
initVipShop();
initVipPointsExchange();