main
liudan 2 years ago
parent 8380524d80
commit fb1cd5b0d1
  1. 36
      pages/login.vue

@ -176,16 +176,46 @@
},
async smsLogin(){
let res = await this.$api.base.smsLogin({
let userInfo = await this.$api.base.smsLogin({
phone:this.phone,
code:this.code
})
console.log(res,"---")
console.log(userInfo,"---")
this.$util.showLoading({
title: "登录中..."
})
try {
this.toLogin(res)
// let user_info = await this.$api.base.appLogin({
// data: userInfo
// })
this.updateUserItem({
key: 'appLogin',
val: userInfo
})
let {
autograph,
data
} = userInfo
this.$util.hideAll()
this.updateUserItem({
key: 'userInfo',
val: data
})
this.updateUserItem({
key: 'autograph',
val: autograph
})
if (!this.configInfo.id) {
await this.getConfigInfo()
}
let {
phone = ''
} = data
phone = 1
this.$util.goUrl({
url: phone ? `/pages/service` : `/user/pages/phone`,
openType: `reLaunch`
})
} catch (e) {
this.$util.hideAll()
}

Loading…
Cancel
Save