Merge branch 'master' into xuebaoxin

This commit is contained in:
pplokijuhyg 2019-12-04 11:41:48 +08:00
commit 07f79a8140
7 changed files with 202 additions and 135 deletions

View File

@ -14,9 +14,9 @@
<indexfindall title="学法律后,对你最大的影响或改变是什么?" num="1532" :right="pics"></indexfindall> <indexfindall title="学法律后,对你最大的影响或改变是什么?" num="1532" :right="pics"></indexfindall>
</div> --> </div> -->
</div> </div>
<div class="user" v-if="no==1"> <div class="user" v-if="no==2">
<div class="user1" v-for="(i,j) in list2" :key="j"> <div class="user1" v-for="(i,j) in list" :key="j">
<indedfinduser :answer="i.answer" :article="i.article" :attention="i.attention" :username="i.nickname" :pic="i.avatar"></indedfinduser> <indedfinduser :answer="i.answer" :article="i.article" :attention="i.attention" :username="i.topic_name" :pic="'http://lawpro.earnest.pro/'+i.img"></indedfinduser>
</div> </div>
<div style="width:100%;height:0.5rem;text-align:center;line-height:0.3rem">{{text}}</div> <div style="width:100%;height:0.5rem;text-align:center;line-height:0.3rem">{{text}}</div>
@ -30,10 +30,11 @@
<indedfinduser></indedfinduser> <indedfinduser></indedfinduser>
</div> --> </div> -->
</div> </div>
<div class="user" v-if="no==2"> <div class="user" v-if="no==5">
<div class="user1" v-for="(i,j) in list3" :key="j"> <div class="user1" v-for="(i,j) in list" :key="j">
<!-- klmklvnklnkvl --> <!-- klmklvnklnkvl -->
<indedfinduser :username="i.topic_name" :pic="i.img" :desc="i.text" :ifnum="false"></indedfinduser> <!-- <indedfinduser :username="i.topic_name" :pic="'http://lawpro.earnest.pro/'+i.img" :desc="i.text" :ifnum="false" v-if="i.img"></indedfinduser> -->
<indedfinduser :username="i.nickname" :pic="'http://lawpro.earnest.pro/'+i.avatar" :desc="i.text" :ifnum="false"></indedfinduser>
</div> </div>
<div style="width:100%;height:0.5rem;text-align:center;line-height:0.3rem">{{text}}</div> <div style="width:100%;height:0.5rem;text-align:center;line-height:0.3rem">{{text}}</div>
@ -63,7 +64,7 @@ components:{
mounted(){ mounted(){
// http://lawpro.earnest.pro/uploads/20191121/145e1911017ac255f25d6eb760d0bb4c.jpg // http://lawpro.earnest.pro/uploads/20191121/145e1911017ac255f25d6eb760d0bb4c.jpg
var t=this; var t=this;
t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:t.$route.query.word,type:0}).then((res)=>{ t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:t.$route.query.word,type:this.no}).then((res)=>{
// window.console.log(res) // window.console.log(res)
for(let i in res.data.data){ for(let i in res.data.data){
res.data.data[i].avatar= res.data.data[i].avatar.substr(1) res.data.data[i].avatar= res.data.data[i].avatar.substr(1)
@ -89,57 +90,57 @@ mounted(){
} }
}) })
t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:t.$route.query.word,type:5}).then((res)=>{ // t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:t.$route.query.word,type:5}).then((res)=>{
window.console.log(res) // window.console.log(res)
for(let i in res.data.data){ // for(let i in res.data.data){
res.data.data[i].avatar= res.data.data[i].avatar.substr(1) // res.data.data[i].avatar= res.data.data[i].avatar.substr(1)
res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar // res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar
} // }
if (res.data.code == 200) { // if (res.data.code == 200) {
t.list2 = res.data.data; // t.list2 = res.data.data;
window.$(window).scroll(() => { // window.$(window).scroll(() => {
var windowH = window.$(window).height(); // // var windowH = window.$(window).height(); //
var documentH = window.$(document).height(); // // var documentH = window.$(document).height(); //
var scrollH = window.$(window).scrollTop(); // // var scrollH = window.$(window).scrollTop(); //
// scrollH = $(document).scrollTop(); // // scrollH = $(document).scrollTop();
if (windowH + scrollH >= documentH) { // if (windowH + scrollH >= documentH) {
// do something // // do something
// alert(2); // // alert(2);
window.console.log(1); // window.console.log(1);
t.getlist(); // t.getlist();
} // }
}); // });
} else { // } else {
t.text = "暂无数据"; // t.text = "";
} // }
// t.list2=res.data.data // // t.list2=res.data.data
}) // })
t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:t.$route.query.word,type:2}).then((res)=>{ // t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:t.$route.query.word,type:2}).then((res)=>{
window.console.log(res) // window.console.log(res)
for(let i in res.data.data){ // for(let i in res.data.data){
res.data.data[i].img= res.data.data[i].img.substr(1) // res.data.data[i].img= res.data.data[i].img.substr(1)
res.data.data[i].img= "http://lawpro.earnest.pro/"+res.data.data[i].img // res.data.data[i].img= "http://lawpro.earnest.pro/"+res.data.data[i].img
} // }
// t.list3=res.data.data // // t.list3=res.data.data
if (res.data.code == 200) { // if (res.data.code == 200) {
t.list3 = res.data.data; // t.list3 = res.data.data;
window.$(window).scroll(() => { // window.$(window).scroll(() => {
var windowH = window.$(window).height(); // // var windowH = window.$(window).height(); //
var documentH = window.$(document).height(); // // var documentH = window.$(document).height(); //
var scrollH = window.$(window).scrollTop(); // // var scrollH = window.$(window).scrollTop(); //
// scrollH = $(document).scrollTop(); // // scrollH = $(document).scrollTop();
if (windowH + scrollH >= documentH) { // if (windowH + scrollH >= documentH) {
// do something // // do something
// alert(2); // // alert(2);
window.console.log(1); // window.console.log(1);
t.getlist(); // t.getlist();
} // }
}); // });
} else { // } else {
t.text = "暂无数据"; // t.text = "";
} // }
}) // })
}, },
@ -165,56 +166,58 @@ methods:{
this.lock = true; this.lock = true;
var t = this; var t = this;
t.page += 1; t.page += 1;
t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:t.$route.query.word,type:0,page: t.page}).then((res)=>{ t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:t.$route.query.word,type:t.no,page: t.page}).then((res)=>{
window.console.log(res) window.console.log(res)
for(let i in res.data.data){ // for(let i in res.data.data){
// res.data.data[i].avatar= res.data.data[i].avatar.substr(1)
// res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar
// }
if (res.data.code == 200) { if (res.data.code == 200) {
t.list = t.list.concat(res.data.data); t.list = t.list.concat(res.data.data);
t.lock = false; t.lock = false;
} else { } else {
t.text = "暂无更多"; t.text = "暂无更多";
} }
res.data.data[i].avatar= res.data.data[i].avatar.substr(1) // t.list=res.data.data
res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar
}
t.list=res.data.data
}) })
t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:t.$route.query.word,type:5,page: t.page}).then((res)=>{ // t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:t.$route.query.word,type:5,page: t.page}).then((res)=>{
window.console.log(res) // window.console.log(res)
if (res.data.code == 200) { // if (res.data.code == 200) {
t.list = t.list.concat(res.data.data); // t.list = t.list.concat(res.data.data);
t.lock = false; // t.lock = false;
} else { // } else {
t.text = "暂无更多"; // t.text = "";
} // }
for(let i in res.data.data){ // for(let i in res.data.data){
res.data.data[i].avatar= res.data.data[i].avatar.substr(1) // res.data.data[i].avatar= res.data.data[i].avatar.substr(1)
res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar // res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar
} // }
t.list2=res.data.data // t.list2=res.data.data
}) // })
t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:t.$route.query.word,type:2,page: t.page}).then((res)=>{ // t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:t.$route.query.word,type:2,page: t.page}).then((res)=>{
window.console.log(res) // window.console.log(res)
for(let i in res.data.data){ // for(let i in res.data.data){
if (res.data.code == 200) { // if (res.data.code == 200) {
t.list = t.list.concat(res.data.data); // t.list = t.list.concat(res.data.data);
t.lock = false; // t.lock = false;
} else { // } else {
t.text = "暂无更多"; // t.text = "";
} // }
res.data.data[i].img= res.data.data[i].img.substr(1) // res.data.data[i].img= res.data.data[i].img.substr(1)
res.data.data[i].img= "http://lawpro.earnest.pro/"+res.data.data[i].img // res.data.data[i].img= "http://lawpro.earnest.pro/"+res.data.data[i].img
} // }
t.list3=res.data.data // t.list3=res.data.data
}) // })
}, },
getno(e){ getno(e){
window.console.log(e) window.console.log(e)
this.no=e this.no=e
this.list=[]
// this.page = 0 // this.page = 0
// this.dynamiclist = [] // this.dynamiclist = []
// this.lock = false; // this.lock = false;
@ -233,34 +236,62 @@ methods:{
} }
}, },
serch(e){ serch(e){
let t=this; this.$router.push({
window.console.log(e) path: `/indexfind?word=` +e
t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:e,type:0}).then((res)=>{ });
window.console.log(res) // let t=this;
for(let i in res.data.data){ // window.console.log(e)
res.data.data[i].avatar= res.data.data[i].avatar.substr(1) // t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:e,type:this.no}).then((res)=>{
res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar // // window.console.log(res)
} // // for(let i in res.data.data){
t.list=res.data.data // // res.data.data[i].avatar= res.data.data[i].avatar.substr(1)
}) // // 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 {
// t.text = "";
// }
// })
// t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:e,type:0}).then((res)=>{
// window.console.log(res)
// for(let i in res.data.data){
// res.data.data[i].avatar= res.data.data[i].avatar.substr(1)
// res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar
// }
// t.list=res.data.data
// })
t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:e,type:2}).then((res)=>{ // t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:e,type:2}).then((res)=>{
window.console.log(res) // window.console.log(res)
for(let i in res.data.data){ // for(let i in res.data.data){
res.data.data[i].img= res.data.data[i].img.substr(1) // res.data.data[i].img= res.data.data[i].img.substr(1)
res.data.data[i].img= "http://lawpro.earnest.pro/"+res.data.data[i].img // res.data.data[i].img= "http://lawpro.earnest.pro/"+res.data.data[i].img
} // }
t.list3=res.data.data // t.list3=res.data.data
}) // })
t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:e,type:5}).then((res)=>{ // t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:e,type:5}).then((res)=>{
window.console.log(res) // window.console.log(res)
for(let i in res.data.data){ // for(let i in res.data.data){
res.data.data[i].avatar= res.data.data[i].avatar.substr(1) // res.data.data[i].avatar= res.data.data[i].avatar.substr(1)
res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar // res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar
} // }
t.list2=res.data.data // t.list2=res.data.data
}) // })
} }
}, },
data(){ data(){

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

@ -1,7 +1,7 @@
<template> <template>
<div class="indexfindtab"> <div class="indexfindtab">
<p @click="change(0)" :class="no==0?'text':''">综合</p> <p @click="change(0)" :class="no==0?'text':''">综合</p>
<p @click="change(1)" :class="no==1?'text':''">用户</p> <p @click="change(5)" :class="no==5?'text':''">用户</p>
<p @click="change(2)" :class="no==2?'text':''">话题</p> <p @click="change(2)" :class="no==2?'text':''">话题</p>
</div> </div>
</template> </template>

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
}); });
} }
} }