This commit is contained in:
zmj 2024-05-16 18:03:25 +08:00
parent 22fded1bee
commit 8f28955f44
4 changed files with 32 additions and 11 deletions

View File

@ -37,6 +37,10 @@
</up-form-item>
</up-form>
</view>
<view class="" style="margin-top: 20rpx;color: red;" v-if="false">
审核失败,请重新提交审核
</view>
<view class="submit-btn">
<up-button text="提交绑定" @click="submit" shape="circle" color="#50C758"></up-button>
</view>
@ -78,6 +82,9 @@
bindCradApi,
amountAccountApi
} from "@/api/balance.js"
import {
onPullDownRefresh
} from "@dcloudio/uni-app"
import {
ref,
reactive
@ -95,10 +102,13 @@
}
const bank_list = ref([])
const getBanlance = () => {
const getBanlance = (refresh) => {
amountAccountApi().then(res => {
bank_list.value = res.data.bank_list
getFormData(form, res.data.bank_list[0])
if (refresh) {
uni.stopPullDownRefresh();
}
})
}
getBanlance()
@ -123,7 +133,6 @@
form.value = {}
return
}
form.name = target.name || ''
form.bank_id = target.bank_id || ''
form.bank_name = target.bank_name || ''
@ -171,6 +180,11 @@
}
getBankList()
onPullDownRefresh(() => {
getBanlance(true)
// getBanlance(true)
})
</script>

View File

@ -79,6 +79,9 @@
ref,
reactive
} from 'vue';
import {
onPullDownRefresh
} from "@dcloudio/uni-app"
const emptyText = '您尚未绑定提现账户,\n点击右上角"添加账户"'
const showPop1 = ref(false)
@ -117,12 +120,14 @@
const bank_list = ref([])
const balance = ref(0.00)
const target_bank = ref([])
const getBanlance = () => {
const getBanlance = (isAsync) => {
amountAccountApi().then(res => {
balance.value = res.data.balance
bank_list.value = res.data.bank_list
target_bank.value = res.data.bank_list[0] || {}
console.log(target_bank.value)
if (isAsync) {
uni.stopPullDownRefresh();
}
})
}
getBanlance()
@ -142,9 +147,11 @@
})
})
}
getBankList()
onPullDownRefresh(() => {
getBanlance(true)
})
</script>
<style lang="scss">

View File

@ -114,21 +114,21 @@
"path": "Balance/index",
"style": {
"navigationBarTitleText": "我的余额",
"enablePullDownRefresh": false
"enablePullDownRefresh": true
}
},
{
"path": "Balance/bindAccout",
"style": {
"navigationBarTitleText": "绑定账户",
"enablePullDownRefresh": false
"enablePullDownRefresh": true
}
},
{
"path": "Balance/detail",
"style": {
"navigationBarTitleText": "明细",
"enablePullDownRefresh": false
"enablePullDownRefresh": true
}
},
{

View File

@ -25,7 +25,7 @@ const useUserStore = defineStore("user", () => {
// #ifdef H5
token.value = "16d487cfde6bceefdfcb28d2f1d52bf8"
token.value = "356b6f0615184692de99df42b9329749"
// token.value = "95b24dd6d2dda836fe07854b08ba0944"
userInfo.value = {
avatar: "https://lihaiim.oss-cn-chengdu.aliyuncs.com/image/admin/default_avatar.png",
@ -35,7 +35,7 @@ const useUserStore = defineStore("user", () => {
mobile: "19330904744",
nickname: "用户1714964250",
supplier: null,
token: "16d487cfde6bceefdfcb28d2f1d52bf8"
token: "356b6f0615184692de99df42b9329749"
}
// #endif