Merge branch 'zhengjie' of pplokijuhyg/falvpingtai into master

This commit is contained in:
asd 2019-12-04 11:40:38 +08:00
commit 71075ec404
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 /> <img class="portrait" :src="'http://lawpro.earnest.pro' + userimg" alt />
<div class="introduce"> <div class="introduce">
<p class="name">{{username}}</p> <p class="name">{{username}}</p>
<div class="follow"> <!-- <div class="follow">
<p> <p>
<span>{{attention}}</span> <span>{{attention}}</span>
关注我的 关注我的
@ -13,7 +13,7 @@
<span>{{myfollow}}</span> <span>{{myfollow}}</span>
我关注的 我关注的
</p> </p>
</div> </div> -->
</div> </div>
</div> </div>
<div class="classification"> <div class="classification">

View File

@ -12,7 +12,9 @@
:sole="list.user.industry_name" :sole="list.user.industry_name"
:text="list.data.articlecontent" :text="list.data.articlecontent"
:title="list.data.title" :title="list.data.title"
:guanzhu="ifgz"
@pinglun="pinglu" @pinglun="pinglu"
@guanzhu="gz"
></follow> ></follow>
<div class="line"></div> <div class="line"></div>
<!-- <follow :indexs="1" class="follow"></follow> --> <!-- <follow :indexs="1" class="follow"></follow> -->
@ -66,7 +68,9 @@ export default {
content: "", content: "",
biaoqing: false, biaoqing: false,
list: [], list: [],
plist: [] plist: [],
userid:0,
ifgz:false
}; };
}, },
components: { components: {
@ -79,6 +83,23 @@ export default {
Emotion Emotion
}, },
methods: { 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) { handleEmotion(i) {
this.content += i; this.content += i;
}, },
@ -122,6 +143,8 @@ export default {
} }
}, },
mounted() { mounted() {
// window.console.log(this.$route.query.userid,7946 )
this.userid=this.$route.query.userid
this.axios this.axios
.post("http://lawpro.earnest.pro/api/login_main/mainDetails", { .post("http://lawpro.earnest.pro/api/login_main/mainDetails", {
token: localStorage.getItem("token"), token: localStorage.getItem("token"),

View File

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

View File

@ -8,16 +8,15 @@
<img src="../assets/renzheng.png" alt class="icon" /> <img src="../assets/renzheng.png" alt class="icon" />
</div> </div>
<p class="desc">{{desc}}</p> <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> </div>
<div class="right"> <!-- <div class="right">
<!-- <div class="add"> -->
<img src="../assets/add.png" alt="" class="add"> <img src="../assets/add.png" alt="" class="add">
<!-- </div> -->
<p>关注</p> <p>关注</p>
</div> </div> -->
</div> </div>
</template> </template>

View File

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