From be80fd2b4b8819e028e7405c2a6ad8a5c5b9e883 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Mon, 8 Dec 2025 13:17:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E7=A4=BC=E7=89=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/wechat/pages/gift/index.vue | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/pages/wechat/pages/gift/index.vue b/src/pages/wechat/pages/gift/index.vue index 8a9eb60e..8a089246 100644 --- a/src/pages/wechat/pages/gift/index.vue +++ b/src/pages/wechat/pages/gift/index.vue @@ -10,7 +10,7 @@ - 0 + {{ fen2yuan(state.wallet.giftBalance) }} 可提现总{{ dictData.unit }} @@ -47,6 +47,7 @@ import { computed, reactive, ref } from 'vue'; import sheep from '@/sheep'; import { onLoad, onShow } from '@dcloudio/uni-app'; +import { fen2yuan } from '@/sheep/hooks/useGoods'; import ScrollList from '@/sheep/components/scroll-list/scroll-list.vue'; import useScroll from '@/sheep/hooks/use-scroll'; import { formatDate } from '@/sheep/helper/utils'; @@ -54,15 +55,18 @@ import { formatDate } from '@/sheep/helper/utils'; import PayWalletApi from "@/sheep/api/pay/wallet.js" const dictData = { - unit: "砖石" + unit: "缘豆" } const state = reactive({ - + wallet: { + giftBalance: "" + } }) onShow(() => { refreshList() + getWithdrawableAmount() }) const { @@ -72,4 +76,14 @@ const { listLoadMore: listLoadMore, } = useScroll(PayWalletApi.giftPage); + +// 查询可以提现的礼物金额 +const getWithdrawableAmount = async () => { + try { + const { data } = await PayWalletApi.getPayWallet() + state.wallet = data + } catch (error) { + console.log("|查询可以提现的礼物金额|,意外的错误error:", error); + } +} \ No newline at end of file