去掉关注

This commit is contained in:
asd 2019-12-04 11:39:25 +08:00
parent b7a1c27314
commit 5e1dfad9ed
5 changed files with 52 additions and 16 deletions

View File

@ -4,7 +4,7 @@
<img class="portrait" :src="'http://lawpro.earnest.pro' + userimg" alt />
<div class="introduce">
<p class="name">{{username}}</p>
<div class="follow">
<!-- <div class="follow">
<p>
<span>{{attention}}</span>
关注我的
@ -13,7 +13,7 @@
<span>{{myfollow}}</span>
我关注的
</p>
</div>
</div> -->
</div>
</div>
<div class="classification">

View File

@ -12,7 +12,9 @@
:sole="list.user.industry_name"
:text="list.data.articlecontent"
:title="list.data.title"
:guanzhu="ifgz"
@pinglun="pinglu"
@guanzhu="gz"
></follow>
<div class="line"></div>
<!-- <follow :indexs="1" class="follow"></follow> -->
@ -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"),

View File

@ -10,12 +10,18 @@
</div>
</div>
<div class="right">
<!-- <div class="add"> -->
<!-- <div class="right" @click="attention" v-if="guanzhu">
<div class="add">
<img src="../assets/add.png" alt class="add" />
<!-- </div> -->
<p>关注</p>
</div>
<p class="qxgz">取消关注</p>
</div>
<div class="right" @click="attention" v-else>
<img src="../assets/add.png" alt class="add" />
<p>关注</p>
</div> -->
</div>
<!-- <div class="line"></div> -->
<p class="question">{{title}}</p>
@ -186,6 +192,9 @@
margin-top: 19px;
margin-right: 21px;
}
.qxgz{
color: gray
}
}
</style>
<script>
@ -199,6 +208,10 @@ export default {
},
methods: {
attention(){
window.console.log("guanzhu")
this.$emit("guanzhu",1)
},
shows() {
var a = window.document.getElementsByClassName("content")[this.indexs];
a.style.setProperty("max-height", "", "important");
@ -226,6 +239,6 @@ export default {
}
});
},
props:['img','nickname','sole','title','date','num','text']
props:['img','nickname','sole','title','date','num','text','guanzhu']
};
</script>

View File

@ -8,16 +8,15 @@
<img src="../assets/renzheng.png" alt class="icon" />
</div>
<p class="desc">{{desc}}</p>
<p class="desc1" v-if="ifnum">{{answer}} 回答·{{article}} 文章·{{attention}} 关注者</p>
<p class="desc1" v-if="ifnum">{{answer}} 回答·{{article}} 文章</p>
<!-- <p class="desc1" v-if="ifnum">{{answer}} 回答·{{article}} 文章·{{attention}} 关注者</p> -->
</div>
</div>
<div class="right">
<!-- <div class="add"> -->
<!-- <div class="right">
<img src="../assets/add.png" alt="" class="add">
<!-- </div> -->
<p>关注</p>
</div>
</div> -->
</div>
</template>

View File

@ -2,7 +2,7 @@
<div class="box">
<heads></heads>
<div class="list">
<div v-for="(item,index) in list" :key="index" @click="todetail(item.id,item.type)">
<div v-for="(item,index) in list" :key="index" @click="todetail(item.id,item.type,item.user_id)" >
<list
:title="item.title"
:id="item.id"
@ -44,6 +44,7 @@ export default {
};
},
methods: {
getlist() {
if (this.lock) {
return "lock";
@ -64,7 +65,7 @@ export default {
}
});
},
todetail(e, type) {
todetail(e, type,userid) {
window.console.log(e);
if (type == 2) {
this.$router.push({
@ -72,7 +73,7 @@ export default {
});
} else {
this.$router.push({
path: `/articledetail?id=` + e
path: `/articledetail?id=` + e+`&userid=`+userid
});
}
}