From a0e1ab5614689af3a37b8ba6ef047cb45837c0fa Mon Sep 17 00:00:00 2001 From: donqi Date: Tue, 17 May 2022 20:58:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84=20=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E4=BB=8E=E7=BC=93=E5=AD=98=E4=B8=AD=E8=8E=B7?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/js/request.js | 4 ++-- pages/index/my-home.vue | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/common/js/request.js b/common/js/request.js index ad87764..f3199ff 100644 --- a/common/js/request.js +++ b/common/js/request.js @@ -6,9 +6,9 @@ export default { uni.addInterceptor('request', { invoke(args) { // request 触发前拼接 url - // args.url = 'https://www.opsoul.com' + args.url; + args.url = 'https://www.opsoul.com' + args.url; // args.url = 'http://192.168.2.3:80' + args.url; - args.url = 'http://127.0.0.1:80' + args.url; + // args.url = 'http://127.0.0.1:80' + args.url; // console.log("停止触发"); // return false; }, diff --git a/pages/index/my-home.vue b/pages/index/my-home.vue index 05d03c8..d2a5b57 100644 --- a/pages/index/my-home.vue +++ b/pages/index/my-home.vue @@ -4,9 +4,9 @@ + :style="'width: 120rpx; height: 120rpx; background-image:url(' + curUserInfo.userInfo.avatarUrl + ');'"> - {{myInfo.name}} + {{curUserInfo.userInfo.nickName}} {{myInfo.vipInfo.level}}会员 @@ -244,7 +244,8 @@ components: {}, data() { return { - pageContentTop: this.CustomBar, + pageContentTop: this.CustomBar, + curUserInfo: {}, myInfo: {}, servOrderTabList: [{ type: 'ordersWait2Pay', @@ -286,9 +287,9 @@ this.loadData(); }, methods: { - async loadData() { - this.myInfo = await this.$api.data('myInfo'); - console.log(this.myInfo) + async loadData() { + this.curUserInfo = this.$request.getCurUserInfo(); + this.myInfo = await this.$api.data('myInfo'); }, showMyOrders(tabHeaderList, tabCur, orderType) { let tabInfo = {