This commit is contained in:
zhaofang
2022-10-20 14:09:43 +08:00
parent 09f7581ba8
commit b21160ba80
9 changed files with 26 additions and 27 deletions

View File

@@ -733,7 +733,7 @@
width: 658px; width: 658px;
.swiper-slide{ .swiper-slide{
width: 476px; width: 476px;
height: 500px; height: 400px;
text-align: center; text-align: center;
.banner-img{ .banner-img{
width: 476px; width: 476px;

View File

@@ -43,7 +43,7 @@
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
<div v-if="showEmpty"> <div v-if="showEmpty" class="home-no-list">
<img class="img" style="width:186px;height:160px" :src="`${webBaseUrl}/images/homeWu/no-follow.png`" alt="" srcset=""> <img class="img" style="width:186px;height:160px" :src="`${webBaseUrl}/images/homeWu/no-follow.png`" alt="" srcset="">
<p class="text">还没有关注的人</p> <p class="text">还没有关注的人</p>
</div> </div>

View File

@@ -73,10 +73,11 @@
}, },
created() { created() {
let width = document.body.clientWidth; let width = document.body.clientWidth;
console.log(width,'width');
if(width > 1920) { if(width > 1920) {
this.clientWidth = '1088px'; this.clientWidth = '1088px';
} }
if(width > 1681 && width < 1920 || width == 1920) { if(width > 1681 && width < 1920) {
this.clientWidth = '888px'; this.clientWidth = '888px';
} }
if(width > 1367 && width < 1680) { if(width > 1367 && width < 1680) {

View File

@@ -11,6 +11,7 @@ const getters = {
orgId: state => state.user.orgId, orgId: state => state.user.orgId,
permissions: state => state.user.permissions, permissions: state => state.user.permissions,
identity: state => state.user.identity, identity: state => state.user.identity,
attention: state => state.user.attention,
intTimeNote: state => state.user.intTimeNote, intTimeNote: state => state.user.intTimeNote,
curIdentity: state => state.user.curIdentity, curIdentity: state => state.user.curIdentity,
permission_routes: state => state.permission.routes, permission_routes: state => state.permission.routes,

View File

@@ -17,6 +17,7 @@ const user = {
curIdentity: sessionStorage.getItem("curIdentity") == null ? 1 : sessionStorage.getItem("curIdentity"), // 用户当前选择的身份 1学员 2教师 3管理员 curIdentity: sessionStorage.getItem("curIdentity") == null ? 1 : sessionStorage.getItem("curIdentity"), // 用户当前选择的身份 1学员 2教师 3管理员
permissions: [], permissions: [],
intTimeNote:0, intTimeNote:0,
attention:false,
}, },
mutations: { mutations: {
SET_IntTimeNote: (state, u) => { SET_IntTimeNote: (state, u) => {
@@ -44,8 +45,15 @@ const user = {
SET_PERMISSIONS: (state, permissions) => { SET_PERMISSIONS: (state, permissions) => {
state.permissions = permissions state.permissions = permissions
}, },
SET_Attention: (state, m)=>{
state.attention = m
}
}, },
actions: { actions: {
// /用户触发事件
setAttention({ commit }, iden) {
commit('SET_Attention', iden);
},
// /用户触发事件 // /用户触发事件
userTrigger({ commit }, event) { userTrigger({ commit }, event) {
event.source='page'; event.source='page';

View File

@@ -7,11 +7,11 @@
<router-view /> <router-view />
<div class="home-page-right"> <div class="home-page-right">
<ul class="total-per"> <ul class="total-per">
<li class="per-li"> <li class="per-li pointer" @click="jumpAttention()">
<span class="per-info">{{follow.passive}}</span> <span class="per-info">{{follow.passive}}</span>
<span class="per-text">关注{{self?'我':'他'}}的人</span> <span class="per-text">关注{{self?'我':'他'}}的人</span>
</li> </li>
<li class="per-li"> <li class="per-li pointer" @click="jumpAttention()">
<span class="per-info">{{follow.initiative}}</span> <span class="per-info">{{follow.initiative}}</span>
<span class="per-text">{{self?'我':'他'}}关注的人</span> <span class="per-text">{{self?'我':'他'}}关注的人</span>
</li> </li>
@@ -89,9 +89,11 @@
if(this.pageId == this.userInfo.aid) { if(this.pageId == this.userInfo.aid) {
this.self = true; this.self = true;
} }
}, },
methods:{ methods:{
jumpAttention() {// 点击事件跳转关注
this.$store.dispatch("setAttention", true);
},
init(){ init(){
this.getMedal(); this.getMedal();
this.userhobbyInfo(); this.userhobbyInfo();

View File

@@ -34,7 +34,7 @@
<div class="lev-li"> <div class="lev-li">
<div class="li-img"><author-img :avatar="rep.authorInfo.avatar" :aid="rep.authorInfo.aid" :sex="rep.authorInfo.sex"></author-img></div> <div class="li-img"><author-img :avatar="rep.authorInfo.avatar" :aid="rep.authorInfo.aid" :sex="rep.authorInfo.sex"></author-img></div>
<div class="li-text"> <div class="li-text">
<p class="portal-title-tow">{{rep.authorInfo.name}} <span class="portal-summary-text">个性签名{{rep.authorInfo.sign}}</span></p> <p class="portal-title-tow">{{rep.authorInfo.name}} <span class="portal-summary-text">个性签名1{{rep.authorInfo.sign}}</span></p>
<p>{{rep.content}}</p> <p>{{rep.content}}</p>
</div> </div>
<div class="li-right"> <div class="li-right">
@@ -102,6 +102,7 @@
}else{ }else{
this.$router.push({path:'/404'}) this.$router.push({path:'/404'})
} }
console.log(this.userInfo,'userInfo');
}, },
methods: { methods: {

View File

@@ -93,7 +93,7 @@
export default{ export default{
components:{top,UcHeader,CaseList,CourseList,NoteList,PutList,AnswerList,ArticleList,FollowList,BookList}, components:{top,UcHeader,CaseList,CourseList,NoteList,PutList,AnswerList,ArticleList,FollowList,BookList},
computed: { computed: {
...mapGetters(['userInfo','majorTypeMap','orgDomainMap']), ...mapGetters(['userInfo','majorTypeMap','orgDomainMap','attention']),
}, },
data(){ data(){
return{ return{
@@ -136,7 +136,10 @@
let urlPre=window.location.protocol+'//'+window.location.host; let urlPre=window.location.protocol+'//'+window.location.host;
location.href=urlPre+process.env.VUE_APP_PUBLIC_PATH+this.$xpage.getHomePath(this.pageId); location.href=urlPre+process.env.VUE_APP_PUBLIC_PATH+this.$xpage.getHomePath(this.pageId);
} }
} },
attention(val) {
this.activeName = "7";
},
}, },
mounted() { mounted() {
@@ -339,9 +342,7 @@
apiNote.ids(ids).then(res=>{ apiNote.ids(ids).then(res=>{
if(res.status == 200) { if(res.status == 200) {
list.forEach((item, index) => { list.forEach((item, index) => {
let score = item.contentInfo.substr(item.contentInfo.length -1,1); let score = item.contentInfo.substr(item.contentInfo.length -1,1);
console.log(Number(score),'Number(score)');
if(Number(score) > 0) { if(Number(score) > 0) {
item.score = score; item.score = score;
} }

View File

@@ -458,20 +458,6 @@
show: true, show: true,
position: 'center', position: 'center',
formatter:`{total|${this.percentageNum}%}\n{active|来源top3}`, formatter:`{total|${this.percentageNum}%}\n{active|来源top3}`,
// formatter: function(name) {
// console.log(name,'name');
// let data = option.series[0].data;
// let total = 0;
// let tarValue = 0; //每一项值
// for (let i = 0; i < data.length; i++) {
// total += data[i].value;
// if (data[i].name == name) {
// tarValue = data[i].value;
// }
// }
// let p = total != 0 ? Math.round((tarValue / total) * 100) + '%' : 0 + '%';
// return ` ${p} ${name}`
// },
rich:{ rich:{
total:{ total:{
fontSize:20, fontSize:20,
@@ -516,6 +502,7 @@
name: this.getUType(key) name: this.getUType(key)
}) })
} }
// 计算前三百分比
totalList.sort(); totalList.sort();
totalList = totalList.splice(1,3); totalList = totalList.splice(1,3);
let top3 = null; let top3 = null;
@@ -523,8 +510,6 @@
top3+=item; top3+=item;
}) })
this.percentageNum = (top3/total)*100; this.percentageNum = (top3/total)*100;
console.log(top3,total,this.percentageNum,'3333');
console.log(totalList,'totalList');
this.chatData = chatData; this.chatData = chatData;
this.initChat(chatData); this.initChat(chatData);
} }