提交个人主页内容的修改

This commit is contained in:
daihh
2022-10-14 20:43:39 +08:00
parent cbb082ba33
commit 85d74637f3
4 changed files with 128 additions and 110 deletions

View File

@@ -4,10 +4,10 @@
}
.qa-solve{
color:#387df7;
margin-left: -10px;
margin-left: -8px;
}
.qa-unSolve{
color:#333;
margin-left: -10px;
margin-left: -8px;
}

View File

@@ -13,12 +13,14 @@
<div class="case-info-cont">
<router-link :to="'/case/detail?id='+item.info.id">
<div class="case-info-title">
<div class="case-titdiv">
<div class="case-titdiv" style="">
<span class="case-tittext" v-html="item.info.title || item.contentInfo"></span>
<div class="follow-hide" style="width:59px" v-if="!isDynamic && personal && !item.hidden" @click="emitHide(item.id)">
<span class="follow-hide" v-if="!isDynamic && personal && !item.hidden" @click="emitHide(item.id)">
<svg-icon style="margin-right: 10px;font-size:22px;padding-top: 4px;" icon-class="eyes"></svg-icon>隐藏
</span>
</div>
</div>
</div>
<div style="height:58px;padding-top:18px ">
<author :avatar="item.authorInfo.avatar" :name="item.authorInfo.name" :info="item.authorInfo.orgInfo" :sex="item.authorInfo.sex" :aid="item.authorInfo.aid"></author>
@@ -143,12 +145,12 @@ div {
width: 100%;
line-height: 30px;
display: flex;
justify-content: space-between;
margin-top: 16px;
.case-tittext {
font-size: 18px;
font-weight: 600;
margin-top: 16px;
color: #333333;
width: 100%;
display: -webkit-box;
overflow: hidden;
word-break: break-all;
@@ -194,6 +196,7 @@ div {
color: #333;
font-weight: 600;
height: 30px;
line-height: 30px;
.case-info-date {
flex: 1;
text-align: right;
@@ -242,4 +245,3 @@ div {
}
</style>

View File

@@ -29,8 +29,9 @@
<el-button class="btn" icon="el-icon-plus" v-if="active == 2">已关注</el-button>
</div>
</div>
<!--分页没有加-->
</div>
<div v-if="followList.length == 0">
<div v-if="showEmpty">
<img class="img" style="width:186px;height:160px" src="/images/homeWu/no-follow.png" alt="" srcset="">
<p class="text">还没有关注的人</p>
</div>
@@ -58,6 +59,7 @@
<el-button type="primary" class="btn" v-else icon="el-icon-plus">关注他</el-button>
</div>
</div>
<!--分页没有加-->
</div>
</div>
@@ -79,6 +81,14 @@ import apiUser from "@/api/system/user.js";
...mapGetters(['userInfo']),
avatarText(){
return userAvatarText(this.userInfo.name);
},
showEmpty(){ //是否显示空信息内容
if(this.active==1 && this.followList.length==0){
return true;
}else if(this.active==2 && this.mypageList.length==0){
return true;
}
return false;
}
},
data(){
@@ -97,7 +107,7 @@ import apiUser from "@/api/system/user.js";
}
},
mounted() {
this.pageId = this.$route.query.id;
this.pageId = this.$xpage.getHomeId(this.$route);
},
methods:{
cancel(item) {
@@ -111,10 +121,15 @@ import apiUser from "@/api/system/user.js";
tagTab(num) {
this.active = num;
if(num == 1) {
if(this.followList.length==0){
this.getPage()
}
} else {
if(this.mypageList.length==0){
this.getMyPage()
}
}
},
getMyPage() {//关注我的,关注他的
this.page.aid = this.pageId;
@@ -125,7 +140,7 @@ import apiUser from "@/api/system/user.js";
item.userFollow.authorInfo = { aid: "",name: "",orgInfo: "",avatar: "",sex: null ,sign:''}
})
this.mypageList = res.result.list;
console.log(this.mypageList,'this.mypageList');
//console.log(this.mypageList,'this.mypageList');
this.getUserData(res.result.list);
}
})
@@ -179,6 +194,7 @@ import apiUser from "@/api/system/user.js";
padding: 4px 0;
.tabs-index{
padding:0 60px 10px 10px;
cursor: pointer;
.line{
display: inline-block;
width: 100%;

View File

@@ -99,7 +99,7 @@
this.$store.dispatch("Login", this.form).then(rs => {
if(rs.status == 200){
// 记住密码
localStorage.setItem(this.$Constants.newLoginKey,1);
localStorage.setItem(this.$xpage.constants.newLoginKey,1);
if(this.rememberMe){
let rememberMeOjb = {rememberMe:true,loginName:this.form.loginName,password:this.form.password};
this.$store.dispatch("portal/SetLoginRememberMe", rememberMeOjb)