搜索
This commit is contained in:
parent
faeb1f9ae1
commit
e738bc61b6
@ -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
|
||||
};
|
||||
}
|
||||
};
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user