{{text}}
diff --git a/dist.zip b/dist.zip index 90572a0..659c6dd 100644 Binary files a/dist.zip and b/dist.zip differ diff --git a/src/IndexArticleDetail.vue b/src/IndexArticleDetail.vue index cfdd750..e7da73c 100644 --- a/src/IndexArticleDetail.vue +++ b/src/IndexArticleDetail.vue @@ -28,6 +28,7 @@ :title="item.title" :img="'http://lawpro.earnest.pro' +item.img" :sid="item.id" + :type="item.type" > @@ -39,6 +40,7 @@ :key="index" :title="item.title" :sid="item.id" + :type="item.type" > @@ -47,7 +49,8 @@
{{plist.length}}条评论
-
切换为{{shot == 0 ? '时间' : "默认"}}排序
+
+ 切换为{{shot == 0 ? '时间' : "默认"}}排序
{{plist.length}}条评论
-
-
切换为时间排序
+
+
+ 切换为{{shot == 0 ? '时间' : "默认"}}排序
@@ -69,8 +76,9 @@ export default {
biaoqing: false,
list: [],
plist: [],
- userid:0,
- ifgz:false
+ userid: 0,
+ ifgz: false,
+ shot: 0
};
},
components: {
@@ -83,22 +91,22 @@ export default {
Emotion
},
methods: {
- gz(e){
- if(e==1){
- let t=this;
- this.axios
- .post("http://lawpro.earnest.pro/api/login_main/plusAttention", {
- token:localStorage.getItem("token"),
- passivity_id:t.userid,
- type:2
- }).then((res)=>{
- window.console.log(res)
- if(res.data.code==200){
- this.ifgz=true
- }
- })
+ gz(e) {
+ if (e == 1) {
+ let t = this;
+ this.axios
+ .post("http://lawpro.earnest.pro/api/login_main/plusAttention", {
+ token: localStorage.getItem("token"),
+ passivity_id: t.userid,
+ type: 2
+ })
+ .then(res => {
+ window.console.log(res);
+ if (res.data.code == 200) {
+ this.ifgz = true;
+ }
+ });
}
-
},
handleEmotion(i) {
this.content += i;
@@ -114,13 +122,17 @@ export default {
text: this.content,
token: localStorage.getItem("token"),
type_id: this.$route.query.id,
- type: 3
+ type: 1
})
.then(res => {
if (res.data.code == 200) {
this.pinglu(this.$route.query.id);
this.content = "";
+ } else {
+ this.$router.push({
+ path: "/login"
+ });
}
});
}
@@ -131,8 +143,9 @@ export default {
this.axios
.post("http://lawpro.earnest.pro/api/login_main/CommentList", {
token: localStorage.getItem("token"),
- type: 2,
- type_id: this.$route.query.id
+ type: 1,
+ type_id: this.$route.query.id,
+ order: this.shot
})
.then(res => {
window.console.log(res);
@@ -142,9 +155,14 @@ export default {
});
}
},
+ watch: {
+ shot() {
+ this.pinglu();
+ }
+ },
mounted() {
// window.console.log(this.$route.query.userid,7946 )
- this.userid=this.$route.query.userid
+ this.userid = this.$route.query.userid;
this.axios
.post("http://lawpro.earnest.pro/api/login_main/mainDetails", {
token: localStorage.getItem("token"),
diff --git a/src/components/IndexList.vue b/src/components/IndexList.vue
index 6252c5b..7f7cce1 100644
--- a/src/components/IndexList.vue
+++ b/src/components/IndexList.vue
@@ -3,11 +3,17 @@
{{text}}
分享
分享
分享
{{title}}
@@ -61,6 +61,20 @@ export default { data() { return {}; }, - props:['title','img'] + props:['title','img','sid','type'], + methods:{ + link(){ + if(this.type == 1){ +this.$router.push({ + path:"articledetail?id=" + this.sid + }) + }else{ + this.$router.push({ + path:"IndexArticleDetaill?id=" + this.sid + }) + } + + } + } }; \ No newline at end of file diff --git a/src/components/indexfindall.vue b/src/components/indexfindall.vue index 8b0cfe9..435939f 100644 --- a/src/components/indexfindall.vue +++ b/src/components/indexfindall.vue @@ -53,6 +53,8 @@ export default { color: #333333; font-size: 34px; font-weight: 500; + padding: 0 41px; + text-indent:0; padding-top: 34px; padding-bottom: 23px; } diff --git a/src/components/indexprivate.vue b/src/components/indexprivate.vue index 359d50e..7a0a570 100644 --- a/src/components/indexprivate.vue +++ b/src/components/indexprivate.vue @@ -1,5 +1,5 @@ -{{title}}
@@ -62,6 +62,20 @@ export default { } }, - props:['title'] + props:['title','sid','type'], + methods:{ + link(){ + if(this.type == 1){ +this.$router.push({ + path:"articledetail?id=" + this.sid + }) + }else{ + this.$router.push({ + path:"IndexArticleDetaill?id=" + this.sid + }) + } + + } + } }; \ No newline at end of file diff --git a/src/index.vue b/src/index.vue index 3bae648..1d1b4f0 100644 --- a/src/index.vue +++ b/src/index.vue @@ -9,6 +9,7 @@ :num="item.comment" :img="item.img" :text="item.text" + :type="item.type" >+86
-
+