557 lines
22 KiB
HTML
557 lines
22 KiB
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title id="page-title">神彩算 - 提现记录</title>
|
|
<script src="../public/css/layui/layui.js"></script>
|
|
<script src="../config.js"></script>
|
|
<script src="../utils/ApiClient.js"></script>
|
|
<script src="../utils/DateUtil.js"></script>
|
|
<script src="../utils/CommonUtil.js"></script>
|
|
<link rel="stylesheet" href="../public/css/layui/css/layui.css" />
|
|
<link rel="stylesheet" href="../public/css/public.css" />
|
|
<link rel="stylesheet" href="../public/css/publish.css" />
|
|
<link rel="stylesheet" href="../public/css/pagination.css" />
|
|
<link rel="stylesheet" href="../public/css/tixianlist.css" />
|
|
</head>
|
|
<body>
|
|
<nav class="topbar" id="navbar">
|
|
<div class="topbar__inner">
|
|
<a href="index.html" class="topbar__brand">
|
|
<img src="../images/home-logo.png" alt="神彩算" class="topbar__logo" />
|
|
</a>
|
|
<div class="topbar__nav" id="navLotteryItems"></div>
|
|
<div class="topbar__user">
|
|
<div id="notLoggedInBox" class="topbar__guest">
|
|
<a href="login.html" class="topbar__btn topbar__btn--ghost">登录</a>
|
|
<a href="reg.html" class="topbar__btn topbar__btn--primary">免费注册</a>
|
|
</div>
|
|
<div id="loggedInBox" class="topbar__logged tl-hidden">
|
|
<a href="usercenter.html" class="topbar__profile">
|
|
<img id="userAvatar" src="../public/img/userimg.png" alt="" class="topbar__avatar" />
|
|
<div class="topbar__meta">
|
|
<span id="userName" class="topbar__uname">用户</span>
|
|
<span id="userLevel" class="topbar__ubadge">会员</span>
|
|
</div>
|
|
</a>
|
|
<button class="topbar__btn topbar__btn--logout" onclick="logout()">退出登录</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<main class="cxz-main">
|
|
<div class="cxz-breadcrumb">
|
|
<a href="index.html">首页</a><span class="sep">></span>
|
|
<a href="usercenter.html">个人中心</a><span class="sep">></span>
|
|
<a href="tixian.html">提现</a><span class="sep">></span>
|
|
<span>提现记录</span>
|
|
</div>
|
|
|
|
<section class="tl-card">
|
|
<div class="tl-header">
|
|
<div>
|
|
<div class="tl-title">提现记录</div>
|
|
<div class="tl-desc">查看销售余额、专家余额的提现申请进度和收款方式。</div>
|
|
</div>
|
|
<a class="tl-back-link" href="tixian.html">返回提现</a>
|
|
</div>
|
|
|
|
<div class="tl-filter-bar">
|
|
<div class="tl-flow-tabs" id="walletFlowTabs"></div>
|
|
<div class="tl-filter-group">
|
|
<span>状态</span>
|
|
<div class="tl-segment" id="statusFilters"></div>
|
|
</div>
|
|
<div class="tl-filter-group">
|
|
<span>来源</span>
|
|
<div class="tl-segment" id="sourceFilters"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tl-summary">
|
|
<div class="tl-summary-item">
|
|
<span>记录总数</span>
|
|
<strong id="recordTotal">0</strong>
|
|
</div>
|
|
<div class="tl-summary-item">
|
|
<span>本页金额</span>
|
|
<strong id="pageAmount">0.00 元</strong>
|
|
</div>
|
|
<div class="tl-summary-item">
|
|
<span>当前筛选</span>
|
|
<strong id="filterSummary">全部状态 / 全部来源</strong>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tl-table-wrap">
|
|
<table class="tl-table" id="withdrawTable">
|
|
<thead>
|
|
<tr>
|
|
<th>申请单号</th>
|
|
<th>提现来源</th>
|
|
<th>提现方式</th>
|
|
<th>金额</th>
|
|
<th>收款账户</th>
|
|
<th>状态</th>
|
|
<th>申请时间</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
<div class="tl-empty" id="emptyState">
|
|
<div class="tl-empty-icon">¥</div>
|
|
<div class="tl-empty-title">暂无提现记录</div>
|
|
<div class="tl-empty-desc">当前筛选条件下还没有提现申请。</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tl-pagination cxz-pagination" id="withdrawPagination"></div>
|
|
</section>
|
|
</main>
|
|
|
|
<footer class="site-footer">
|
|
<div class="site-footer__inner">
|
|
<img src="../images/home-logo.png" alt="神彩算" class="site-footer__logo" />
|
|
<p id="copyright-info">神彩算以开奖数据、免费文章、资讯推荐为核心</p>
|
|
<div class="site-footer__meta">
|
|
<a id="beian" class="tl-beian-link" href="https://beian.miit.gov.cn/" target="_blank">工信部备案号</a>
|
|
<span id="additional-info">本站仅供数据分析参考</span>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
|
|
<button class="gotop" id="backTop" type="button" onclick="window.scrollTo({ top: 0, behavior: 'smooth' })">↑</button>
|
|
|
|
<script>
|
|
const $ = layui.$;
|
|
const statusOptions = [
|
|
{ value: "", label: "全部" },
|
|
{ value: "reviewing", label: "审核中" },
|
|
{ value: "success", label: "成功" },
|
|
{ value: "failed", label: "失败" },
|
|
{ value: "cancelled", label: "取消" },
|
|
];
|
|
const sourceOptions = [
|
|
{ value: "", label: "全部" },
|
|
{ value: "sales", label: "销售余额" },
|
|
{ value: "expert", label: "专家余额" },
|
|
];
|
|
const flowTypeOptions = [
|
|
{ value: "withdraw", label: "\u63d0\u73b0\u7533\u8bf7", desc: "\u63d0\u73b0\u5230\u6536\u6b3e\u8d26\u6237" },
|
|
{ value: "recharge", label: "\u8d26\u6237\u5145\u503c", desc: "\u8d26\u6237\u4f59\u989d\u5145\u503c" },
|
|
{ value: "purchase", label: "\u6587\u7ae0\u8d2d\u4e70", desc: "\u8d2d\u4e70\u6587\u7ae0\u652f\u51fa" },
|
|
{ value: "sales", label: "\u9080\u8bf7\u8fd4\u5229", desc: "\u5206\u9500\u8fd4\u5229\u6536\u5165" },
|
|
{ value: "expert", label: "\u4e13\u5bb6\u4f63\u91d1", desc: "\u4e13\u5bb6\u6536\u76ca\u6536\u5165" },
|
|
];
|
|
const flowTypeMap = flowTypeOptions.reduce(function (map, item) {
|
|
map[item.value] = item;
|
|
return map;
|
|
}, {});
|
|
const statusTextMap = {
|
|
0: "审核中",
|
|
1: "成功",
|
|
2: "失败",
|
|
3: "取消",
|
|
reviewing: "审核中",
|
|
success: "成功",
|
|
failed: "失败",
|
|
cancelled: "取消",
|
|
};
|
|
const statusClassMap = {
|
|
0: "reviewing",
|
|
1: "success",
|
|
2: "failed",
|
|
3: "cancelled",
|
|
reviewing: "reviewing",
|
|
success: "success",
|
|
failed: "failed",
|
|
cancelled: "cancelled",
|
|
};
|
|
const sourceTextMap = {
|
|
sales: "销售余额",
|
|
expert: "专家余额",
|
|
account: "\u8d26\u6237\u4f59\u989d",
|
|
balance: "\u8d26\u6237\u4f59\u989d",
|
|
};
|
|
const methodTextMap = {
|
|
alipay: "支付宝",
|
|
wechat: "微信收款码",
|
|
wechat_qr: "微信收款码",
|
|
bank: "银行卡",
|
|
bank_card: "银行卡",
|
|
};
|
|
const incomeFlowTypes = new Set(["recharge", "sales", "expert"]);
|
|
const outcomeFlowTypes = new Set(["withdraw", "purchase"]);
|
|
|
|
let currentPage = 1;
|
|
let pageSize = 10;
|
|
let totalRow = 0;
|
|
let currentStatus = "";
|
|
let currentSource = "";
|
|
let currentFlowType = "withdraw";
|
|
|
|
function logout() {
|
|
localStorage.removeItem("token");
|
|
window.location.reload();
|
|
}
|
|
|
|
function isSuccess(res) {
|
|
return ApiClient.isSuccess ? ApiClient.isSuccess(res) : res && (res.code === 0 || res.code === 200);
|
|
}
|
|
|
|
function pickData(res) {
|
|
return ApiClient.pickData ? ApiClient.pickData(res) : res && res.data;
|
|
}
|
|
|
|
function asArray(value) {
|
|
return ApiClient.asArray ? ApiClient.asArray(value) : Array.isArray(value) ? value : value ? [value] : [];
|
|
}
|
|
|
|
function escapeHtml(value) {
|
|
return String(value == null ? "" : value)
|
|
.replace(/&/g, "&")
|
|
.replace(/</g, "<")
|
|
.replace(/>/g, ">")
|
|
.replace(/"/g, """)
|
|
.replace(/'/g, "'");
|
|
}
|
|
|
|
function fieldValue(item, keys) {
|
|
for (let i = 0; i < keys.length; i += 1) {
|
|
const value = item && item[keys[i]];
|
|
if (value !== undefined && value !== null && value !== "") return value;
|
|
}
|
|
return "";
|
|
}
|
|
|
|
function money(value) {
|
|
const number = Number(value || 0);
|
|
return Number.isFinite(number) ? number.toFixed(2) : "0.00";
|
|
}
|
|
|
|
function checkLogin() {
|
|
const token = CommonUtil.getAuthToken ? CommonUtil.getAuthToken() : localStorage.getItem("token");
|
|
if (!token) {
|
|
window.location.href = "login.html";
|
|
return;
|
|
}
|
|
$("#notLoggedInBox").addClass("tl-hidden");
|
|
$("#loggedInBox").removeClass("tl-hidden");
|
|
CommonUtil.getCurrentUserDetail(
|
|
function (data) {
|
|
$("#userName").text(data.nickName || data.nickname || "用户");
|
|
$("#userLevel").text(data.isExpert === "1" ? "专家" : "会员");
|
|
if (data.avatar) $("#userAvatar").attr("src", data.avatar);
|
|
},
|
|
function () {
|
|
$("#notLoggedInBox").removeClass("tl-hidden");
|
|
$("#loggedInBox").addClass("tl-hidden");
|
|
},
|
|
);
|
|
}
|
|
|
|
function renderNav() {
|
|
ApiClient.get(ApiClient.API.homeNav).then(function (res) {
|
|
if (!isSuccess(res) || !res.data) return;
|
|
const $nav = $("#navLotteryItems").empty();
|
|
$.each(asArray(pickData(res)), function (_, item) {
|
|
if (item.type && item.type !== "lottery") return;
|
|
const code = item.code || item.suoxie || "";
|
|
if (!code) return;
|
|
$nav.append('<a href="cai.html?id=' + encodeURIComponent(code) + '" class="topbar__nav-link">' + escapeHtml(item.name || item.lotteryName || code) + "</a>");
|
|
});
|
|
});
|
|
}
|
|
|
|
function renderFilters() {
|
|
renderFlowTabs();
|
|
$(".tl-filter-group").toggle(currentFlowType === "withdraw");
|
|
renderSegment("#statusFilters", statusOptions, currentStatus, function (value) {
|
|
currentStatus = value;
|
|
currentPage = 1;
|
|
loadWalletFlowList();
|
|
});
|
|
renderSegment("#sourceFilters", sourceOptions, currentSource, function (value) {
|
|
currentSource = value;
|
|
currentPage = 1;
|
|
loadWalletFlowList();
|
|
});
|
|
updateFilterSummary();
|
|
}
|
|
|
|
function renderFlowTabs() {
|
|
const $wrap = $("#walletFlowTabs").empty();
|
|
$.each(flowTypeOptions, function (_, item) {
|
|
const $button = $('<button class="tl-flow-tab" type="button"></button>');
|
|
$button.attr("data-type", item.value);
|
|
$button.html("<span>" + escapeHtml(item.label) + "</span><em>" + escapeHtml(item.desc) + "</em>");
|
|
$button.toggleClass("active", item.value === currentFlowType);
|
|
$button.on("click", function () {
|
|
currentFlowType = item.value;
|
|
currentPage = 1;
|
|
currentStatus = "";
|
|
currentSource = "";
|
|
renderFilters();
|
|
loadWalletFlowList();
|
|
});
|
|
$wrap.append($button);
|
|
});
|
|
}
|
|
|
|
function renderSegment(selector, options, selectedValue, onChange) {
|
|
const $wrap = $(selector).empty();
|
|
$.each(options, function (_, item) {
|
|
const $button = $('<button class="tl-segment-btn" type="button"></button>');
|
|
$button.text(item.label);
|
|
$button.toggleClass("active", item.value === selectedValue);
|
|
$button.on("click", function () {
|
|
onChange(item.value);
|
|
renderFilters();
|
|
});
|
|
$wrap.append($button);
|
|
});
|
|
}
|
|
|
|
function updateFilterSummary() {
|
|
if (currentFlowType !== "withdraw") {
|
|
$("#filterSummary").text((flowTypeMap[currentFlowType] && flowTypeMap[currentFlowType].label) || "\u8d44\u91d1\u6d41\u6c34");
|
|
return;
|
|
}
|
|
const statusLabel = statusOptions.find((item) => item.value === currentStatus)?.label || "全部";
|
|
const sourceLabel = sourceOptions.find((item) => item.value === currentSource)?.label || "全部";
|
|
$("#filterSummary").text(statusLabel + "状态 / " + sourceLabel + "来源");
|
|
}
|
|
|
|
function getRecords(data, res) {
|
|
return asArray(data.records || data.rows || data.list || res.records || res.rows || res.list || data);
|
|
}
|
|
|
|
function getTotal(data, records, res) {
|
|
return Number(data.total || data.totalRow || data.totalCount || data.count || res.total || res.totalRow || res.totalCount || res.count || records.length || 0);
|
|
}
|
|
|
|
function getRecordNo(item) {
|
|
return fieldValue(item, ["withdrawNo", "orderNo", "flowNo", "serialNo", "tradeNo", "id"]) || "--";
|
|
}
|
|
|
|
function getAmount(item) {
|
|
return Number(fieldValue(item, ["amount", "withdrawAmount", "money", "applyAmount", "flowAmount"]) || 0);
|
|
}
|
|
|
|
function getStatus(item) {
|
|
return item.status ?? item.withdrawStatus ?? item.auditStatus ?? item.flowStatus ?? item.payStatus ?? "";
|
|
}
|
|
|
|
function getStatusText(item) {
|
|
const status = getStatus(item);
|
|
return fieldValue(item, ["statusText", "withdrawStatusText", "auditStatusText"]) || statusTextMap[status] || statusTextMap[String(status)] || "--";
|
|
}
|
|
|
|
function getStatusClass(item) {
|
|
const status = getStatus(item);
|
|
return statusClassMap[status] || statusClassMap[String(status)] || "normal";
|
|
}
|
|
|
|
function getSourceText(item) {
|
|
const source = fieldValue(item, ["sourceWallet", "walletType"]);
|
|
return fieldValue(item, ["sourceWalletText", "walletTypeText", "flowTypeText", "typeText"]) || sourceTextMap[source] || source || getFlowTypeText(item);
|
|
}
|
|
|
|
function getMethodText(item) {
|
|
const method = fieldValue(item, ["withdrawType", "receiveType", "paymentType"]);
|
|
return fieldValue(item, ["withdrawTypeText", "receiveTypeText", "paymentTypeText"]) || methodTextMap[method] || method || "--";
|
|
}
|
|
|
|
function getReceiveAccountText(item) {
|
|
const direct = fieldValue(item, ["receiveAccountText", "receiveAccount", "accountNo", "alipayAccount", "bankCardNo"]);
|
|
if (direct && typeof direct !== "object") return direct;
|
|
const receiveAccount = item.receiveAccountInfo || item.receiveAccountVO || (typeof item.receiveAccount === "object" ? item.receiveAccount : {}) || {};
|
|
const method = fieldValue(item, ["withdrawType", "receiveType"]);
|
|
if (method === "bank") {
|
|
return [receiveAccount.bankName, receiveAccount.bankCardNo].filter(Boolean).join(" ") || "--";
|
|
}
|
|
return fieldValue(receiveAccount, ["alipayAccount", "wechatAccount", "accountNo", "realName"]) || "--";
|
|
}
|
|
|
|
function getCreateTime(item) {
|
|
const time = fieldValue(item, ["createTime", "createdTime", "applyTime", "submitTime", "payTime", "updateTime"]);
|
|
return DateUtil.formatDateTimeToYMDHM(time) || time || "--";
|
|
}
|
|
|
|
function getFlowTypeText(item) {
|
|
const flowType = fieldValue(item, ["flowType", "type"]) || currentFlowType;
|
|
return fieldValue(item, ["flowTypeText", "typeText"]) || (flowTypeMap[flowType] && flowTypeMap[flowType].label) || flowType || "\u8d44\u91d1\u6d41\u6c34";
|
|
}
|
|
|
|
function getRecordSourceText(item) {
|
|
const source = fieldValue(item, ["withdrawType", "receiveType", "walletType", "paymentType", "sourceWallet"]);
|
|
return (
|
|
fieldValue(item, ["withdrawTypeText", "receiveTypeText", "walletTypeText", "paymentTypeText", "sourceWalletText", "remark", "description"]) ||
|
|
methodTextMap[source] ||
|
|
sourceTextMap[source] ||
|
|
source ||
|
|
"--"
|
|
);
|
|
}
|
|
|
|
function getDisplayAmount(item) {
|
|
const amount = getAmount(item);
|
|
const flowType = fieldValue(item, ["flowType", "type"]) || currentFlowType;
|
|
const isIncome = amount > 0 || (amount === Math.abs(amount) && incomeFlowTypes.has(flowType));
|
|
const isOutcome = amount < 0 || outcomeFlowTypes.has(flowType);
|
|
const sign = isIncome && !isOutcome ? "+" : isOutcome ? "-" : "";
|
|
return {
|
|
text: sign + money(Math.abs(amount)) + " \u5143",
|
|
className: isIncome && !isOutcome ? "income" : isOutcome ? "outcome" : "neutral",
|
|
};
|
|
}
|
|
|
|
function renderTableHeader() {
|
|
const $header = $("#withdrawTable thead tr").empty();
|
|
const columns =
|
|
currentFlowType === "withdraw"
|
|
? ["\u7533\u8bf7\u5355\u53f7", "\u63d0\u73b0\u6765\u6e90", "\u63d0\u73b0\u65b9\u5f0f", "\u91d1\u989d", "\u6536\u6b3e\u8d26\u6237", "\u72b6\u6001", "\u7533\u8bf7\u65f6\u95f4"]
|
|
: ["\u6d41\u6c34\u53f7", "\u7c7b\u578b", "\u91d1\u989d", "\u65b9\u5f0f/\u6765\u6e90", "\u72b6\u6001", "\u65f6\u95f4"];
|
|
$.each(columns, function (_, title) {
|
|
$header.append("<th>" + escapeHtml(title) + "</th>");
|
|
});
|
|
}
|
|
|
|
function isWithdrawRecordType() {
|
|
return currentFlowType === "withdraw";
|
|
}
|
|
|
|
function loadWalletFlowList() {
|
|
const params = {
|
|
pageNum: currentPage,
|
|
pageSize: pageSize,
|
|
};
|
|
if (isWithdrawRecordType()) {
|
|
if (currentStatus) params.status = currentStatus;
|
|
if (currentSource) params.sourceWallet = currentSource;
|
|
} else {
|
|
params.flowType = currentFlowType;
|
|
}
|
|
|
|
$("#withdrawTable").addClass("loading");
|
|
ApiClient.get(isWithdrawRecordType() ? ApiClient.API.walletWithdrawList : ApiClient.API.walletFlowList, params)
|
|
.then(function (res) {
|
|
if (!isSuccess(res)) throw new Error(res.msg || "获取记录失败");
|
|
const data = pickData(res) || res || {};
|
|
const records = getRecords(data, res);
|
|
totalRow = getTotal(data, records, res);
|
|
renderTable(records);
|
|
renderPagination();
|
|
})
|
|
.catch(function (err) {
|
|
layui.layer.msg(err.message || "获取记录失败", { icon: 2 });
|
|
totalRow = 0;
|
|
renderTable([]);
|
|
renderPagination();
|
|
})
|
|
.finally(function () {
|
|
$("#withdrawTable").removeClass("loading");
|
|
});
|
|
}
|
|
|
|
function renderTable(records) {
|
|
const $tbody = $("#withdrawTable tbody").empty();
|
|
let pageAmount = 0;
|
|
renderTableHeader();
|
|
if (!records.length) {
|
|
$("#withdrawTable").addClass("tl-table-hidden");
|
|
$("#emptyState").addClass("show");
|
|
$("#emptyState .tl-empty-title").text("\u6682\u65e0\u8bb0\u5f55");
|
|
$("#emptyState .tl-empty-desc").text(((flowTypeMap[currentFlowType] && flowTypeMap[currentFlowType].label) || "\u5f53\u524d\u7c7b\u578b") + "\u6682\u65e0\u8d44\u91d1\u6d41\u6c34");
|
|
$(".tl-summary").addClass("is-hidden");
|
|
} else {
|
|
$("#withdrawTable").removeClass("tl-table-hidden");
|
|
$("#emptyState").removeClass("show");
|
|
$(".tl-summary").removeClass("is-hidden");
|
|
}
|
|
|
|
$.each(records, function (_, item) {
|
|
const amount = getAmount(item);
|
|
pageAmount += Math.abs(amount);
|
|
const $row = $("<tr></tr>");
|
|
if (isWithdrawRecordType()) {
|
|
$row.html(
|
|
"<td>" + escapeHtml(getRecordNo(item)) + "</td>" +
|
|
"<td>" + escapeHtml(getSourceText(item)) + "</td>" +
|
|
"<td>" + escapeHtml(getMethodText(item)) + "</td>" +
|
|
'<td class="tl-amount outcome">-' + escapeHtml(money(Math.abs(amount))) + " \u5143</td>" +
|
|
"<td>" + escapeHtml(getReceiveAccountText(item)) + "</td>" +
|
|
'<td><span class="tl-status ' + getStatusClass(item) + '">' + escapeHtml(getStatusText(item)) + "</span></td>" +
|
|
"<td>" + escapeHtml(getCreateTime(item)) + "</td>",
|
|
);
|
|
} else {
|
|
const amountInfo = getDisplayAmount(item);
|
|
$row.html(
|
|
"<td>" + escapeHtml(getRecordNo(item)) + "</td>" +
|
|
"<td>" + escapeHtml(getFlowTypeText(item)) + "</td>" +
|
|
'<td class="tl-amount ' + amountInfo.className + '">' + escapeHtml(amountInfo.text) + "</td>" +
|
|
"<td>" + escapeHtml(getRecordSourceText(item)) + "</td>" +
|
|
'<td><span class="tl-status ' + getStatusClass(item) + '">' + escapeHtml(getStatusText(item)) + "</span></td>" +
|
|
"<td>" + escapeHtml(getCreateTime(item)) + "</td>",
|
|
);
|
|
}
|
|
$tbody.append($row);
|
|
});
|
|
|
|
$("#recordTotal").text(totalRow);
|
|
$("#pageAmount").text(money(pageAmount) + " 元");
|
|
updateFilterSummary();
|
|
}
|
|
|
|
function renderPagination() {
|
|
if (totalRow <= 0) {
|
|
$("#withdrawPagination").empty().addClass("is-hidden");
|
|
return;
|
|
}
|
|
$("#withdrawPagination").removeClass("is-hidden");
|
|
layui.use("laypage", function () {
|
|
layui.laypage.render({
|
|
elem: "withdrawPagination",
|
|
count: totalRow,
|
|
limit: pageSize,
|
|
curr: currentPage,
|
|
layout: ["prev", "page", "next"],
|
|
jump: function (obj, first) {
|
|
if (first) return;
|
|
currentPage = obj.curr;
|
|
loadWalletFlowList();
|
|
},
|
|
});
|
|
});
|
|
}
|
|
|
|
function initFromUrl() {
|
|
const query = new URLSearchParams(window.location.search);
|
|
const status = query.get("status") || "";
|
|
const sourceWallet = query.get("sourceWallet") || "";
|
|
const flowType = query.get("flowType") || "";
|
|
if (flowTypeMap[flowType]) currentFlowType = flowType;
|
|
if (statusOptions.some((item) => item.value === status)) currentStatus = status;
|
|
if (sourceOptions.some((item) => item.value === sourceWallet)) currentSource = sourceWallet;
|
|
}
|
|
|
|
$(window).on("scroll", function () {
|
|
$(window).scrollTop() > 320 ? $("#backTop").addClass("is-visible") : $("#backTop").removeClass("is-visible");
|
|
});
|
|
|
|
$(function () {
|
|
checkLogin();
|
|
renderNav();
|
|
initFromUrl();
|
|
renderFilters();
|
|
CommonUtil.loadPageConfig({ ads: false, links: false });
|
|
CommonUtil.requireAuth(function () {
|
|
loadWalletFlowList();
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|