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:
1 parent
17cb9b8542
commit
a3585b0f96
3 files changed
+150
-4
No files matched your search
@@ -965,4 +965,24 @@ body.uc-modal-open {
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
}
|
||||
.uc-points-tasks__meta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
gap: 2px;
|
||||
}
|
||||
.uc-points-tasks__action {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
color: var(--muted-color, #8b9198);
|
||||
background: none;
|
||||
border: 0;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.uc-points-tasks__action:hover {
|
||||
color: var(--focus-color, #f04494);
|
||||
}
|
||||
.focus-color { color: var(--focus-color, #f59e0b); }
|
||||
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user