From 0886e91fdfe3b5528f80d2b6742083aa11d16ebb Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期三, 02 四月 2025 15:54:15 +0800 Subject: [PATCH] fix: 四期bug --- /dev/null | 0 packages/components/src/components/Card/OrderCard.vue | 8 +- packages/components/src/views/Order/components/ElectricOrder.vue | 2 packages/components/src/views/Order/components/GasOrder.vue | 2 packages/services/api/typings.d.ts | 88 ++++++++++++++++++++++ packages/components/src/views/Order/components/PhoneOrder.vue | 2 packages/core/src/lifeRechargeConstants.ts | 13 ++ packages/components/src/views/Mine/Dashboard.vue | 2 apps/taro/src/hooks/lifepay.ts | 8 + packages/core/src/lifeRechargeServices.ts | 12 ++ packages/services/api/LifePay.ts | 83 +++++++++++++++++++- 11 files changed, 201 insertions(+), 19 deletions(-) diff --git a/apps/taro/packages/components/assets/icon-back-top.png b/apps/taro/packages/components/assets/icon-back-top.png deleted file mode 100644 index 0b64e13..0000000 --- a/apps/taro/packages/components/assets/icon-back-top.png +++ /dev/null Binary files differ diff --git a/apps/taro/packages/components/assets/icon-free-dian.png b/apps/taro/packages/components/assets/icon-free-dian.png deleted file mode 100644 index a8f48ec..0000000 --- a/apps/taro/packages/components/assets/icon-free-dian.png +++ /dev/null Binary files differ diff --git a/apps/taro/src/hooks/lifepay.ts b/apps/taro/src/hooks/lifepay.ts index 574a36c..28090cd 100644 --- a/apps/taro/src/hooks/lifepay.ts +++ b/apps/taro/src/hooks/lifepay.ts @@ -1,5 +1,6 @@ import { useQuery } from '@tanstack/vue-query'; import { useLifeRechargeContext, CreateEditPayChannelsInput } from '@life-payment/core-vue'; +import { MaybeRef } from 'vue'; export function useOnlineService() { const { blLifeRecharge } = useLifeRechargeContext(); @@ -20,11 +21,12 @@ } type UseLifePayChannlesAllListOptions = { + params?: MaybeRef<API.QueryLifePayChannlesInput>; onSuccess?: (data: API.CreateEditPayChannelsInput[]) => any; }; export function useLifePayChannlesAllList(options: UseLifePayChannlesAllListOptions = {}) { - const { onSuccess } = options; + const { onSuccess, params = {} } = options; const { blLifeRecharge } = useLifeRechargeContext(); @@ -33,9 +35,9 @@ isLoading, refetch, } = useQuery({ - queryKey: ['blLifeRecharge/getLifePayChannlesAllList'], + queryKey: ['blLifeRecharge/getLifePayChannlesAllList', params], queryFn: async () => { - return await blLifeRecharge.services.getLifePayChannlesAllList({ + return await blLifeRecharge.services.getLifePayChannlesAllList(unref(params), { showLoading: false, }); }, diff --git a/packages/components/src/components/Card/OrderCard.vue b/packages/components/src/components/Card/OrderCard.vue index 0936df3..d261033 100644 --- a/packages/components/src/components/Card/OrderCard.vue +++ b/packages/components/src/components/Card/OrderCard.vue @@ -4,7 +4,7 @@ <div class="order-card-title-top"> <div class="order-card-title-text">{{ title }}</div> <div class="order-card-title-status"> - {{ LifeRechargeConstants.LifePayOrderFrontStatusEnumText[status] }} + {{ LifeRechargeConstants.LifePayOrderStatusEnumText[status] }} </div> </div> <div class="order-card-title-ordernum-wrapper"> @@ -14,14 +14,14 @@ <slot name="actions"> <div class="order-card-action" - v-if="status === LifeRechargeConstants.LifePayOrderFrontStatusEnum.鏀粯鎴愬姛" + v-if="status === LifeRechargeConstants.LifePayOrderStatusEnum.鍏呭�间腑" @click="emit('goApplyRefund', id)" > 鐢宠閫�娆� </div> <div class="order-card-action" - v-if="status === LifeRechargeConstants.LifePayOrderFrontStatusEnum.閫�娆惧け璐�" + v-if="status === LifeRechargeConstants.LifePayOrderStatusEnum.閫�娆惧け璐�" @click="emit('goRefundDetail', orderNo)" > 璇︽儏 @@ -44,7 +44,7 @@ type Props = { title: string; - status?: LifeRechargeConstants.LifePayOrderFrontStatusEnum; + status?: LifeRechargeConstants.LifePayOrderStatusEnum; orderNo: string; id: string; }; diff --git a/packages/components/src/views/Mine/Dashboard.vue b/packages/components/src/views/Mine/Dashboard.vue index b936761..06d6b0a 100644 --- a/packages/components/src/views/Mine/Dashboard.vue +++ b/packages/components/src/views/Mine/Dashboard.vue @@ -83,6 +83,6 @@ ); }, placeholderData: () => ({} as TopStatisticsOutput), - enabled: computed(() => blLifeRecharge.accountModel.userChannles.length > 0), + enabled: computed(() => blLifeRecharge.accountModel.isBackClientUser), }); </script> diff --git a/packages/components/src/views/Order/components/ElectricOrder.vue b/packages/components/src/views/Order/components/ElectricOrder.vue index 30153e0..eac8a9e 100644 --- a/packages/components/src/views/Order/components/ElectricOrder.vue +++ b/packages/components/src/views/Order/components/ElectricOrder.vue @@ -6,7 +6,7 @@ <template #renderItem="{ item }"> <OrderCard title="鐢佃垂鍏呭��" - :status="item?.frontStatus" + :status="item?.lifePayOrderStatus" :order-no="item?.orderNo" :id="item?.id" @goApplyRefund="emit('goApplyRefund', $event)" diff --git a/packages/components/src/views/Order/components/GasOrder.vue b/packages/components/src/views/Order/components/GasOrder.vue index cfe619a..270f6a5 100644 --- a/packages/components/src/views/Order/components/GasOrder.vue +++ b/packages/components/src/views/Order/components/GasOrder.vue @@ -6,7 +6,7 @@ <template #renderItem="{ item }"> <OrderCard title="鐕冩皵鍏呭��" - :status="item?.frontStatus" + :status="item?.lifePayOrderStatus" :order-no="item?.orderNo" :id="item?.id" @goApplyRefund="emit('goApplyRefund', $event)" diff --git a/packages/components/src/views/Order/components/PhoneOrder.vue b/packages/components/src/views/Order/components/PhoneOrder.vue index d76f217..c1e1f71 100644 --- a/packages/components/src/views/Order/components/PhoneOrder.vue +++ b/packages/components/src/views/Order/components/PhoneOrder.vue @@ -6,7 +6,7 @@ <template #renderItem="{ item }"> <OrderCard title="璇濊垂鍏呭��" - :status="item?.frontStatus" + :status="item?.lifePayOrderStatus" :order-no="item?.orderNo" :id="item?.id" @goApplyRefund="emit('goApplyRefund', $event)" diff --git a/packages/core/src/lifeRechargeConstants.ts b/packages/core/src/lifeRechargeConstants.ts index 3a64d0e..f26ccb2 100644 --- a/packages/core/src/lifeRechargeConstants.ts +++ b/packages/core/src/lifeRechargeConstants.ts @@ -42,7 +42,10 @@ export enum LifePayOrderStatusEnum { 鍏呭�间腑 = 10, - // 宸插け璐� = 20, + /** + * @deprecated 浠呬綔涓鸿�佹暟鎹吋瀹瑰垽鏂� + */ + 宸插け璐� = 20, 宸插畬鎴� = 30, @@ -56,7 +59,7 @@ export const LifePayOrderStatusEnumText = { [LifePayOrderStatusEnum.鍏呭�间腑]: '鍏呭�间腑', - // [LifePayOrderStatusEnum.宸插け璐: '宸插け璐�', + [LifePayOrderStatusEnum.宸插け璐: '宸插け璐�', [LifePayOrderStatusEnum.宸插畬鎴怾: '宸插畬鎴�', [LifePayOrderStatusEnum.寰呴��娆綸: '寰呴��娆�', [LifePayOrderStatusEnum.宸查��娆綸: '宸查��娆�', @@ -190,4 +193,10 @@ 寰俊灏忕▼搴� = 20, 寰俊鍏紬鍙� = 30, } + + export enum LifePayChannelsStatsEnum { + 鍚敤 = 10, + + 绂佺敤 = 20, + } } diff --git a/packages/core/src/lifeRechargeServices.ts b/packages/core/src/lifeRechargeServices.ts index a7e60aa..b66a533 100644 --- a/packages/core/src/lifeRechargeServices.ts +++ b/packages/core/src/lifeRechargeServices.ts @@ -351,9 +351,13 @@ } /** 鑾峰彇鍏ㄩ儴缂磋垂娓犻亾 GET /api/LifePay/GetLifePayChannlesAllList */ - async getLifePayChannlesAllList(options?: RequestConfig) { + async getLifePayChannlesAllList(body: QueryLifePayChannlesInput, options?: RequestConfig) { return this.request<CreateEditPayChannelsInput[]>('/api/LifePay/GetLifePayChannlesAllList', { - method: 'GET', + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, ...(options || {}), }); } @@ -888,3 +892,7 @@ /** 鏄ㄦ棩娲昏穬鐢ㄦ埛 */ yesterdayActiveUsers?: number; } + +export interface QueryLifePayChannlesInput { + status?: LifeRechargeConstants.LifePayChannelsStatsEnum; +} diff --git a/packages/services/api/LifePay.ts b/packages/services/api/LifePay.ts index 763251e..9961f02 100644 --- a/packages/services/api/LifePay.ts +++ b/packages/services/api/LifePay.ts @@ -176,9 +176,17 @@ }); } -/** 鍚屾璁㈠崟 GET /api/LifePay/GetAllChannlesRake */ +/** 鍚屾璁㈠崟鍒嗕剑淇℃伅 GET /api/LifePay/GetAllChannlesRake */ export async function getAllChannlesRake(options?: API.RequestConfig) { return request<any>('/api/LifePay/GetAllChannlesRake', { + method: 'GET', + ...(options || {}), + }); +} + +/** 缁熻浜ゆ槗娴佹按 GET /api/LifePay/GetAllLifePayConsumption */ +export async function getAllLifePayConsumption(options?: API.RequestConfig) { + return request<any>('/api/LifePay/GetAllLifePayConsumption', { method: 'GET', ...(options || {}), }); @@ -207,9 +215,39 @@ }); } +/** 娓犻亾鏁版嵁 POST /api/LifePay/GetChannelDataList */ +export async function getChannelDataList( + body: API.TopStatisticsInput, + options?: API.RequestConfig +) { + return request<API.ChannelDataListOutPut>('/api/LifePay/GetChannelDataList', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + /** 鑾峰彇娓犻亾鎶樻墸 POST /api/LifePay/GetChannelRate */ export async function getChannelRate(body: API.ChannelsBaseInput, options?: API.RequestConfig) { return request<API.ChannelRateOutput>('/api/LifePay/GetChannelRate', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 30鏃ヤ剑閲戝垪琛� POST /api/LifePay/GetChannlesRakeList */ +export async function getChannlesRakeList( + body: API.TopStatisticsInput, + options?: API.RequestConfig +) { + return request<API.ChannlesRakeListOutPut>('/api/LifePay/GetChannlesRakeList', { method: 'POST', headers: { 'Content-Type': 'application/json', @@ -288,10 +326,17 @@ }); } -/** 鑾峰彇鍏ㄩ儴缂磋垂娓犻亾 GET /api/LifePay/GetLifePayChannlesAllList */ -export async function getLifePayChannlesAllList(options?: API.RequestConfig) { +/** 鑾峰彇鍏ㄩ儴缂磋垂娓犻亾 POST /api/LifePay/GetLifePayChannlesAllList */ +export async function getLifePayChannlesAllList( + body: API.QueryLifePayChannlesInput, + options?: API.RequestConfig +) { return request<API.CreateEditPayChannelsInput[]>('/api/LifePay/GetLifePayChannlesAllList', { - method: 'GET', + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, ...(options || {}), }); } @@ -354,6 +399,24 @@ data: body, ...(options || {}), }); +} + +/** 鑾峰彇娑堣垂娴佹按鍒嗛〉鏁版嵁 POST /api/LifePay/GetLifePayConsumptionPage */ +export async function getLifePayConsumptionPage( + body: API.LifePayConsumptionPageInput, + options?: API.RequestConfig +) { + return request<API.LifePayConsumptionListOutputPageOutput>( + '/api/LifePay/GetLifePayConsumptionPage', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); } /** 鑾峰彇鏀舵敮娴佹按鍒嗛〉鏁版嵁 POST /api/LifePay/GetLifePayExpensesReceiptsPage */ @@ -548,6 +611,18 @@ }); } +/** 鑾峰彇30鏃ユ敹娆剧粺璁� POST /api/LifePay/GetReceiptsList */ +export async function getReceiptsList(body: API.TopStatisticsInput, options?: API.RequestConfig) { + return request<API.ReceiptsListOutPut>('/api/LifePay/GetReceiptsList', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + /** 鑾峰彇椤堕儴缁熻鏁版嵁 POST /api/LifePay/GetTopStatistics */ export async function getTopStatistics(body: API.TopStatisticsInput, options?: API.RequestConfig) { return request<API.TopStatisticsOutput>('/api/LifePay/GetTopStatistics', { diff --git a/packages/services/api/typings.d.ts b/packages/services/api/typings.d.ts index 6408be4..17297cc 100644 --- a/packages/services/api/typings.d.ts +++ b/packages/services/api/typings.d.ts @@ -524,6 +524,29 @@ type?: number; } + interface ChannelDataListOutPut { + /** Top5娓犻亾鏀舵 */ + receiveList?: ChannelDataReceive[]; + /** Top5娓犻亾鐢ㄦ埛 */ + userNumberList?: ChannelDataUserNumber[]; + } + + interface ChannelDataReceive { + /** 娓犻亾鍚嶇О */ + channelName?: string; + /** 鏀舵 */ + receivePrice?: number; + /** 浣i噾 */ + channlesRakePrice?: number; + } + + interface ChannelDataUserNumber { + /** 娓犻亾鍚嶇О */ + channelName?: string; + /** 鐢ㄦ埛鏁伴噺 */ + number?: number; + } + interface ChannelOutput { name?: string; channlesNum?: string; @@ -540,6 +563,11 @@ checkChannelId?: string; } + interface ChannlesRakeListOutPut { + /** 30澶╀剑閲� */ + channlesRakeList?: ReceiptsDetail[]; + } + interface CheckLoginVerificationCodeInput { messageType?: string; phoneNumber: string; @@ -549,6 +577,10 @@ interface ClockDto { kind?: string; } + + type ConsumptionFlowEnum = 10 | 20; + + type ConsumptionFrozenStatusEnum = 10 | 20; interface ControllerApiDescriptionModel { controllerName?: string; @@ -1184,6 +1216,44 @@ } type LifePayChannlesTypeEnum = 10 | 20; + + interface LifePayConsumptionListOutput { + /** 缂栧彿 */ + id?: string; + /** 骞冲彴璁㈠崟鍙� */ + orderNo?: string; + /** 澶栭儴璁㈠崟鍙� */ + acoolyOrderNo?: string; + /** 浜ゆ槗閲戦 */ + amount?: number; + acoolyStatus?: ACOOLYStatusEnum; + /** 璁拌处鏃堕棿 */ + finishTime?: string; + frozenStatus?: ConsumptionFrozenStatusEnum; + flow?: ConsumptionFlowEnum; + /** 鎵f閲戦 */ + deductionAmount?: number; + /** 鍐荤粨閲戦 */ + frozenAmount?: number; + } + + interface LifePayConsumptionListOutputPageOutput { + pageModel?: Pagination; + objectData?: any; + data?: LifePayConsumptionListOutput[]; + } + + interface LifePayConsumptionPageInput { + pageModel?: Pagination; + checkChannelId?: string; + /** 鏌ヨ鏉′欢 */ + keyWord?: string; + flow?: ConsumptionFlowEnum; + /** 璁拌处寮�濮嬫椂闂� */ + timeBegin?: string; + /** 璁拌处缁撴潫鏃堕棿 */ + timeEnd?: string; + } interface LifePayExpensesReceiptsListOutput { /** 缂栧彿 */ @@ -1852,6 +1922,10 @@ providerKey?: string; } + interface QueryLifePayChannlesInput { + status?: LifePayChannelsStatsEnum; + } + interface QueryLifePayOrderListInput { pageModel?: Pagination; checkChannelId?: string; @@ -1938,6 +2012,20 @@ loginTimeEnd?: string; } + interface ReceiptsDetail { + /** 鍒涘缓鏃堕棿 */ + creationTime?: string; + /** 閲戦 */ + amount?: number; + } + + interface ReceiptsListOutPut { + /** 30澶╂敹娆� */ + receiveList?: ReceiptsDetail[]; + /** 30澶╂敹鍏� */ + incomeList?: ReceiptsDetail[]; + } + interface RefundLifePayOrderInput { id?: string; /** 涓婁紶鍑瘉 */ -- Gitblit v1.9.1