zhengjie #30

Manually merged
asd merged 2 commits from zhengjie into master 2019-11-29 02:37:11 +00:00
Showing only changes of commit 5e1038cf23 - Show all commits

View File

@ -30,7 +30,22 @@
<div class="line"></div> <div class="line"></div>
</div> </div>
<div class="icons"> <div class="icons">
<!-- <div>
<img src="./assets/wechat.png" alt class="icon" /> <img src="./assets/wechat.png" alt class="icon" />
</div>-->
<div>
<!-- <a
href="https://open.weixin.qq.com/connect/qrconnect?appid=wxfe6e5d36322af62f&redirect_uri=http%3a%2f%2fwww.lawpro.cn%2f&response_type=code&scope=snsapi_login&state=lawpro#wechat_redirect"
> -->
<a
href="https://open.weixin.qq.com/connect/qrconnect?appid=wxfe6e5d36322af62f&redirect_uri=http%3a%2f%2fwww.lawpro.cn%2f&response_type=code&scope=snsapi_login&state=lawpro#wechat_redirect"
>
<!-- <i class="icon-wechatl"></i>微信 -->
<img src="./assets/wechat.png" alt class="icon" />
</a>
</div>
<!-- <img src="./assets/weibo.png" alt class="icon" /> <!-- <img src="./assets/weibo.png" alt class="icon" />
<img src="./assets/qq.png" alt class="icon" />--> <img src="./assets/qq.png" alt class="icon" />-->
</div> </div>
@ -66,56 +81,71 @@ export default {
}, },
loginpwd() { loginpwd() {
this.$router.push({ this.$router.push({
path: `/loginpwd`, path: `/loginpwd`
}) });
}, },
yz() { yz() {
let yz="" let yz = "";
if (this.tel != "") { if (this.tel != "") {
window.console.log("aaaa"); window.console.log("aaaa");
var t =this var t = this;
this.axios.post("http://lawpro.earnest.pro/api/Main/Verification", { this.axios
.post("http://lawpro.earnest.pro/api/Main/Verification", {
mobile: this.tel mobile: this.tel
}).then(function(res) { })
.then(function(res) {
window.console.log(res.data.data); window.console.log(res.data.data);
yz = res.data.data.yz; yz = res.data.data.yz;
t.yztoken=yz t.yztoken = yz;
t.ifsign=res.data.data.register t.ifsign = res.data.data.register;
}).catch(function(error) { })
.catch(function(error) {
window.console.log(error); window.console.log(error);
}); });
} else { } else {
window.console.log("请输入正确的手机号"); window.console.log("请输入正确的手机号");
} }
}, },
sub() { sub() {
let t = this; let t = this;
window.console.log(t.ifsign,4859) window.console.log(t.ifsign, 4859);
if (t.ifsign) { if (t.ifsign) {
if (t.tel && t.yzm) { 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)=>{ 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) { 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)=>{ this.axios
window.console.log(res) .post("http://lawpro.earnest.pro/api/Main/sign", {
localStorage.setItem('token', res.data.data) yz: t.yztoken,
Verification: t.yzm,
mobile: this.tel
})
.then(res => {
window.console.log(res);
localStorage.setItem("token", res.data.data);
this.$router.push({ this.$router.push({
path: `/index`, path: `/index`
}) });
}) });
} }
window.console.log(res) window.console.log(res);
}).catch((err)=>{
window.console.log(err)
}) })
.catch(err => {
window.console.log(err);
});
} }
} else { } else {
this.$router.push({ this.$router.push({
path: `/sign?yztoken=`+t.yztoken+'&yzm='+t.yzm+'&tel='+t.tel, path: `/sign?yztoken=` + t.yztoken + "&yzm=" + t.yzm + "&tel=" + t.tel
}) });
} }
window.console.log( t.yztoken,t.Verification,9652) window.console.log(t.yztoken, t.Verification, 9652);
} }
} }
}; };