Merge branch 'zhengjie' of pplokijuhyg/falvpingtai into master

This commit is contained in:
asd 2019-11-28 09:54:53 +08:00
commit 643e692bdc

View File

@ -7,18 +7,18 @@
<p>+86</p> <p>+86</p>
<img src="./assets/order.png" alt class="order" /> <img src="./assets/order.png" alt class="order" />
<div class="line"></div> <div class="line"></div>
<input type="text" class="shuru" placeholder="输入手机号" /> <input type="text" class="shuru" placeholder="输入手机号" v-model="tel" />
</div> </div>
<div class="tel yzm"> <div class="tel yzm">
<input type="text" class="shuru tel1" placeholder="输入6位验证码" /> <input type="text" class="shuru tel1" placeholder="输入6位验证码" v-model="yzm"/>
<button class="getyzm">发送验证码</button> <button class="getyzm" @click="yz">发送验证码</button>
</div> </div>
<div class="ale"> <div class="ale">
<p class="alert">未注册手机验证后自动登录</p> <p class="alert">未注册手机验证后自动登录</p>
<p>注册即同意隐私保护指引</p> <p>注册即同意隐私保护指引</p>
</div> </div>
<button class="submit">登录</button> <button class="submit" @click="sub">登录</button>
<div class="other"> <div class="other">
<p>密码登录</p> <p>密码登录</p>
<p @click="open">需要帮助</p> <p @click="open">需要帮助</p>
@ -49,7 +49,11 @@
export default { export default {
data() { data() {
return { return {
ifshow: false ifshow: false,
tel: "",
yzm:"",
yztoken:"",
Verification:""
}; };
}, },
methods: { methods: {
@ -58,6 +62,42 @@ export default {
}, },
off() { off() {
this.ifshow = false; 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; justify-content: space-between;
} }
.getyzm { .getyzm {
width: 166px; width: 176px!important;
height: 54px; height: 54px;
border: 2px solid rgba(107, 145, 71, 1); border: 2px solid rgba(107, 145, 71, 1);
border-radius: 4px; border-radius: 4px;