From 319b6fb7e63bce9b6840cc4ed02b2943a488a9c2 Mon Sep 17 00:00:00 2001 From: asd Date: Thu, 28 Nov 2019 11:19:20 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=B3=A8=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/login.vue | 24 ++++- src/loginpwd.vue | 19 +++- src/router.js | 7 +- src/sign.vue | 233 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 275 insertions(+), 8 deletions(-) create mode 100644 src/sign.vue diff --git a/src/login.vue b/src/login.vue index ecf412e..cece13f 100644 --- a/src/login.vue +++ b/src/login.vue @@ -20,7 +20,7 @@
-

密码登录

+

密码登录

需要帮助?

@@ -53,7 +53,8 @@ export default { tel: "", yzm:"", yztoken:"", - Verification:"" + Verification:"", + ifsign:false }; }, methods: { @@ -63,6 +64,11 @@ export default { off() { this.ifshow = false; }, + loginpwd(){ + this.$router.push({ + path: `/loginpwd`, + }) + }, yz() { let yz="" if (this.tel != "") { @@ -74,6 +80,7 @@ export default { window.console.log(res.data.data); yz=res.data.data.yz; t.yztoken=yz + t.ifsign=res.data.data.register }).catch(function(error) { window.console.log(error); }); @@ -84,12 +91,17 @@ export default { }, sub(){ let t=this; - if(t.tel&&t.yzm){ + window.console.log(t.ifsign,4859) + if(t.ifsign){ + 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) + this.$router.push({ + path: `/index`, + }) }) } window.console.log(res) @@ -97,6 +109,12 @@ export default { window.console.log(err) }) } + }else{ + this.$router.push({ + path: `/sign?yztoken=`+t.yztoken+'&yzm='+t.yzm+'&tel='+t.tel, + }) + } + window.console.log( t.yztoken,t.Verification,9652) } } diff --git a/src/loginpwd.vue b/src/loginpwd.vue index 8327423..7a1d9ae 100644 --- a/src/loginpwd.vue +++ b/src/loginpwd.vue @@ -10,18 +10,18 @@
-->
- +
- +

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

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

- +

密码登录

需要帮助?

@@ -52,7 +52,9 @@ export default { data() { return { - ifshow: false + ifshow: false, + username:"", + pwd:"" }; }, methods: { @@ -61,6 +63,15 @@ export default { }, off(){ this.ifshow=false + }, + sub(){ + let t=this; + this.axios.post("http://lawpro.earnest.pro/api/Main/login",{uname:t.username,password:t.pwd}).then((res)=>{ + localStorage.setItem('token', res.data.data) + this.$router.push({ + path: `/index`, + }) + }) } } }; diff --git a/src/router.js b/src/router.js index 66e3ba0..7bc237a 100644 --- a/src/router.js +++ b/src/router.js @@ -15,10 +15,15 @@ import IndexReport from "./IndexReport" import IndexReport1 from "./IndexReport1" import IndexReport2 from "./IndexReport2" import Answer from "./Answer" +import sign from "./sign" const router=new Router({ routes: [ { - path: '/', + path: '/sign', + component: sign + }, + { + path: '/IndexReport', component: IndexReport }, { diff --git a/src/sign.vue b/src/sign.vue new file mode 100644 index 0000000..96cafc1 --- /dev/null +++ b/src/sign.vue @@ -0,0 +1,233 @@ + + + + + \ No newline at end of file From 26b7298422c9b5708647f052f5369eb298688946 Mon Sep 17 00:00:00 2001 From: asd Date: Thu, 28 Nov 2019 11:31:43 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=99=BB=E5=BD=95fin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/login.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/login.vue b/src/login.vue index cece13f..2646384 100644 --- a/src/login.vue +++ b/src/login.vue @@ -19,10 +19,10 @@

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

-
+
@@ -31,8 +31,8 @@
- - +
From 2ddcf19dadddbc05e4b96f50ad732b9f4b1bc288 Mon Sep 17 00:00:00 2001 From: asd Date: Thu, 28 Nov 2019 17:54:59 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/IndexFind.vue | 98 +++++++++++++++++--- src/components/indexfindall.vue | 151 ++++++++++++++++--------------- src/components/indexfindhead.vue | 17 +++- src/components/indexfinduser.vue | 36 +++++++- src/components/indexhead.vue | 31 ++++--- 5 files changed, 227 insertions(+), 106 deletions(-) diff --git a/src/IndexFind.vue b/src/IndexFind.vue index 0a9eaee..939690b 100644 --- a/src/IndexFind.vue +++ b/src/IndexFind.vue @@ -1,22 +1,22 @@ @@ -49,17 +53,83 @@ components:{ indexfindtab, indexfindall, indedfinduser +}, +mounted(){ + // http://lawpro.earnest.pro/uploads/20191121/145e1911017ac255f25d6eb760d0bb4c.jpg + var t=this; + t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:t.$route.query.word,type:0}).then((res)=>{ + window.console.log(res) + for(let i in res.data.data){ + res.data.data[i].avatar= res.data.data[i].avatar.substr(1) + res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar + } + t.list=res.data.data + }) + + t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:t.$route.query.word,type:5}).then((res)=>{ + window.console.log(res) + for(let i in res.data.data){ + res.data.data[i].avatar= res.data.data[i].avatar.substr(1) + res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar + } + t.list2=res.data.data + }) + + t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:t.$route.query.word,type:2}).then((res)=>{ + window.console.log(res) + for(let i in res.data.data){ + res.data.data[i].img= res.data.data[i].img.substr(1) + res.data.data[i].img= "http://lawpro.earnest.pro/"+res.data.data[i].img + } + t.list3=res.data.data + }) + + }, methods:{ getno(e){ window.console.log(e) this.no=e + }, + serch(e){ + let t=this; + window.console.log(e) + t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:e,type:0}).then((res)=>{ + window.console.log(res) + for(let i in res.data.data){ + res.data.data[i].avatar= res.data.data[i].avatar.substr(1) + res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar + } + t.list=res.data.data + }) + + + t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:e,type:2}).then((res)=>{ + window.console.log(res) + for(let i in res.data.data){ + res.data.data[i].img= res.data.data[i].img.substr(1) + res.data.data[i].img= "http://lawpro.earnest.pro/"+res.data.data[i].img + } + t.list3=res.data.data + }) + t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:e,type:5}).then((res)=>{ + window.console.log(res) + for(let i in res.data.data){ + res.data.data[i].avatar= res.data.data[i].avatar.substr(1) + res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar + } + t.list2=res.data.data + }) } }, data(){ return { pics, - no:0 + no:0, + list:[], + list1:[], + list2:[], + list3:[] } } } diff --git a/src/components/indexfindall.vue b/src/components/indexfindall.vue index 2bc9709..77b75f9 100644 --- a/src/components/indexfindall.vue +++ b/src/components/indexfindall.vue @@ -1,102 +1,109 @@ \ No newline at end of file diff --git a/src/components/indexfindhead.vue b/src/components/indexfindhead.vue index c7baecb..3a5fa0b 100644 --- a/src/components/indexfindhead.vue +++ b/src/components/indexfindhead.vue @@ -12,7 +12,7 @@
+
-->
@@ -30,9 +30,24 @@
- + + +
+ + + + + +
+ + -->
@@ -51,10 +66,10 @@ export default { return { ifshow: false, tel: "", - yzm:"", - yztoken:"", - Verification:"", - ifsign:false + yzm: "", + yztoken: "", + Verification: "", + ifsign: false }; }, methods: { @@ -64,58 +79,73 @@ export default { off() { this.ifshow = false; }, - loginpwd(){ - this.$router.push({ - path: `/loginpwd`, - }) + loginpwd() { + this.$router.push({ + path: `/loginpwd` + }); }, yz() { - let 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) { + 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 - t.ifsign=res.data.data.register - }).catch(function(error) { + yz = res.data.data.yz; + t.yztoken = yz; + t.ifsign = res.data.data.register; + }) + .catch(function(error) { window.console.log(error); }); } else { window.console.log("请输入正确的手机号"); } - }, - sub(){ - let t=this; - window.console.log(t.ifsign,4859) - if(t.ifsign){ - 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) - this.$router.push({ - path: `/index`, - }) + sub() { + let t = this; + window.console.log(t.ifsign, 4859); + if (t.ifsign) { + if (t.tel && t.yzm) { + this.axios + .post("http://lawpro.earnest.pro/api/Main/isVerification", { + Verification: t.yzm, + yz: this.yztoken, + mobile: this.tel }) - } - window.console.log(res) - }).catch((err)=>{ - window.console.log(err) - }) + .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); + this.$router.push({ + path: `/index` + }); + }); + } + window.console.log(res); + }) + .catch(err => { + window.console.log(err); + }); + } + } else { + this.$router.push({ + path: `/sign?yztoken=` + t.yztoken + "&yzm=" + t.yzm + "&tel=" + t.tel + }); } - }else{ - this.$router.push({ - 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); } } }; @@ -191,7 +221,7 @@ export default { justify-content: space-between; } .getyzm { - width: 176px!important; + width: 176px !important; height: 54px; border: 2px solid rgba(107, 145, 71, 1); border-radius: 4px;