From 322651e50718a708531412fba9f43c0137c4f957 Mon Sep 17 00:00:00 2001
From: whitechiina <1293616053@qq.com>
Date: Wed, 29 Apr 2026 13:59:31 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=80=E4=BF=AE=E6=94=B9bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/assets.js | 444 +++++++++++++++--
components/asset-confirm-popup.vue | 24 +-
components/wallet-action-popup.vue | 3 +-
manifest.json | 2 +-
pages/assets/bmt-exchange.vue | 38 +-
pages/assets/ledger.vue | 160 ++++++-
pages/assets/points-convert-list.vue | 267 ++++++++++-
pages/assets/transfer.vue | 27 +-
pages/assets/wallet.vue | 446 ++++++++++++++++--
pages/assets/withdraw.vue | 15 +-
pages/index/index.vue | 419 +++++++++++++---
unpackage/dist/build/web/index.html | 2 -
.../build/web/static/fonts/din-bold-2.ttf | Bin 26592 -> 0 bytes
.../dist/build/web/static/index.883130ca.css | 1 -
.../web/static/js/chunk-vendors.98a0fd8f.js | 7 -
.../build/web/static/js/index.fa34fa02.js | 1 -
.../js/pages-assets-bmt-exchange.cdefe888.js | 1 -
...-assets-points-conver~d5b52e90.81b7da6f.js | 3 -
...es-assets-wallet~page~56b97807.3e916418.js | 1 -
.../static/js/pages-assets-ledger.78e8403b.js | 1 -
...s-assets-points-convert-detail.549ecbfe.js | 1 -
...ges-assets-points-convert-list.ced2d19e.js | 1 -
.../pages-assets-points-convert.54ef8ad2.js | 1 -
.../pages-assets-power-exchange.1b45324a.js | 1 -
.../js/pages-assets-transfer.0783e8b2.js | 1 -
.../js/pages-assets-wallet-form.1cba4b18.js | 1 -
.../static/js/pages-assets-wallet.717e75c5.js | 1 -
.../js/pages-assets-withdraw.bc970756.js | 1 -
.../static/js/pages-index-index.8c0b11b6.js | 1 -
unpackage/dist/build/web/static/logo.png | Bin 4023 -> 0 bytes
30 files changed, 1632 insertions(+), 239 deletions(-)
delete mode 100644 unpackage/dist/build/web/index.html
delete mode 100644 unpackage/dist/build/web/static/fonts/din-bold-2.ttf
delete mode 100644 unpackage/dist/build/web/static/index.883130ca.css
delete mode 100644 unpackage/dist/build/web/static/js/chunk-vendors.98a0fd8f.js
delete mode 100644 unpackage/dist/build/web/static/js/index.fa34fa02.js
delete mode 100644 unpackage/dist/build/web/static/js/pages-assets-bmt-exchange.cdefe888.js
delete mode 100644 unpackage/dist/build/web/static/js/pages-assets-bmt-exchange~pages-assets-ledger~pages-assets-points-convert~pages-assets-points-conver~d5b52e90.81b7da6f.js
delete mode 100644 unpackage/dist/build/web/static/js/pages-assets-bmt-exchange~pages-assets-power-exchange~pages-assets-transfer~pages-assets-wallet~page~56b97807.3e916418.js
delete mode 100644 unpackage/dist/build/web/static/js/pages-assets-ledger.78e8403b.js
delete mode 100644 unpackage/dist/build/web/static/js/pages-assets-points-convert-detail.549ecbfe.js
delete mode 100644 unpackage/dist/build/web/static/js/pages-assets-points-convert-list.ced2d19e.js
delete mode 100644 unpackage/dist/build/web/static/js/pages-assets-points-convert.54ef8ad2.js
delete mode 100644 unpackage/dist/build/web/static/js/pages-assets-power-exchange.1b45324a.js
delete mode 100644 unpackage/dist/build/web/static/js/pages-assets-transfer.0783e8b2.js
delete mode 100644 unpackage/dist/build/web/static/js/pages-assets-wallet-form.1cba4b18.js
delete mode 100644 unpackage/dist/build/web/static/js/pages-assets-wallet.717e75c5.js
delete mode 100644 unpackage/dist/build/web/static/js/pages-assets-withdraw.bc970756.js
delete mode 100644 unpackage/dist/build/web/static/js/pages-index-index.8c0b11b6.js
delete mode 100644 unpackage/dist/build/web/static/logo.png
diff --git a/api/assets.js b/api/assets.js
index 4fa33a3..f138c40 100644
--- a/api/assets.js
+++ b/api/assets.js
@@ -112,9 +112,23 @@ function normalizeBalances(data) {
};
}
+function toRawDisplayValue(value) {
+ if (value === undefined || value === null || value === "") {
+ return "0";
+ }
+
+ return String(value);
+}
+
function buildHomeOverview(balanceData, tickerData) {
const balances = normalizeBalances(balanceData);
const ticker = normalizeTicker(tickerData);
+ const rawQuickAssets = {
+ points: toRawDisplayValue(balanceData && balanceData.point),
+ voucher: toRawDisplayValue(balanceData && balanceData.coin),
+ coupon: toRawDisplayValue(balanceData && balanceData.diamond_balance),
+ power: toRawDisplayValue(balanceData && balanceData.c_power),
+ };
return {
title: "数字资产",
@@ -138,26 +152,26 @@ function buildHomeOverview(balanceData, tickerData) {
quickAssets: [
{
key: "points",
- title: "积分",
- value: formatHomeNumber(balances.points, 0),
+ title: "可用积分",
+ value: rawQuickAssets.points,
accent: "gold",
},
{
key: "voucher",
title: "抵用券",
- value: formatHomeNumber(balances.voucher, 2),
+ value: rawQuickAssets.voucher,
accent: "rose",
},
{
key: "coupon",
title: "消费券",
- value: formatHomeNumber(balances.coupon, 0),
+ value: rawQuickAssets.coupon,
accent: "teal",
},
{
key: "power",
title: "算力",
- value: formatHomeNumber(balances.power, 0),
+ value: rawQuickAssets.power,
accent: "violet",
},
],
@@ -274,6 +288,205 @@ function normalizeListData(data) {
return [];
}
+const DEFAULT_LIST_PAGE = 1;
+const DEFAULT_LIST_PAGE_SIZE = 10;
+
+function hasPaginationKey(value) {
+ if (!value || typeof value !== "object") {
+ return false;
+ }
+
+ return (
+ value.page !== undefined ||
+ value.pageSize !== undefined ||
+ value.page_size !== undefined ||
+ value.pagesize !== undefined ||
+ value.size !== undefined ||
+ value.limit !== undefined
+ );
+}
+
+function normalizePaginationOptions(pagination) {
+ const source = pagination && typeof pagination === "object" ? pagination : {};
+ const page = Math.max(
+ 1,
+ Math.floor(
+ toNumber(
+ pickFirstValue(source, ["page", "current_page", "currentPage", "p"]) ||
+ DEFAULT_LIST_PAGE,
+ ),
+ ),
+ );
+ const pageSize = Math.max(
+ 1,
+ Math.floor(
+ toNumber(
+ pickFirstValue(source, [
+ "pageSize",
+ "page_size",
+ "pagesize",
+ "size",
+ "limit",
+ "per_page",
+ ]) || DEFAULT_LIST_PAGE_SIZE,
+ ),
+ ),
+ );
+
+ return {
+ page: page,
+ pageSize: pageSize,
+ };
+}
+
+function resolvePagingArguments(paginationOrRequestOptions, requestOptions) {
+ if (requestOptions || hasPaginationKey(paginationOrRequestOptions)) {
+ return {
+ pagination: normalizePaginationOptions(paginationOrRequestOptions),
+ requestOptions: requestOptions || null,
+ };
+ }
+
+ return {
+ pagination: normalizePaginationOptions(null),
+ requestOptions: paginationOrRequestOptions || null,
+ };
+}
+
+function buildPagingRequestData(baseData, pagination) {
+ const normalizedPagination = normalizePaginationOptions(pagination);
+
+ return Object.assign({}, baseData || {}, {
+ page: normalizedPagination.page,
+ page_size: normalizedPagination.pageSize,
+ });
+}
+
+function parseBooleanLike(value) {
+ if (typeof value === "boolean") {
+ return value;
+ }
+
+ if (typeof value === "number") {
+ return value > 0;
+ }
+
+ if (typeof value === "string") {
+ const normalized = value.trim().toLowerCase();
+ if (!normalized) {
+ return null;
+ }
+
+ if (
+ normalized === "1" ||
+ normalized === "true" ||
+ normalized === "yes" ||
+ normalized === "y"
+ ) {
+ return true;
+ }
+
+ if (
+ normalized === "0" ||
+ normalized === "false" ||
+ normalized === "no" ||
+ normalized === "n"
+ ) {
+ return false;
+ }
+ }
+
+ return null;
+}
+
+function buildPaginationMeta(data, requestPagination) {
+ const normalizedData = data && typeof data === "object" ? data : {};
+ const normalizedRequestPagination = normalizePaginationOptions(requestPagination);
+ const list = normalizeListData(normalizedData);
+ const page =
+ Math.floor(
+ toNumber(
+ pickFirstValue(normalizedData, [
+ "page",
+ "current_page",
+ "currentPage",
+ "page_num",
+ ]),
+ ),
+ ) || normalizedRequestPagination.page;
+ const pageSize =
+ Math.floor(
+ toNumber(
+ pickFirstValue(normalizedData, [
+ "page_size",
+ "pagesize",
+ "size",
+ "limit",
+ "per_page",
+ ]),
+ ),
+ ) || normalizedRequestPagination.pageSize;
+ const total = Math.floor(
+ toNumber(
+ pickFirstValue(normalizedData, [
+ "total",
+ "count",
+ "total_count",
+ "totalCount",
+ "record_count",
+ "all_count",
+ ]),
+ ),
+ );
+ const lastPage = Math.floor(
+ toNumber(
+ pickFirstValue(normalizedData, [
+ "last_page",
+ "lastPage",
+ "page_total",
+ "total_page",
+ "pages",
+ "pageCount",
+ ]),
+ ),
+ );
+
+ const hasMoreRaw = pickFirstValue(normalizedData, [
+ "has_more",
+ "hasMore",
+ "more",
+ "is_more",
+ "next_page",
+ "nextPage",
+ ]);
+ const hasMoreByRawValue = parseBooleanLike(hasMoreRaw);
+ let hasMore = hasMoreByRawValue;
+
+ if (hasMore === null && lastPage > 0) {
+ hasMore = page < lastPage;
+ }
+
+ if (hasMore === null && total > 0 && pageSize > 0) {
+ hasMore = page * pageSize < total;
+ }
+
+ if (hasMore === null) {
+ hasMore = list.length >= pageSize && list.length > 0;
+ }
+
+ if (!list.length) {
+ hasMore = false;
+ }
+
+ return {
+ page: page,
+ pageSize: pageSize,
+ total: total,
+ lastPage: lastPage,
+ hasMore: Boolean(hasMore),
+ };
+}
+
function formatTransferRecordNumber(value) {
const number = toNumber(value);
return formatHomeNumber(number, Number.isInteger(number) ? 0 : 2);
@@ -352,6 +565,18 @@ function buildRecordId(item, fallbackPrefix) {
);
}
+function normalizeAvailablePointsText(text) {
+ const safeText = String(text || "");
+ if (!safeText) {
+ return "";
+ }
+
+ return safeText
+ .replace(/可用积分/g, "__AVAILABLE_POINTS__")
+ .replace(/积分/g, "可用积分")
+ .replace(/__AVAILABLE_POINTS__/g, "可用积分");
+}
+
function mapWalletFlowRecords(list, meta) {
return normalizeListData(list).map(function (item) {
const amountValue = pickFirstValue(item, [
@@ -363,6 +588,7 @@ function mapWalletFlowRecords(list, meta) {
"money",
"bmt_num",
"power_num",
+ "gold_num",
"point_num",
]);
const direction = resolveRecordDirection(item, amountValue, "收入", "支出");
@@ -392,12 +618,27 @@ function mapWalletFlowRecords(list, meta) {
pickFirstValue(item, ["title", "name", "type_name"]) ||
meta.title ||
meta.unit + "记录";
+ const isPointsLedger = String(meta && meta.key ? meta.key : "") === "points";
+ const displayTitle = isPointsLedger
+ ? normalizeAvailablePointsText(title)
+ : title;
+ const displayNoteText = isPointsLedger
+ ? normalizeAvailablePointsText(noteText)
+ : noteText;
+ const displayDirection = isPointsLedger
+ ? normalizeAvailablePointsText(direction)
+ : direction;
+ const displaySubtitle = orderSn
+ ? "单号 " + orderSn
+ : displayNoteText || displayDirection;
+ const displayFeeText =
+ displayNoteText || (orderSn ? "单号 " + orderSn : meta.subtitle);
return {
id: buildRecordId(item, meta.key || "flow"),
sourceId: String(pickFirstValue(item, ["id", "log_id", "uid"]) || ""),
- title: title,
- subtitle: orderSn ? "单号 " + orderSn : noteText || direction,
+ title: displayTitle,
+ subtitle: displaySubtitle,
time: pickFirstValue(item, [
"add_time",
"create_time",
@@ -417,11 +658,11 @@ function mapWalletFlowRecords(list, meta) {
? "剩余" + meta.unit + ":" + formatTransferRecordNumber(balanceValue)
: "当前" + meta.unit + "流水",
assetLabel: meta.unit,
- feeText: noteText || (orderSn ? "单号 " + orderSn : meta.subtitle),
- directionLabel: direction,
+ feeText: displayFeeText,
+ directionLabel: displayDirection,
actionSymbol: directionPresentation.actionSymbol,
orderSn: orderSn,
- noteText: noteText,
+ noteText: displayNoteText,
tag: directionPresentation.income ? "收" : "支",
tone: directionPresentation.income ? "success" : "danger",
cardTone: directionPresentation.income ? "success" : "danger",
@@ -469,7 +710,8 @@ function buildRedeemConsumeText(item, meta) {
]);
if (pointValue !== "") {
- fragments.push("积分 " + formatTransferRecordNumber(pointValue));
+ const pointLabel = meta.type === 1 ? "可用积分" : "积分";
+ fragments.push(pointLabel + " " + formatTransferRecordNumber(pointValue));
}
if (powerValue !== "") {
@@ -538,7 +780,19 @@ function mapRedeemRecords(list, meta) {
}
function getTransferRecordUnit(item) {
- return Number(item && item.type) === 0 ? "算力" : "积分";
+ return Number(item && item.type) === 0 ? "算力" : "可用积分";
+}
+
+function normalizeTransferPointsText(text, item) {
+ if (Number(item && item.type) === 0) {
+ return String(text || "");
+ }
+
+ const safeText = String(text || "");
+ return safeText
+ .replace(/可用积分/g, "__POINTS_LABEL__")
+ .replace(/积分/g, "可用积分")
+ .replace(/__POINTS_LABEL__/g, "可用积分");
}
function getTransferRecordTone(item) {
@@ -612,9 +866,10 @@ function getTransferRecordBalanceLabel(item) {
function mapTransferRecords(list) {
return (Array.isArray(list) ? list : []).map(function (item) {
+ const titleText = item.title || getTransferRecordTitle(item);
return {
id: item.order_sn || item.id || String(Math.random()),
- title: item.title || getTransferRecordTitle(item),
+ title: normalizeTransferPointsText(titleText, item),
subtitle: item.order_sn ? "单号 " + item.order_sn : getTransferRecordDirection(item),
time: item.add_time || "",
amount: getTransferRecordAmount(item),
@@ -634,8 +889,18 @@ function mapTransferRecords(list) {
function mapPointsConvertRecords(list) {
return normalizeListData(list).map(function (item) {
+ const rawTransferPointValue = pickFirstValue(item, [
+ "transfer_point_num",
+ "transfer_coin_num",
+ "point_num",
+ "coin_num",
+ "value",
+ ]);
+ const hasTransferPointValue = rawTransferPointValue !== "";
const amountValue = pickFirstValue(item, [
+ "gold_num",
"number",
+ "transfer_point_num",
"transfer_coin_num",
"point_num",
"num",
@@ -675,6 +940,10 @@ function mapPointsConvertRecords(list) {
disabled = true;
}
+ if (hasTransferPointValue && toNumber(rawTransferPointValue) <= 0) {
+ disabled = true;
+ }
+
return {
id: String(
pickFirstValue(item, ["id", "bill_id", "log_id", "sn"]) ||
@@ -690,7 +959,7 @@ function mapPointsConvertRecords(list) {
subtitle:
"可转数量 " +
formatTransferRecordNumber(
- pickFirstValue(item, ["transfer_coin_num", "coin_num", "value"]) || 0,
+ rawTransferPointValue || 0,
),
time: pickFirstValue(item, [
"add_time",
@@ -701,6 +970,7 @@ function mapPointsConvertRecords(list) {
]),
amount: "+" + formatLedgerRecordNumber(amountValue),
amountValue: toNumber(amountValue),
+ transferPointValue: toNumber(rawTransferPointValue),
statusText: statusText,
disabled: disabled,
balance:
@@ -858,21 +1128,36 @@ function buildPointsConvertDetailPayload(data, fallbackRecord) {
const summarySource =
data && typeof data === "object" && !Array.isArray(data) ? data : {};
const fallback = fallbackRecord || {};
- const totalValue =
- pickFirstValue(summarySource, [
+ const summaryTotalValue = pickFirstValue(summarySource, [
+ "gold_num",
+ "number",
+ "num",
+ "amount",
+ "point_num",
+ "transfer_coin_num",
+ "total",
+ ]);
+ const detailFallbackTotal = detailItems.reduce(function (total, item) {
+ const value = pickFirstValue(item, [
+ "gold_num",
"number",
"num",
"amount",
"point_num",
"transfer_coin_num",
- "total",
- ]) || sumBy(detailItems, "number");
+ "value",
+ ]);
+ return total + toNumber(value);
+ }, 0);
+ const totalValue =
+ summaryTotalValue !== "" ? summaryTotalValue : detailFallbackTotal;
const totalAmountText =
totalValue !== ""
? "+" + formatLedgerRecordNumber(totalValue)
: fallback.amount || "+0";
const detailList = detailItems.map(function (item, index) {
const amountValue = pickFirstValue(item, [
+ "gold_num",
"number",
"num",
"amount",
@@ -1046,6 +1331,26 @@ async function fetchBmtPowerRateData(requestOptions) {
);
}
+function resolveRedeemPowerRate(data) {
+ const sourceValue =
+ data && typeof data === "object"
+ ? pickFirstValue(data, [
+ "r",
+ "rate",
+ "power_rate",
+ "powerRate",
+ "redeem_power_rate",
+ "redeemRate",
+ "value",
+ "num",
+ "number",
+ ])
+ : data;
+
+ const normalizedRate = toNumber(sourceValue);
+ return normalizedRate > 0 ? normalizedRate : 0;
+}
+
async function fetchTransferFeeData(requestOptions) {
return fetchPayload(
createRequestOptions({
@@ -1064,13 +1369,13 @@ async function fetchWalletAddressData(requestOptions) {
);
}
-async function fetchPointsConvertList(requestOptions) {
+async function fetchPointsConvertList(pagination, requestOptions) {
return fetchPayload(
createRequestOptions({
url: serviceConfig.ENDPOINTS.pointsConvertAvailableList,
- data: {
+ data: buildPagingRequestData({
interval: serviceConfig.POINTS_CONVERT_INTERVAL,
- },
+ }, pagination),
}, requestOptions),
"积分转换列表加载失败",
);
@@ -1088,34 +1393,35 @@ async function fetchPointsConvertHistoryListData(month, requestOptions) {
);
}
-async function fetchTransferLedgerData(requestOptions) {
+async function fetchTransferLedgerData(pagination, requestOptions) {
return fetchPayload(
createRequestOptions({
url: serviceConfig.ENDPOINTS.transferLedger,
+ data: buildPagingRequestData({}, pagination),
}, requestOptions),
"转赠记录加载失败",
);
}
-async function fetchWalletFlowListData(flowType, requestOptions) {
+async function fetchWalletFlowListData(flowType, pagination, requestOptions) {
return fetchPayload(
createRequestOptions({
url: serviceConfig.ENDPOINTS.walletFlowList,
- data: {
+ data: buildPagingRequestData({
type: flowType,
- },
+ }, pagination),
}, requestOptions),
"资产流水加载失败",
);
}
-async function fetchRedeemRecordListData(redeemType, requestOptions) {
+async function fetchRedeemRecordListData(redeemType, pagination, requestOptions) {
return fetchPayload(
createRequestOptions({
url: serviceConfig.ENDPOINTS.redeemRecordList,
- data: {
+ data: buildPagingRequestData({
type: redeemType,
- },
+ }, pagination),
}, requestOptions),
"兑换记录加载失败",
);
@@ -1158,12 +1464,24 @@ export async function fetchPointsConvertHome(month, requestOptions) {
};
}
-export async function fetchPointsConvertSelection(requestOptions) {
- const data = await fetchPointsConvertList(requestOptions);
+export async function fetchPointsConvertSelection(
+ paginationOrRequestOptions,
+ requestOptions,
+) {
+ const params = resolvePagingArguments(
+ paginationOrRequestOptions,
+ requestOptions,
+ );
+ const data = await fetchPointsConvertList(
+ params.pagination,
+ params.requestOptions,
+ );
const items = mapPointsConvertRecords(data);
+ const pagination = buildPaginationMeta(data, params.pagination);
return {
items: items,
+ pagination: pagination,
};
}
@@ -1358,14 +1676,14 @@ export async function fetchBmtExchangeDetail(requestOptions) {
]);
const ticker = normalizeTicker(result[0]);
const balances = normalizeBalances(result[1]);
- const powerRate = toNumber(result[2]);
+ const powerRate = resolveRedeemPowerRate(result[2]);
return {
ticker: ticker,
powerRate: powerRate,
balances: {
points: toFixedNumber(balances.points, 0),
- power: toFixedNumber(balances.power, 2),
+ power: toFixedNumber(balances.power, 0),
bmt: toFixedNumber(balances.bmt, 2),
voucher: toFixedNumber(balances.voucher, 2),
coupon: toFixedNumber(balances.coupon, 2),
@@ -1451,34 +1769,47 @@ export async function submitAssetWithdraw(payload, requestOptions) {
};
}
-export async function fetchLedgerDetail(type, requestOptions) {
+export async function fetchLedgerDetail(
+ type,
+ paginationOrRequestOptions,
+ requestOptions,
+) {
+ const params = resolvePagingArguments(
+ paginationOrRequestOptions,
+ requestOptions,
+ );
+ const pagination = params.pagination;
+ const mergedRequestOptions = params.requestOptions;
+
if (type === "transfer") {
- const data = await fetchTransferLedgerData(requestOptions);
+ const data = await fetchTransferLedgerData(pagination, mergedRequestOptions);
return {
type: type,
title: "转赠记录",
- subtitle: "积分与算力转赠流水",
- records: mapTransferRecords(data && data.list),
+ subtitle: "可用积分与算力转赠流水",
+ records: mapTransferRecords(normalizeListData(data)),
+ pagination: buildPaginationMeta(data, pagination),
};
}
if (type === "points") {
- const data = await fetchWalletFlowListData(0, requestOptions);
+ const data = await fetchWalletFlowListData(0, pagination, mergedRequestOptions);
return {
type: type,
- title: "我的积分",
+ title: "可用积分记录",
subtitle: "可用积分收支记录",
records: mapWalletFlowRecords(data, {
key: "points",
- unit: "积分",
- title: "积分记录",
+ unit: "可用积分",
+ title: "可用积分记录",
subtitle: "可用积分流水",
}),
+ pagination: buildPaginationMeta(data, pagination),
};
}
if (type === "power-flow") {
- const data = await fetchWalletFlowListData(1, requestOptions);
+ const data = await fetchWalletFlowListData(1, pagination, mergedRequestOptions);
return {
type: type,
title: "算力记录",
@@ -1489,11 +1820,12 @@ export async function fetchLedgerDetail(type, requestOptions) {
title: "算力记录",
subtitle: "算力流水",
}),
+ pagination: buildPaginationMeta(data, pagination),
};
}
if (type === "power") {
- const data = await fetchRedeemRecordListData(0, requestOptions);
+ const data = await fetchRedeemRecordListData(0, pagination, mergedRequestOptions);
return {
type: type,
title: "兑换记录",
@@ -1504,13 +1836,21 @@ export async function fetchLedgerDetail(type, requestOptions) {
unit: "算力",
title: "兑换算力",
subtitle: "算力兑换",
- amountKeys: ["power", "power_num", "c_power", "redeem_power", "num", "number"],
+ amountKeys: [
+ "num",
+ "number",
+ "power",
+ "power_num",
+ "c_power",
+ "redeem_power",
+ ],
}),
+ pagination: buildPaginationMeta(data, pagination),
};
}
if (type === "bmt") {
- const data = await fetchRedeemRecordListData(1, requestOptions);
+ const data = await fetchRedeemRecordListData(1, pagination, mergedRequestOptions);
return {
type: type,
title: "兑换记录",
@@ -1523,11 +1863,12 @@ export async function fetchLedgerDetail(type, requestOptions) {
subtitle: "BMT兑换",
amountKeys: ["bmt", "bmt_num", "redeem_bmt", "num", "number"],
}),
+ pagination: buildPaginationMeta(data, pagination),
};
}
if (type === "withdraw") {
- const data = await fetchWalletFlowListData(2, requestOptions);
+ const data = await fetchWalletFlowListData(2, pagination, mergedRequestOptions);
return {
type: type,
title: "提取记录",
@@ -1538,12 +1879,21 @@ export async function fetchLedgerDetail(type, requestOptions) {
title: "BMT记录",
subtitle: "BMT流水",
}),
+ pagination: buildPaginationMeta(data, pagination),
};
}
- const homeData = await fetchHomeBalanceData(requestOptions);
+ const homeData = await fetchHomeBalanceData(mergedRequestOptions);
const balances = normalizeBalances(homeData);
- return buildDefaultLedger(type, balances);
+ return Object.assign({}, buildDefaultLedger(type, balances), {
+ pagination: {
+ page: pagination.page,
+ pageSize: pagination.pageSize,
+ total: 0,
+ lastPage: 0,
+ hasMore: false,
+ },
+ });
}
export async function fetchWalletDetail(requestOptions) {
diff --git a/components/asset-confirm-popup.vue b/components/asset-confirm-popup.vue
index b19ae8a..5272680 100644
--- a/components/asset-confirm-popup.vue
+++ b/components/asset-confirm-popup.vue
@@ -31,7 +31,7 @@
message
}}
-