Commit eab38489 authored by 俞嘉婷's avatar 俞嘉婷

feat: 首页接口请求时机调整

parent 824456cf
......@@ -28,6 +28,7 @@ ComponentWithStore({
},
canIUseGetUserProfile: wx.canIUse('getUserProfile'),
canIUseNicknameComp: wx.canIUse('input.type.nickname'),
isFirstIndex: true,
},
created() {
// 登录
......@@ -37,15 +38,16 @@ ComponentWithStore({
// 发送 res.code 到后台换取 openId, sessionKey, unionId
await dbLogin({code: res.code});
await this.updateHomeInfo();
const {channel, city} = this.options || {};
store.paramsObj = {channel, city};
this.setData({ isFirstIndex: false })
},
});
},
methods: {
async onShow() {
store.doLog(507, 10)
await this.updateHomeInfo();
const {channel, city} = this.options || {};
store.paramsObj = {channel, city};
if (!this.data.isFirstIndex) await this.updateHomeInfo();
},
getPhoneNumber(e: any) {
console.log(e.detail)
......
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