From bfd94e08a36b4449c842b6310b65d66b6b0bcd3c Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期二, 09 九月 2025 14:47:27 +0800 Subject: [PATCH] feat: 钱包 --- apps/cMiniApp/src/subpackages/wallet/incomeDetailInfo/InnerPage.vue | 50 +++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 41 insertions(+), 9 deletions(-) diff --git a/apps/cMiniApp/src/subpackages/wallet/incomeDetailInfo/InnerPage.vue b/apps/cMiniApp/src/subpackages/wallet/incomeDetailInfo/InnerPage.vue index dfecbca..6a1d23b 100644 --- a/apps/cMiniApp/src/subpackages/wallet/incomeDetailInfo/InnerPage.vue +++ b/apps/cMiniApp/src/subpackages/wallet/incomeDetailInfo/InnerPage.vue @@ -1,43 +1,75 @@ <template> - <WithdrawMoneyCard :money="100" title="鏀跺叆"></WithdrawMoneyCard> + <WithdrawMoneyCard + :money="100" + :title="EnumUserWalletTransactionTypeText[detail.type]" + ></WithdrawMoneyCard> <List> <ListItem title="娴佹按鍙�" :show-arrow="false"> <template #extra> - <div class="income-detail-info-value">{{ '5893485943859843095843' }}</div> + <div class="income-detail-info-value">{{ detail?.code }}</div> </template> </ListItem> <ListItem title="浼佷笟鍚嶇О" :show-arrow="false"> <template #extra> - <div class="income-detail-info-value">{{ '瀹佹尝浜哄姏鏃犲咖' }}</div> + <div class="income-detail-info-value">{{ detail?.enterpriseName }}</div> </template> </ListItem> <ListItem title="缁撶畻鏃ユ湡" :show-arrow="false"> <template #extra> - <div class="income-detail-info-value">{{ '2024.11.13' }}</div> + <div class="income-detail-info-value"> + {{ dayjs(detail?.settlementTime).format('YYYY-MM-DD') }} + </div> </template> </ListItem> <ListItem title="宸ヨ祫鍗曞唴瀹�" :show-arrow="false"> <template #extra> - <div class="income-detail-info-value">{{ '33.33鍏�' }}</div> + <div class="income-detail-info-value">{{ toThousand(detail?.amount) }}</div> </template> </ListItem> - <ListItem title="宸ヨ祫鍗曞唴瀹�" :show-arrow="false"> + <!-- <ListItem title="宸ヨ祫鍗曞唴瀹�" :show-arrow="false"> <template #extra> <div class="income-detail-info-value">{{ '33.33鍏�' }}</div> </template> - </ListItem> + </ListItem> --> </List> </template> <script setup lang="ts"> import { List, ListItem, WithdrawMoneyCard } from '@12333/components'; -import { useUserStore } from '@/stores/modules/user'; +import { EnumUserWalletTransactionType, EnumUserWalletTransactionTypeText } from '@12333/constants'; +import Taro from '@tarojs/taro'; +import * as userServices from '@12333/services/apiV2/user'; +import { useQuery } from '@tanstack/vue-query'; +import dayjs from 'dayjs'; +import { toThousand } from '@12333/utils'; defineOptions({ name: 'InnerPage', }); -const userStore = useUserStore(); +const router = Taro.useRouter(); +const id = router.params?.id; + +const { + isLoading, + isError, + data: detail, + refetch, +} = useQuery({ + queryKey: ['userServices/getPersonalUserTransaction', id], + queryFn: async () => { + return await userServices.getPersonalUserTransaction( + { id: id }, + { + showLoading: false, + } + ); + }, + placeholderData: () => ({} as API.GetPersonalUserTransactionQueryResult), + onSuccess(data) { + // if (data.isExistTradeChatRecord) setTrue(); + }, +}); </script> <style lang="scss"> -- Gitblit v1.9.1