diff --git a/@html/归档.zip b/@html/归档.zip new file mode 100644 index 00000000..ae85e941 Binary files /dev/null and b/@html/归档.zip differ diff --git a/src/pages.json b/src/pages.json index 1b6f733f..9f87df87 100644 --- a/src/pages.json +++ b/src/pages.json @@ -221,6 +221,13 @@ "navigationStyle": "custom" } }, + { + "path": "pages/gift/gift-record", + "style": { + "navigationBarTitleText": "礼物账单", + "navigationStyle": "custom" + } + }, { "path": "pages/inviter/index", "style": { @@ -508,6 +515,13 @@ "navigationStyle": "custom" } }, + { + "path": "pages/gift/gift-record", + "style": { + "navigationBarTitleText": "礼物账单", + "navigationStyle": "custom" + } + }, { "path": "pages/inviter/index", "style": { diff --git a/src/pages/wechat/pages/components/gift-record-item.vue b/src/pages/wechat/pages/components/gift-record-item.vue new file mode 100644 index 00000000..1f0878db --- /dev/null +++ b/src/pages/wechat/pages/components/gift-record-item.vue @@ -0,0 +1,97 @@ + + \ No newline at end of file diff --git a/src/pages/wechat/pages/components/withraw-record-item.vue b/src/pages/wechat/pages/components/withraw-record-item.vue new file mode 100644 index 00000000..1af4058e --- /dev/null +++ b/src/pages/wechat/pages/components/withraw-record-item.vue @@ -0,0 +1,95 @@ + + \ No newline at end of file diff --git a/src/pages/wechat/pages/gift/gift-record.vue b/src/pages/wechat/pages/gift/gift-record.vue new file mode 100644 index 00000000..79baf53a --- /dev/null +++ b/src/pages/wechat/pages/gift/gift-record.vue @@ -0,0 +1,34 @@ + + + \ No newline at end of file diff --git a/src/pages/wechat/pages/gift/history.vue b/src/pages/wechat/pages/gift/history.vue index 127d24bb..68b7d78d 100644 --- a/src/pages/wechat/pages/gift/history.vue +++ b/src/pages/wechat/pages/gift/history.vue @@ -13,7 +13,11 @@ - + + + @@ -48,9 +52,12 @@ import { fen2yuan } from '@/sheep/hooks/useGoods'; import { formatDate } from '@/sheep/helper/utils'; import ScrollList from '@/sheep/components/scroll-list/scroll-list.vue'; import useScroll from '@/sheep/hooks/use-scroll'; - +// @ts-ignore +import BrokerageApi from '@/sheep/api/trade/brokerage'; import PayWalletApi from "@/sheep/api/pay/wallet.js" +import WithrawRecordItem from "../components/withraw-record-item.vue" + const activeTab = ref(0); const state = { @@ -63,6 +70,13 @@ const state = { } } +const { + listData: listData_withraw, + loadMoreStatus: loadMoreStatus_withraw, + refreshList: refreshList_withraw, + listLoadMore: listLoadMore_withraw, +} = useScroll(BrokerageApi.getBrokerageWithdrawPage, {}); + const { listData, loadMoreStatus: loadMoreStatus, @@ -78,17 +92,15 @@ const { } = useScroll(PayWalletApi.giftPage, state.giftParams); onShow(() => { - refreshList() + refreshList_withraw() }) const tabsChange = ({ index }) => { - if ([0, 1].includes(index)) { - if (index == 0) { - state.queryParams.type = 1 - } - if (index == 1) { - state.queryParams.type = 2 - } + state.queryParams.type = null + if ([0].includes(index)) { + refreshList_withraw() + } else if ([1].includes(index)) { + state.queryParams.type = 2 refreshList() } else if ([2].includes(index)) { refreshList_gift() diff --git a/src/pages/wechat/pages/gift/index.vue b/src/pages/wechat/pages/gift/index.vue index eeb1c26d..4345589d 100644 --- a/src/pages/wechat/pages/gift/index.vue +++ b/src/pages/wechat/pages/gift/index.vue @@ -2,9 +2,18 @@ @@ -79,11 +88,14 @@ const state = reactive({ } }) -onLoad(() => { +const userWallet = computed(() => sheep.$store('user').userWallet); + +onLoad((options) => { getTxConfig() }) onShow(() => { + getWallet(); refreshList() getWithdrawableAmount() getChatConfig() @@ -100,7 +112,9 @@ const { bindWechatNum, open } = useBindWechat(() => { getTxConfig() }) - +const getWallet = () => { + sheep.$store('user').getWallet(); +}; // 查询可以提现的礼物金额 const getWithdrawableAmount = async () => { diff --git a/src/pages/wechat/pages/withdraw.vue b/src/pages/wechat/pages/withdraw.vue index bb3f066f..75bc7017 100644 --- a/src/pages/wechat/pages/withdraw.vue +++ b/src/pages/wechat/pages/withdraw.vue @@ -6,7 +6,6 @@ - - @@ -29,7 +27,16 @@ placeholder="请输入提现金额" /> - 可提现金额{{ fen2yuanSimple(state.summary.brokeragePrice) }}元 + + 可提现金额 + {{ fen2yuanSimple(state.maxPrice) }} + 元 + + 缘豆合计 + {{ ydPrice }} + 元 + + 全部提现 @@ -62,7 +69,7 @@ diff --git a/src/sheep/api/member/recent.ts b/src/sheep/api/member/recent.ts index 64d6e1fe..fa59f4c1 100644 --- a/src/sheep/api/member/recent.ts +++ b/src/sheep/api/member/recent.ts @@ -553,6 +553,33 @@ const RecentApi = { }, }); }, + + // 礼物申请提现 + walletTxGiftApply: (data: any) => { + return request({ + url: '/pay/wallet-tx-auth/gift/apply', + method: 'POST', + data, + }); + }, + + // 礼物提现记录 + walletTxGiftPage: (params: any) => { + return request({ + url: '/pay/wallet-tx-auth/gift/page', + method: 'GET', + params, + }); + }, + + // 礼物提现记录 + walletTxGiftDetail: (params: any) => { + return request({ + url: '/pay/wallet-tx-auth/detail', + method: 'GET', + params, + }); + }, }; export default RecentApi;