diff --git a/src/IndexArticleDetail.vue b/src/IndexArticleDetail.vue
index 7e2865d..c83c9af 100644
--- a/src/IndexArticleDetail.vue
+++ b/src/IndexArticleDetail.vue
@@ -13,7 +13,10 @@
:nickname="item.nickname"
:text="item.articlecontent"
:comment="item.comment"
- :num="item.islike"
+ :like="item.islike"
+ :collect="item.collect"
+ :islike="item.isClick"
+ :iscllect="item.isCollect"
>
diff --git a/src/IndexFind.vue b/src/IndexFind.vue
index 5d06d82..96d63c8 100644
--- a/src/IndexFind.vue
+++ b/src/IndexFind.vue
@@ -6,7 +6,18 @@
-
+
{{text}}
@@ -73,8 +84,8 @@ export default {
indedfinduser
},
mounted() {
- this.getlist1()
- },
+ this.getlist1();
+ },
watch: {
no() {
this.page = 0;
@@ -82,7 +93,7 @@ export default {
this.list = [];
this.lock = false;
// this.getlist1();
- this.text="加载中"
+ this.text = "加载中";
}
},
beforeRouteLeave(a, b, c) {
@@ -90,41 +101,39 @@ export default {
c();
},
methods: {
- getlist1(){
- let t=this;
- t.list=[]
+ getlist1() {
+ let t = this;
+ t.list = [];
t.axios
.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {
where: t.$route.query.word,
type: t.no,
- }).then((res)=>{
- if(res.data.data){
-
- t.list=res.data.data
- window.console.log(t.list.length,"hfihaifohog")
- if(t.list.length<5){
- t.text="暂无数据"
+ token: localStorage.getItem("token")
+ })
+ .then(res => {
+ if (res.data.data) {
+ t.list = res.data.data;
+ window.console.log(t.list.length, "hfihaifohog");
+ if (t.list.length < 5) {
+ t.text = "暂无数据";
}
window.$(window).scroll(() => {
- var windowH = window.$(window).height(); //设备可见区域高度
- var documentH = window.$(document).height(); //整个网页的高度(包括未显示的部分)
- var scrollH = window.$(window).scrollTop(); //滚动条滚动上去的高度
- //或者 scrollH = $(document).scrollTop();
- if (windowH + scrollH >= documentH) {
- // do something
- // alert(2);
- window.console.log(1);
- t.getlist();
- }
- });
-
- }else{
- window.console.log("errir")
- t.text="暂无数据"
+ var windowH = window.$(window).height(); //设备可见区域高度
+ var documentH = window.$(document).height(); //整个网页的高度(包括未显示的部分)
+ var scrollH = window.$(window).scrollTop(); //滚动条滚动上去的高度
+ //或者 scrollH = $(document).scrollTop();
+ if (windowH + scrollH >= documentH) {
+ // do something
+ // alert(2);
+ window.console.log(1);
+ t.getlist();
+ }
+ });
+ } else {
+ window.console.log("errir");
+ t.text = "暂无数据";
}
-
-
- })
+ });
},
getlist() {
if (this.lock) {
@@ -142,36 +151,34 @@ export default {
.then(res => {
window.console.log(res);
if (res.data.code == 200) {
- if(res.data.data){
- t.list = t.list.concat(res.data.data);
-
+ if (res.data.data) {
+ t.list = t.list.concat(res.data.data);
}
t.lock = false;
- window.$(window).scroll(() => {
- var windowH = window.$(window).height(); //设备可见区域高度
- var documentH = window.$(document).height(); //整个网页的高度(包括未显示的部分)
- var scrollH = window.$(window).scrollTop(); //滚动条滚动上去的高度
- //或者 scrollH = $(document).scrollTop();
- if (windowH + scrollH >= documentH) {
- // do something
- // alert(2);
- window.console.log(1);
- t.getlist();
- }
- });
+ window.$(window).scroll(() => {
+ var windowH = window.$(window).height(); //设备可见区域高度
+ var documentH = window.$(document).height(); //整个网页的高度(包括未显示的部分)
+ var scrollH = window.$(window).scrollTop(); //滚动条滚动上去的高度
+ //或者 scrollH = $(document).scrollTop();
+ if (windowH + scrollH >= documentH) {
+ // do something
+ // alert(2);
+ window.console.log(1);
+ t.getlist();
+ }
+ });
} else {
t.text = "暂无更多";
}
// t.list=res.data.data
});
-
},
getno(e) {
window.console.log(e);
this.no = e;
this.list = [];
- this.getlist1()
- window.console.log(this.list.length,"list")
+ this.getlist1();
+ window.console.log(this.list.length, "list");
},
todetail(e, type) {
window.console.log(e);
@@ -198,21 +205,21 @@ export default {
// // res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar
// // }
// // t.list=res.data.data
- // if (res.data.code == 200) {
- // t.list = res.data.data;
- // window.$(window).scroll(() => {
- // var windowH = window.$(window).height(); //设备可见区域高度
- // var documentH = window.$(document).height(); //整个网页的高度(包括未显示的部分)
- // var scrollH = window.$(window).scrollTop(); //滚动条滚动上去的高度
- // //或者 scrollH = $(document).scrollTop();
- // if (windowH + scrollH >= documentH) {
- // // do something
- // // alert(2);
- // window.console.log(1);
- // t.getlist();
- // }
- // });
- // } else {
+ // if (res.data.code == 200) {
+ // t.list = res.data.data;
+ // window.$(window).scroll(() => {
+ // var windowH = window.$(window).height(); //设备可见区域高度
+ // var documentH = window.$(document).height(); //整个网页的高度(包括未显示的部分)
+ // var scrollH = window.$(window).scrollTop(); //滚动条滚动上去的高度
+ // //或者 scrollH = $(document).scrollTop();
+ // if (windowH + scrollH >= documentH) {
+ // // do something
+ // // alert(2);
+ // window.console.log(1);
+ // t.getlist();
+ // }
+ // });
+ // } else {
// t.text = "暂无数据";
// }
// })
diff --git a/src/PersonalHomepage.vue b/src/PersonalHomepage.vue
index b9a7b6a..c4627af 100644
--- a/src/PersonalHomepage.vue
+++ b/src/PersonalHomepage.vue
@@ -22,7 +22,7 @@
回答
文章
提问
-
+
收藏