Commit 032c7068 authored by ziyu's avatar ziyu

Merge branch 'master' of git.quantgroup.cn:ui/mini-program-wepy into feature/optimize

parents c021e069 1b8b2769
...@@ -404,7 +404,6 @@ ...@@ -404,7 +404,6 @@
async getUserInfo (e) { async getUserInfo (e) {
if (e.$wx.detail.userInfo) { if (e.$wx.detail.userInfo) {
this.setUserInfo(e.$wx.detail.userInfo); this.setUserInfo(e.$wx.detail.userInfo);
await this.getMainInfo();
this.authmodal = false; this.authmodal = false;
this.registUser(e.$wx.detail.userInfo); this.registUser(e.$wx.detail.userInfo);
} }
...@@ -558,8 +557,11 @@ ...@@ -558,8 +557,11 @@
} }
} }
}, },
async onLoad (options) {
if (options.openid) {
this.inviter = options.openid;
}
async created () {
let self = this; let self = this;
let statusHeight = this.$app.$options.globalData.statusBarHeight || ''; let statusHeight = this.$app.$options.globalData.statusBarHeight || '';
statusHeight && (this.userImgStyle = 'top:' + statusHeight + 'px'); statusHeight && (this.userImgStyle = 'top:' + statusHeight + 'px');
...@@ -573,12 +575,9 @@ ...@@ -573,12 +575,9 @@
} }
}); });
} }
await this.getMainInfo();
this.videoList = await getPrizeList(); this.videoList = await getPrizeList();
},
async onLoad (options) {
if (options.openid) {
this.inviter = options.openid;
}
// 如果已经存在store里就不用再获取用户信息了 // 如果已经存在store里就不用再获取用户信息了
this.adlist = await getActivityFeed({ count: 50 }); this.adlist = await getActivityFeed({ count: 50 });
if (!this.userInfo) { if (!this.userInfo) {
...@@ -587,7 +586,6 @@ ...@@ -587,7 +586,6 @@
const { userInfo } = await wepy.wx.getUserInfo(); const { userInfo } = await wepy.wx.getUserInfo();
this.setUserInfo(userInfo); this.setUserInfo(userInfo);
this.registUser(userInfo); this.registUser(userInfo);
await this.getMainInfo();
} else { } else {
this.authmodal = true; this.authmodal = true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment