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 @@