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,9 +66,10 @@ export default { return { ifshow: false, tel: "", - yzm:"", - yztoken:"", - Verification:"" + yzm: "", + yztoken: "", + Verification: "", + ifsign: false }; }, methods: { @@ -63,41 +79,73 @@ export default { off() { this.ifshow = false; }, + 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 - }).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; - 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) + 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 + }); } - window.console.log( t.yztoken,t.Verification,9652) + + window.console.log(t.yztoken, t.Verification, 9652); } } }; @@ -173,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; 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