From 5e1dfad9edd6376b81beb30dc31ea73fc4e93d80 Mon Sep 17 00:00:00 2001 From: asd <374367073@qq.com> Date: Wed, 4 Dec 2019 11:39:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=85=B3=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/PersonalHomepage.vue | 4 ++-- src/articledetail.vue | 25 ++++++++++++++++++++++++- src/components/indexFollow1.vue | 23 ++++++++++++++++++----- src/components/indexfinduser.vue | 9 ++++----- src/index.vue | 7 ++++--- 5 files changed, 52 insertions(+), 16 deletions(-) diff --git a/src/PersonalHomepage.vue b/src/PersonalHomepage.vue index 1242aa6..ede889b 100644 --- a/src/PersonalHomepage.vue +++ b/src/PersonalHomepage.vue @@ -4,7 +4,7 @@

{{username}}

-
+
diff --git a/src/articledetail.vue b/src/articledetail.vue index 239486e..490bd8e 100644 --- a/src/articledetail.vue +++ b/src/articledetail.vue @@ -12,7 +12,9 @@ :sole="list.user.industry_name" :text="list.data.articlecontent" :title="list.data.title" + :guanzhu="ifgz" @pinglun="pinglu" + @guanzhu="gz" >
@@ -66,7 +68,9 @@ export default { content: "", biaoqing: false, list: [], - plist: [] + plist: [], + userid:0, + ifgz:false }; }, components: { @@ -79,6 +83,23 @@ 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 + } + }) + } + + }, handleEmotion(i) { this.content += i; }, @@ -122,6 +143,8 @@ export default { } }, mounted() { + // window.console.log(this.$route.query.userid,7946 ) + 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/indexFollow1.vue b/src/components/indexFollow1.vue index 528b818..19a1896 100644 --- a/src/components/indexFollow1.vue +++ b/src/components/indexFollow1.vue @@ -10,12 +10,18 @@
-
- + -

关注

+
+

取消关注

+ +
+ +

关注

+
--> +

{{title}}

@@ -186,6 +192,9 @@ margin-top: 19px; margin-right: 21px; } + .qxgz{ + color: gray + } } \ No newline at end of file diff --git a/src/components/indexfinduser.vue b/src/components/indexfinduser.vue index 41abd60..66b647d 100644 --- a/src/components/indexfinduser.vue +++ b/src/components/indexfinduser.vue @@ -8,16 +8,15 @@

{{desc}}

-

{{answer}} 回答·{{article}} 文章·{{attention}} 关注者

+

{{answer}} 回答·{{article}} 文章

+ -
- +

关注

-
+ --> diff --git a/src/index.vue b/src/index.vue index ce0c842..4dc9c5c 100644 --- a/src/index.vue +++ b/src/index.vue @@ -2,7 +2,7 @@
-
+