fix: use wallet action link in bd center

This commit is contained in:
170-carry 2026-04-29 00:18:03 +08:00
parent cbddbdb701
commit 4272a521e7
3 changed files with 21 additions and 3 deletions

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
<title>BD Center</title>
<link rel="stylesheet" href="./style.css?v=20260429-0150" />
<link rel="stylesheet" href="./style.css?v=20260429-0205" />
</head>
<body>
<div class="bd-center" aria-label="BD Center" data-i18n-aria="page_label" data-loading="true">
@ -55,7 +55,7 @@
<div>
<div class="salary-label" data-i18n="my_available_salary">Salary</div>
</div>
<button class="text-link" type="button" data-route="/hyapp/withdraw-exchange/index.html?identity=BD&salaryType=BD_SALARY" data-i18n="details">Withdraw/Exchange</button>
<a class="text-link" href="../withdraw-exchange/index.html?identity=BD&salaryType=BD_SALARY&mode=withdraw" data-wallet-action-link data-i18n="details">Withdraw/Exchange</a>
</div>
<div class="salary-value">
<span aria-hidden="true">$</span>
@ -126,6 +126,6 @@
<div class="toast" id="toast" role="status" aria-live="polite" hidden></div>
</div>
<script src="./script.js?v=20260429-0150" defer></script>
<script src="./script.js?v=20260429-0205" defer></script>
</body>
</html>

View File

@ -944,6 +944,21 @@
window.location.href = buildRouteURL(route);
}
function syncWalletActionLink() {
const nextParams = new URLSearchParams();
const token = readRawParam("token");
if (token) nextParams.set("token", token);
if (currentLang) nextParams.set("lang", currentLang);
nextParams.set("identity", "BD");
nextParams.set("salaryType", "BD_SALARY");
nextParams.set("mode", "withdraw");
const query = nextParams.toString();
document.querySelectorAll("[data-wallet-action-link]").forEach((link) => {
link.setAttribute("href", `../withdraw-exchange/index.html${query ? `?${query}` : ""}`);
});
}
function closePage() {
try {
if (window.app && typeof window.app.closePage === "function") {
@ -997,6 +1012,7 @@
renderBill();
renderTeamListCard();
renderInviteModal();
syncWalletActionLink();
}
function clearPayee() {
@ -1055,6 +1071,7 @@
clearPayee();
setIdentity();
bindEvents();
syncWalletActionLink();
renderProfile();
renderBalance();

View File

@ -372,6 +372,7 @@ button {
color: #10bcb0;
font-size: 13px;
font-weight: 900;
text-decoration: none;
}
.salary-value {