diff --git a/pages/login.vue b/pages/login.vue index 09fbbda..0a0ed09 100644 --- a/pages/login.vue +++ b/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() }