From 8f28955f44b5f357f2fdfa28f3a2a5b63983404e Mon Sep 17 00:00:00 2001 From: zmj <1493694146@qq.com> Date: Thu, 16 May 2024 18:03:25 +0800 Subject: [PATCH] add --- pageQuota/Balance/bindAccout.vue | 18 ++++++++++++++++-- pageQuota/Balance/index.vue | 15 +++++++++++---- pages.json | 6 +++--- store/user.js | 4 ++-- 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/pageQuota/Balance/bindAccout.vue b/pageQuota/Balance/bindAccout.vue index fa69f8b..c01cb74 100644 --- a/pageQuota/Balance/bindAccout.vue +++ b/pageQuota/Balance/bindAccout.vue @@ -37,6 +37,10 @@ + + 审核失败,请重新提交审核 + + @@ -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) + }) diff --git a/pageQuota/Balance/index.vue b/pageQuota/Balance/index.vue index 63c995c..9c70a26 100644 --- a/pageQuota/Balance/index.vue +++ b/pageQuota/Balance/index.vue @@ -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) + })