From c77f0ee235bf7718817b14402a6073df8884e638 Mon Sep 17 00:00:00 2001 From: Enzo <1284707383@qq.com> Date: Fri, 30 Jul 2021 16:55:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/api.js | 5 ++++- pages/order/refund_detail.vue | 2 +- pages/user/user.vue | 7 ++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/common/api.js b/common/api.js index b570d82..ac904a0 100644 --- a/common/api.js +++ b/common/api.js @@ -49,7 +49,10 @@ export const API_CHECKNEWS = '/api/message/read'; //消息标记为已读 export const API_RECOMMOND = '/api/agent_product/recommend'; //我的推荐列表 //用户信息 -export const API_GETUSERINFO = '/api/user/profile'; //获取用户消息 +export const API_GETUSERINFO = '/api/user/profile'; //设置用户消息 + +export const API_SETUSDRINFO = '/api/user/info'; //我的页面获取用户信息 + //订单 export const API_ORDERLIST = '/api/order/list'; //订单列表 diff --git a/pages/order/refund_detail.vue b/pages/order/refund_detail.vue index 980ca28..bb72c34 100644 --- a/pages/order/refund_detail.vue +++ b/pages/order/refund_detail.vue @@ -40,7 +40,7 @@ 退款说明 - {{orderDetails.refund_info.desc}} + {{orderDetails.refund_info.desc}} 暂无退款说明 diff --git a/pages/user/user.vue b/pages/user/user.vue index 75241c1..007903c 100644 --- a/pages/user/user.vue +++ b/pages/user/user.vue @@ -163,7 +163,6 @@ // 检查当前用户登录状态 verifyUserInfo(){ let userInfo = uni.getStorageSync('userinfo') || {}; - this.userInfo = uni.getStorageSync('userinfo') || {} if(!userInfo.id || !userInfo.nickname || !userInfo.avatar){ if(this.showLogin){ this.showLogin = false; @@ -174,6 +173,11 @@ } } }, + getUserInfo() { + this.$http(this.API.API_SETUSDRINFO).then(res => { + this.userInfo = res.data + }).catch(err => {}) + }, getRecommond() { this.$http(this.API.API_RECOMMOND,{page: this.page}).then(res => { let isPage = res.data.next_page_url == null?false:true; @@ -211,6 +215,7 @@ onShow() { this.verifyUserInfo() this.getRecommond() + this.getUserInfo() } }