我的页:「兜豆兑好物」改「兜豆兑换」,兜豆余额右侧大号显示 v26101026

Co-Authored-By: AI 助手
This commit is contained in:
karlcarlo
2026-10-11 15:04:02 +00:00
parent b3f13468a9
commit 77296cd1c4
3 changed files with 22 additions and 4 deletions

View File

@@ -3,7 +3,7 @@
(function () {
'use strict';
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
var VER = '26101025';
var VER = '26101026';
const $ = (s, c) => (c || document).querySelector(s);
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
@@ -5507,6 +5507,15 @@
if (!sum.balance) setExchSub('攒兜豆,好物免费兑');
else if (!d) setExchSub('兜豆 ' + sum.balance);
else setExchSub('兜豆 ' + sum.balance + (n ? ' · 可兑 ' + n + ' 件' : ' · 再攒攒就能兑'));
/* 「我的」页:余额放右侧大号数字(2026-10-11 用户),副标题只说能兑几件 */
const bal = $('#meDouBal');
if (bal) {
$('#meDouN').textContent = String(sum.balance).replace(/\B(?=(\d{3})+$)/g, ',');
bal.classList.remove('hide');
const go = $('#meExchGo'); if (go) go.classList.add('hide');
const sub = $('#meExchSub');
if (sub) sub.textContent = !sum.balance ? '做孕期任务就能攒兜豆' : !d ? '去看看能兑什么' : n ? '现在可兑 ' + n + ' 件好物' : '再攒攒就能兑好物';
}
});
}).catch(function () {});
}