This commit is contained in:
pplokijuhyg 2019-12-26 10:41:59 +08:00
parent faeb1f9ae1
commit e738bc61b6
2 changed files with 44 additions and 15 deletions

View File

@ -21,7 +21,10 @@
></indexfindall> ></indexfindall>
</div> </div>
<div style="width:100%;height:0.5rem;text-align:center;line-height:0.3rem">{{text}}</div> <div style="width:100%;height:0.5rem;text-align:center;line-height:0.3rem">
<img :src="login" style="width:0.5rem" alt v-if="text == '加载中'" />
<span>{{text}}</span>
</div>
<!-- <div class="all1"> <!-- <div class="all1">
<indexfindall title="学法律后,对你最大的影响或改变是什么?" num="1532" :right="pics"></indexfindall> <indexfindall title="学法律后,对你最大的影响或改变是什么?" num="1532" :right="pics"></indexfindall>
</div>--> </div>-->
@ -37,7 +40,10 @@
></indedfinduser> ></indedfinduser>
</div> </div>
<div style="width:100%;height:0.5rem;text-align:center;line-height:0.3rem">{{text}}</div> <div style="width:100%;height:0.5rem;text-align:center;line-height:0.3rem;color:red">
<img :src="login" style="width:0.5rem" alt v-if="text == '加载中'"/>
<span>{{text}}</span>
</div>
<!-- <div class="user1"> <!-- <div class="user1">
<indedfinduser></indedfinduser> <indedfinduser></indedfinduser>
</div> </div>
@ -60,7 +66,11 @@
></indedfinduser> ></indedfinduser>
</div> </div>
<div style="width:100%;height:0.5rem;text-align:center;line-height:0.3rem">{{tekeyxt}}</div> <div style="width:100%;height:0.5rem;text-align:center;line-height:0.3rem">
<img :src="login" style="width:0.5rem" alt v-if="text == '加载中' " />
<span>{{text}}</span>
</div>
<!-- <div class="user1"> <!-- <div class="user1">
<indedfinduser></indedfinduser> <indedfinduser></indedfinduser>
</div>--> </div>-->
@ -75,6 +85,7 @@
import indexfindhead from "./components/indexfindhead"; import indexfindhead from "./components/indexfindhead";
import indexfindtab from "./components/indexfindtab"; import indexfindtab from "./components/indexfindtab";
import indexfindall from "./components/indexfindall"; import indexfindall from "./components/indexfindall";
import login from "./assets/login.gif";
import pics from "./assets/ad.png"; import pics from "./assets/ad.png";
import indedfinduser from "./components/indexfinduser"; import indedfinduser from "./components/indexfinduser";
export default { export default {
@ -85,13 +96,13 @@ export default {
indedfinduser indedfinduser
}, },
mounted() { mounted() {
document.title=this.$route.query.word + "-搜索" document.title = this.$route.query.word + "-搜索";
this.getlist1(); this.getlist1(0);
}, },
watch: { watch: {
no() { no() {
this.page = 0; this.page = 1;
this.dynamiclist = []; this.dynamiclist = [];
this.list = []; this.list = [];
this.lock = false; this.lock = false;
@ -105,11 +116,11 @@ export default {
}, },
computed: { computed: {
keys() { keys() {
return this.$route.query.word return this.$route.query.word;
} }
}, },
methods: { methods: {
getlist1() { getlist1(e) {
let t = this; let t = this;
t.list = []; t.list = [];
t.axios t.axios
@ -120,7 +131,11 @@ export default {
}) })
.then(res => { .then(res => {
if (res.data.data) { if (res.data.data) {
if(t.no == e){
t.list = res.data.data; t.list = res.data.data;
}else{
return ;
}
window.console.log(t.list.length, "hfihaifohog"); window.console.log(t.list.length, "hfihaifohog");
if (t.list.length < 5) { if (t.list.length < 5) {
t.text = "暂无相关数据"; t.text = "暂无相关数据";
@ -134,7 +149,7 @@ export default {
// do something // do something
// alert(2); // alert(2);
window.console.log(1); window.console.log(1);
t.getlist(); t.getlist(e);
} }
}); });
} else { } else {
@ -143,7 +158,7 @@ export default {
} }
}); });
}, },
getlist() { getlist(e) {
if (this.lock) { if (this.lock) {
return "lock"; return "lock";
} }
@ -160,8 +175,14 @@ export default {
window.console.log(res); window.console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
if (res.data.data) { if (res.data.data) {
if(t.no == e){
t.list = t.list.concat(res.data.data); t.list = t.list.concat(res.data.data);
}else{
return ;
} }
}
t.lock = false; t.lock = false;
window.$(window).scroll(() => { window.$(window).scroll(() => {
var windowH = window.$(window).height(); // var windowH = window.$(window).height(); //
@ -185,7 +206,7 @@ export default {
window.console.log(e); window.console.log(e);
this.no = e; this.no = e;
this.list = []; this.list = [];
this.getlist1(); this.getlist1(e);
window.console.log(this.list.length, "list"); window.console.log(this.list.length, "list");
}, },
todetail(e, type) { todetail(e, type) {
@ -266,9 +287,10 @@ export default {
list1: [], list1: [],
list2: [], list2: [],
list3: [], list3: [],
page: 0, page: 1,
lock: false, lock: false,
text: "加载中", text: "加载中",
login
}; };
} }
}; };

View File

@ -4,7 +4,7 @@
<div class="content"> <div class="content">
<div class="left"> <div class="left">
<!-- <p class="text"> <b>职问</b>因为学习工作而在不同程度上变得麻木实际上长期从事法律</p> --> <!-- <p class="text"> <b>职问</b>因为学习工作而在不同程度上变得麻木实际上长期从事法律</p> -->
<p class="text" v-html="content" style="white-space: pre-wrap;"></p> <p class="text" v-html="contents" style="white-space: pre-wrap;"></p>
<div class="operation"> <div class="operation">
<!-- <div> <!-- <div>
<img src="../assets/share.png" alt class="icon" /> <img src="../assets/share.png" alt class="icon" />
@ -101,6 +101,10 @@ export default {
titles(){ titles(){
return this.title.replace(new RegExp(this.keys,'gm'),"<span>"+this.keys+"</span>") return this.title.replace(new RegExp(this.keys,'gm'),"<span>"+this.keys+"</span>")
},
contents(){
return this.content.replace(new RegExp(this.keys,'gm'),"<span>"+this.keys+"</span>")
} }
} }
}; };
@ -143,6 +147,9 @@ export default {
-webkit-box-orient: vertical; //-- -webkit-box-orient: vertical; //--
-webkit-line-clamp: 2; // -webkit-line-clamp: 2; //
text-overflow: ellipsis; // text-overflow: ellipsis; //
>span{
color: red;
}
} }
.operation { .operation {
// width: 271px; // width: 271px;