Commit 10dfbccc authored by haiyoucuv's avatar haiyoucuv

init

parent e2f48a88
......@@ -10,12 +10,12 @@ App<IAppOption>({
wx.setStorageSync('logs', logs)
// 登录
wx.login({
success: async (res) => {
console.log(res.code)
// 发送 res.code 到后台换取 openId, sessionKey, unionId
await dbLogin({code: res.code});
},
})
// wx.login({
// success: async (res) => {
// console.log(res.code)
// // 发送 res.code 到后台换取 openId, sessionKey, unionId
// await dbLogin({code: res.code});
// },
// })
},
})
\ No newline at end of file
......@@ -32,7 +32,15 @@ ComponentWithStore({
methods: {
async onShow() {
store.doLog(507, 10)
await this.updateHomeInfo();
// 登录
wx.login({
success: async (res) => {
console.log(res.code)
// 发送 res.code 到后台换取 openId, sessionKey, unionId
await dbLogin({code: res.code});
await this.updateHomeInfo();
},
});
const {channel, city} = this.options || {};
store.paramsObj = {channel, city};
},
......
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