docs: annotate funds, backups and loading states

This commit is contained in:
cieanyau committed 2026-11-06 00:37:46 +08:00
1 parent 179c6febf0
commit 74e94730e0
8 files changed
+24

No files matched your search

+5
View File
@@ -1,4 +1,5 @@
<script>
// 提现表单共用余额与推荐奖励两个场景,规则、手续费和可提现余额均按场景校验。
import "~/assets/styles/WithdrawDialog.ks0wdKEK.css";
import { toDisplayString } from "vue";
import { useId } from "vue";
@@ -49,6 +50,7 @@ function w(e, t = ``) {
? C(e)
: e?.status === 1 || e?.status === `1` || e?.status === !0;
}
// 金额最多两位小数,先转为安全整数“分”,避免用浮点金额直接比较限额。
function T(e) {
if (typeof e != `string` && typeof e != `number`) return null;
let t = String(e).trim();
@@ -57,6 +59,7 @@ function T(e) {
i = Number(n) * 100 + Number(r.padEnd(2, `0`));
return Number.isSafeInteger(i) ? i : null;
}
// 百分比允许六位小数,用 BigInt 计算手续费并向下取整到分。
function E(e, t) {
let n = String(t ?? ``).trim();
if (!/^\d+(?:\.\d{1,6})?$/.test(n) || Number(n) > 100) return null;
@@ -221,6 +224,7 @@ var ce = {
notes: ``,
});
}
// 加载可用渠道及规则;奖励场景额外读取奖励专属限额和手续费,代次隔离旧响应。
async function $() {
if (!G || !x.value || V.value) return;
let e = ++W,
@@ -292,6 +296,7 @@ var ce = {
G && e === W && (V.value = !1);
}
}
// 提交前重新校验渠道、金额区间、可用余额和收款账号,只发送当前渠道需要的字段。
async function Oe() {
if (!G || !x.value || H.value || V.value || !Q(B.value)) return;
let e = B.value;