From 532e0e670061f4df4fe06e2a1ec6b9471cbaab17 Mon Sep 17 00:00:00 2001 From: PQZ Date: Sat, 28 Sep 2024 17:35:06 +0800 Subject: [PATCH] 1 --- pages/my/cardRoll.vue | 18 ++++++++++++++---- pages/my/my.vue | 30 +++++++++++++++--------------- pages/my/myEquity.vue | 15 +++++++++++++-- 3 files changed, 42 insertions(+), 21 deletions(-) diff --git a/pages/my/cardRoll.vue b/pages/my/cardRoll.vue index caafcea..c758a03 100644 --- a/pages/my/cardRoll.vue +++ b/pages/my/cardRoll.vue @@ -47,7 +47,7 @@ diff --git a/pages/my/my.vue b/pages/my/my.vue index 9e52ff7..9f8650f 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -114,21 +114,21 @@ }) }, //获取当前登录用户信息 - async getServer() { - request({ - url: "/userClient/customer/getUserCustomer", - method: 'get', - params:{} - }).then(res=>{ - if(!res.data){ - uni.reLaunch({ - url: '/pages/my/register' - }) - }else{ - setUserInfo(JSON.stringify(res.data)) - this.customInfo = res.data - } - }) + async getServer() { + request({ + url: "/userClient/customer/getUserCustomer", + method: 'get', + params:{} + }).then(res=>{ + if(!res.data){ + uni.reLaunch({ + url: '/pages/my/register' + }) + }else{ + setUserInfo(JSON.stringify(res.data)) + this.customInfo = res.data + } + }) } } } diff --git a/pages/my/myEquity.vue b/pages/my/myEquity.vue index 9a96832..7780396 100644 --- a/pages/my/myEquity.vue +++ b/pages/my/myEquity.vue @@ -82,8 +82,8 @@ }, onShow(data) { //当前登录用户信息 - this.customInfo = JSON.parse(uni.getStorageSync('customerInfo')) this.getMemberList() + this.getCustomer() }, methods:{ async getMemberList() { @@ -94,7 +94,18 @@ this.levelEquityList = res.data }) - } + }, + + //获取当前登录用户信息 + async getCustomer() { + request({ + url: "/userClient/customer/getUserCustomer", + method: 'get', + params:{} + }).then(res=>{ + this.customInfo = res.data + }) + } } }