yujialong 3 months ago
parent b10ac742a8
commit c517c9b03b
  1. 4
      pages/login/login.vue
  2. 2
      user/reg/reg.vue
  3. 2
      user/selectAccount/selectAccount.vue

@ -29,6 +29,7 @@
sessionKey: '',
openid: '',
unionid: '',
unionid: '',
submiting: false,
}
},
@ -51,8 +52,10 @@
const e = data.sessionKey
this.sessionKey = e.session_key
this.openid = e.openid
this.unionid = e.unionid || ''
uni.setStorageSync('sessionKey', e.session_key)
uni.setStorageSync('openid', e.openid)
uni.setStorageSync('unionid', e.unionid || '')
} catch (e) {}
} else {
that.$util.errMsg('登录失败!')
@ -72,6 +75,7 @@
uni.setStorageSync('phone', phone)
const { data } = await studentBinding({
openid: this.openid,
unionid: this.unionid,
phone,
platformId: 1
})

@ -19,6 +19,7 @@
data() {
return {
openid: uni.getStorageSync('openid'),
unionid: uni.getStorageSync('unionid'),
phone: uni.getStorageSync('phone'),
form: {
account: '',
@ -40,6 +41,7 @@
const { data } = await weChatToken({
...form,
openid: this.openid,
unionid: this.unionid,
phone: this.phone,
platformId: 1,
})

@ -26,6 +26,7 @@
return {
openid: '',
phone: uni.getStorageSync('phone'),
unionid: uni.getStorageSync('unionid'),
accounts: JSON.parse(uni.getStorageSync('accounts')),
}
},
@ -40,6 +41,7 @@
const { data } = await weChatToken({
id: item.id,
openid: this.openid,
unionid: this.unionid,
phone: item.phone,
platformId: 1,
})

Loading…
Cancel
Save