From 8434c4b22d915ed796f7662cb10817b8e33c47c6 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期一, 17 三月 2025 16:26:37 +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