From fb1cd5b0d113fa8318c06b2d6ca7e0e6b53d270c Mon Sep 17 00:00:00 2001 From: liudan <18634735655@163.com> Date: Fri, 19 May 2023 15:20:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/login.vue | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) 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() }