updata
This commit is contained in:
parent
6d178a2502
commit
3dc8986586
|
|
@ -1512,13 +1512,17 @@ async function fetchPointsConvertList(pagination, requestOptions, interval) {
|
|||
);
|
||||
}
|
||||
|
||||
async function fetchPointsConvertHistoryListData(month, requestOptions) {
|
||||
async function fetchPointsConvertHistoryListData(
|
||||
month,
|
||||
pagination,
|
||||
requestOptions,
|
||||
) {
|
||||
return fetchPayload(
|
||||
createRequestOptions({
|
||||
url: serviceConfig.ENDPOINTS.pointsConvertHistoryList,
|
||||
data: {
|
||||
data: buildPagingRequestData({
|
||||
month: month,
|
||||
},
|
||||
}, pagination),
|
||||
}, requestOptions),
|
||||
"积分兑换列表加载失败",
|
||||
);
|
||||
|
|
@ -1621,10 +1625,24 @@ export async function fetchCouponRedeemLinkData(requestOptions) {
|
|||
};
|
||||
}
|
||||
|
||||
export async function fetchPointsConvertHome(month, requestOptions) {
|
||||
export async function fetchPointsConvertHome(
|
||||
month,
|
||||
paginationOrRequestOptions,
|
||||
requestOptions,
|
||||
) {
|
||||
const params = resolvePagingArguments(
|
||||
paginationOrRequestOptions,
|
||||
requestOptions,
|
||||
);
|
||||
const pagination = params.pagination;
|
||||
const mergedRequestOptions = params.requestOptions;
|
||||
const result = await Promise.all([
|
||||
fetchHomeBalanceData(requestOptions),
|
||||
fetchPointsConvertHistoryListData(month, requestOptions),
|
||||
fetchHomeBalanceData(mergedRequestOptions),
|
||||
fetchPointsConvertHistoryListData(
|
||||
month,
|
||||
pagination,
|
||||
mergedRequestOptions,
|
||||
),
|
||||
]);
|
||||
const balances = normalizeBalances(result[0]);
|
||||
const records = buildPointsHistoryRecords(result[1]).map(function (item) {
|
||||
|
|
@ -1637,6 +1655,7 @@ export async function fetchPointsConvertHome(month, requestOptions) {
|
|||
return {
|
||||
availablePoints: formatHomeNumber(balances.points, 0),
|
||||
records: records,
|
||||
pagination: buildPaginationMeta(result[1], pagination),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,8 @@
|
|||
"path": "pages/assets/points-convert",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"backgroundColor": "#191E32"
|
||||
"backgroundColor": "#191E32",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -154,6 +154,12 @@ export default {
|
|||
|
||||
this.hasShown = true;
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.resetPagingState();
|
||||
this.loadPage(false, 1, {
|
||||
isPullRefresh: true,
|
||||
});
|
||||
},
|
||||
onReachBottom() {
|
||||
this.loadMore();
|
||||
},
|
||||
|
|
@ -241,9 +247,12 @@ export default {
|
|||
this.resetPagingState();
|
||||
this.loadPage(true, 1);
|
||||
},
|
||||
async loadPage(showLoading, targetPage) {
|
||||
async loadPage(showLoading, targetPage, extraOptions) {
|
||||
const page = Number(targetPage || 1);
|
||||
const isLoadMore = page > 1;
|
||||
const options =
|
||||
extraOptions && typeof extraOptions === "object" ? extraOptions : {};
|
||||
const isPullRefresh = Boolean(options.isPullRefresh);
|
||||
|
||||
if (isLoadMore && this.loadingMore) {
|
||||
return;
|
||||
|
|
@ -294,6 +303,10 @@ export default {
|
|||
if (isLoadMore) {
|
||||
this.loadingMore = false;
|
||||
}
|
||||
|
||||
if (isPullRefresh && typeof uni !== "undefined" && uni.stopPullDownRefresh) {
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
}
|
||||
},
|
||||
loadMore() {
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>白马交易所</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
|
||||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/bmt/static/index.883130ca.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/bmt/static/js/chunk-vendors.a58c62f3.js></script><script src=/bmt/static/js/index.ae648d7a.js></script></body></html>
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 3.9 KiB |
Loading…
Reference in New Issue