调试接口

This commit is contained in:
wangxiaowei
2025-12-20 22:44:32 +08:00
parent fcd1e10129
commit dcf36df5aa
12 changed files with 219 additions and 130 deletions

View File

@ -30,7 +30,7 @@
</view>
<view class="flex flex-col items-center justify-start">
<view class="font-400 text-24rpx text-[#606266] text-34rpx">待提现</view>
<view class="font-bold text-32rpx text-[#303133] leading-34rpx mt-14rpx">{{ userFinance.user_money }}</view>
<view class="font-bold text-32rpx text-[#303133] leading-34rpx mt-14rpx">{{ userFinance.balance }}</view>
</view>
</view>
</view>
@ -81,7 +81,7 @@
import { router } from '@/utils/tools'
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
import useMescroll from "@/uni_modules/mescroll-uni/hooks/useMescroll.js"
import { getStoreIncomeList } from '@/api/store'
import { getStoreIncomeList, getStoreDetails } from '@/api/store'
import { useStoreStore } from '@/store'
import { getUserInfo } from '@/api/user'
@ -115,10 +115,10 @@
*/
handleGetFinanceData: async () => {
try {
const res = await getUserInfo()
userFinance.value = res
} catch(e) {
}
const res = await getStoreDetails(useStore.defaultStore.id)
userFinance.value = res.details
console.log("🚀 ~ userFinance.value:", userFinance.value)
} catch(e) { }
},
upCallback: (mescroll) => {
@ -130,7 +130,6 @@
}
getStoreIncomeList(filter).then((res) => {
console.log("🚀 ~ res:", res)
const curPageData = res.list || [] // 当前页数据
if(mescroll.num == 1) list.value = [] // 第一页需手动制空列表
list.value = list.value.concat(curPageData) //追加新数据

View File

@ -68,6 +68,21 @@
<view>
<wd-gap height="2rpx" bg-color="#F2F2F2"></wd-gap>
</view>
</view>
<!-- 提现人名称 -->
<view>
<view class="flex justify-between items-center mx-38rpx">
<view class="text-30rpx leading-42rpx text-#303133">提现人名称</view>
<view class="flex items-center">
<view >
<wd-input v-model="form.name" size="large" placeholder="请输入 提现人名称" no-border custom-input-class="!text-right" placeholderStyle="font-size: 30rpx; line-height: 42rpx; color: #c9c9c9;text-align: right;"></wd-input>
</view>
</view>
</view>
<view>
<wd-gap height="2rpx" bg-color="#F2F2F2"></wd-gap>
</view>
</view>
<!-- 验证码 -->
@ -125,6 +140,7 @@
mobile: '',
code: '',
bank_open_name: '',
name: ''
})
const Add = {

View File

@ -99,7 +99,7 @@
<script lang="ts" setup>
import { getBankCardList, withdrawApply } from '@/api/bank'
import { useUserStore } from '@/store'
import { useUserStore, useStoreStore } from '@/store'
import { toast } from '@/utils/toast'
import { amount } from '@/utils/test'
import { router } from '@/utils/tools'
@ -107,6 +107,7 @@
const OSS = inject('OSS')
const useStore = useUserStore()
const store = useStoreStore()
// 选择银行卡
const showBankCardPopup = ref<boolean>(false)
@ -128,7 +129,7 @@
height: 'calc(100vh - var(--window-top) - var(--window-bottom))'
}))
onLoad(() => {
onShow(() => {
Withdraw.getBankCardList()
})
@ -203,7 +204,7 @@
title: '提交中...'
})
try {
await withdrawApply(money, selectBank.value.id)
await withdrawApply(store.defaultStore.id, money, selectBank.value.id)
// 重新获取用户余额
const balance = await getUserInfo()
useStore.setUserMoney(Number(balance.user_money))