From e1780be833d9799691f032b907230869bdc7f316 Mon Sep 17 00:00:00 2001 From: "453530270@qq.com" Date: Wed, 30 Aug 2023 06:34:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=9D=E7=BA=A7=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/base/mine.vue | 168 +++++++++++++++++++++++--------------------- 1 file changed, 86 insertions(+), 82 deletions(-) diff --git a/pages/base/mine.vue b/pages/base/mine.vue index 256fe4a..aad195c 100644 --- a/pages/base/mine.vue +++ b/pages/base/mine.vue @@ -33,7 +33,7 @@ }} - @@ -264,92 +264,96 @@ import Contract from "@/api/contract.js"; import Profile from "@/api/profile"; export default { - name: "mine", - data() { - return { - userInfo: {}, - account: {}, - list: [], - tabActive: 0, // 切换选择 - searchText: "", - hide: false, - show: false, - accountDetail: {}, - scrollTop: 0, - refreshing: false, - otc: {}, - status: 0, - }; + name: "mine", + data() { + return { + userInfo: {}, + account: {}, + list: [], + tabActive: 0, // 切换选择 + searchText: "", + hide: false, + show: false, + accountDetail: {}, + scrollTop: 0, + refreshing: false, + otc: {}, + status: 0, + user_auth_level: 0, + }; + }, + computed: { + ...mapState({ + hideMoney: "hideMoney", + theme: "theme", + }), + }, + props: { + isShow: { + default: true, + type: Boolean, + required: false, }, - computed: { - ...mapState({ - hideMoney: "hideMoney", - theme: "theme", - }), + refresherEnabled: { + default: true, + required: false, + type: Boolean }, - props: { - isShow: { - default: true, - type: Boolean, - required: false, - }, - refresherEnabled: { - default: true, - required: false, - type: Boolean - }, + }, + watch: { + isShow(n, o) { + if (n) { + this.upDateData(); + this.getAuthInfo();//刷新this.user_auth_level + } }, - watch: { - isShow(n, o) { - if (n) { - this.upDateData(); - } - }, - tabActive() { - this.upDateData(); - } + tabActive() { + this.upDateData(); + } + }, + filters: { + priceDecimals(val) { + console.info(val); + return (parseFloat(val)).toFixed(2) + } + }, + methods: { + getAuthInfo() { + + Profile.getAuthInfo().then(res => { + // this.detail = res.data + this.status = res.data.status + this.user_auth_level = res.data.primary_status + console.log(this.status, '9999') + console.log(res.data, '8888') + console.log(this.user_auth_level, '7777') + }) }, - filters: { - priceDecimals(val) { - console.info(val); - return (parseFloat(val)).toFixed(2) - } + onRefresh() { + if (this.refreshing) return; + this.refreshing = true; + this.fundAccount() + this.personalAssets() + setTimeout(() => { + this.refreshing = false; + }, 1000) }, - methods: { - getAuthInfo() { - - Profile.getAuthInfo().then(res => { - // this.detail = res.data - this.status = res.data.status - console.log(this.status, '9999') - console.log(res.data, '9999') - }) - }, - onRefresh() { - if (this.refreshing) return; - this.refreshing = true; - this.fundAccount() - this.personalAssets() - setTimeout(() => { - this.refreshing = false; - }, 1000) - }, - scroll(event) { - this.scrollTop = event.detail.scrollTop - }, - omitTo: math.omitTo, - // 计算和 - add: math.add, - ...mapActions({ - setHide: "hideMoney", - }), - filterMoney(val, type) { - if (this.hideMoney) return "******"; - if (type) { - return this.omitTo(val, 8); - } else { - return this.omitTo(val, 2); - } + scroll(event) { + this.scrollTop = event.detail.scrollTop + }, + omitTo: math.omitTo, + // 计算和 + add: math.add, + ...mapActions({ + setHide: "hideMoney", + }), + filterMoney(val, type) { + if (this.hideMoney) return "******"; + if (type) { + return this.omitTo(val, 8); + } else { + return this.omitTo(val, 2); + } },