From 6f958b20feba65775c8005128fff79563f795898 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期四, 13 三月 2025 13:08:50 +0800 Subject: [PATCH] fix: 二期需求 --- packages/components/src/hooks/index.ts | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/components/src/hooks/index.ts b/packages/components/src/hooks/index.ts index 912a1b6..ec903cc 100644 --- a/packages/components/src/hooks/index.ts +++ b/packages/components/src/hooks/index.ts @@ -17,6 +17,7 @@ import { computed, MaybeRef, reactive, unref } from 'vue'; import { useInfiniteLoading } from './infiniteLoading'; import { OrderInputType } from '../constants'; +import { convertOrderFrontStatus } from '../utils'; export function useGetRate() { const { blLifeRecharge } = useLifeRechargeContext(); @@ -110,7 +111,7 @@ // }); const { infiniteLoadingProps } = useInfiniteLoading( - ({ pageParam }) => { + async ({ pageParam }) => { let params: QueryLifePayOrderListInput = { pageModel: { rows: 20, @@ -121,9 +122,14 @@ userId: blLifeRecharge.accountModel.userId, }; - return blLifeRecharge.services.getUserLifePayOrderPage(params, { + let res = await blLifeRecharge.services.getUserLifePayOrderPage(params, { showLoading: false, }); + res.data = res.data.map((x) => ({ + ...x, + frontStatus: convertOrderFrontStatus(x.payStatus, x.lifePayOrderStatus), + })); + return res; }, { queryKey: [ @@ -133,6 +139,12 @@ userId: blLifeRecharge.accountModel.userId, }, ], + + select(data) { + console.log('data: ', data); + // data.pages.map((item) => item.data.map((x) => convertOrderFrontStatus(x))) + return data; + }, } ); -- Gitblit v1.9.1