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

View File

@ -4,7 +4,7 @@
<div class="content">
<div class="left">
<!-- <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>
<img src="../assets/share.png" alt class="icon" />
@ -101,6 +101,10 @@ export default {
titles(){
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-line-clamp: 2; //
text-overflow: ellipsis; //
>span{
color: red;
}
}
.operation {
// width: 271px;