From 57c616726fe6bdbec8a63cc3c63077ea77c211e6 Mon Sep 17 00:00:00 2001 From: asd Date: Thu, 28 Nov 2019 09:54:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=8F=96token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/login.vue | 52 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/src/login.vue b/src/login.vue index 3cb2992..ecf412e 100644 --- a/src/login.vue +++ b/src/login.vue @@ -7,18 +7,18 @@

+86

- +
- - + +

未注册手机验证后自动登录

注册即同意《隐私保护指引》

- +

密码登录

需要帮助?

@@ -49,7 +49,11 @@ export default { data() { return { - ifshow: false + ifshow: false, + tel: "", + yzm:"", + yztoken:"", + Verification:"" }; }, methods: { @@ -58,6 +62,42 @@ export default { }, off() { this.ifshow = false; + }, + yz() { + let yz="" + if (this.tel != "") { + window.console.log("aaaa"); + var t =this + this.axios.post("http://lawpro.earnest.pro/api/Main/Verification", { + mobile:this.tel + }).then(function(res) { + window.console.log(res.data.data); + yz=res.data.data.yz; + t.yztoken=yz + }).catch(function(error) { + window.console.log(error); + }); + } else { + window.console.log("请输入正确的手机号"); + } + + }, + sub(){ + let t=this; + if(t.tel&&t.yzm){ + this.axios.post("http://lawpro.earnest.pro/api/Main/isVerification",{Verification: t.yzm,yz:this.yztoken, mobile:this.tel}).then((res)=>{ + if(res.data.code==200){ + this.axios.post("http://lawpro.earnest.pro/api/Main/sign",{yz:t.yztoken,Verification:t.yzm,mobile:this.tel}).then((res)=>{ + window.console.log(res) + localStorage.setItem('token', res.data.data) + }) + } + window.console.log(res) + }).catch((err)=>{ + window.console.log(err) + }) + } + window.console.log( t.yztoken,t.Verification,9652) } } }; @@ -133,7 +173,7 @@ export default { justify-content: space-between; } .getyzm { - width: 166px; + width: 176px!important; height: 54px; border: 2px solid rgba(107, 145, 71, 1); border-radius: 4px;