登录传code

version/0412
fanfan 1 year ago
parent 4faa31831e
commit e7275b472a
  1. 1
      pages/login/components/mp-weixin-mobile.vue
  2. 13
      pages/login/index.vue

@ -59,7 +59,6 @@
}
if (detail.errMsg == 'getPhoneNumber:ok') {
app.isLoading = true
console.log(1111)
store.dispatch('LoginMpWxMobile', {
code: app.code,
encryptedData: detail.encryptedData,

@ -127,20 +127,27 @@
this.$toast('请输入验证码')
return
}
const that = this;
store.dispatch('Login', {
uni.login({
provider: 'weixin',
success: function(res) {
const that = this;
store.dispatch('Login', {
smsCode: that.semCode,
mobile: that.phoneNum,
refereeId: this.refereeId,
isParty: false,
partyData: {},
refereeId: false
ucode:res.code
// refereeId: false
}).then(res => {
uni.setStorageSync('token', res.data.token)
that.$toast(res.message)
that.getUserInfo()
setTimeout(() => that.onNavigateBack(1), 2000)
})
}
});
},
getUserInfo() {
UserApi.info()

Loading…
Cancel
Save