From b21160ba80bf835f24ce5b5957b9ccff61d23368 Mon Sep 17 00:00:00 2001 From: zhaofang <752743406@qq.com> Date: Thu, 20 Oct 2022 14:09:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/portal-index.scss | 2 +- src/components/HomePage/followList.vue | 2 +- src/components/Portal/guideBox.vue | 3 ++- src/store/getters.js | 1 + src/store/modules/user.js | 8 ++++++++ src/views/homepage/Index.vue | 8 +++++--- src/views/homepage/leavingMessage.vue | 3 ++- src/views/homepage/page.vue | 9 +++++---- src/views/ucurrency/Index.vue | 17 +---------------- 9 files changed, 26 insertions(+), 27 deletions(-) diff --git a/src/assets/styles/portal-index.scss b/src/assets/styles/portal-index.scss index 863fdb78..a7ef6a8d 100644 --- a/src/assets/styles/portal-index.scss +++ b/src/assets/styles/portal-index.scss @@ -733,7 +733,7 @@ width: 658px; .swiper-slide{ width: 476px; - height: 500px; + height: 400px; text-align: center; .banner-img{ width: 476px; diff --git a/src/components/HomePage/followList.vue b/src/components/HomePage/followList.vue index a04d9e98..10628620 100644 --- a/src/components/HomePage/followList.vue +++ b/src/components/HomePage/followList.vue @@ -43,7 +43,7 @@ -
+

还没有关注的人

diff --git a/src/components/Portal/guideBox.vue b/src/components/Portal/guideBox.vue index 5be5ccdb..222608df 100644 --- a/src/components/Portal/guideBox.vue +++ b/src/components/Portal/guideBox.vue @@ -73,10 +73,11 @@ }, created() { let width = document.body.clientWidth; + console.log(width,'width'); if(width > 1920) { this.clientWidth = '1088px'; } - if(width > 1681 && width < 1920 || width == 1920) { + if(width > 1681 && width < 1920) { this.clientWidth = '888px'; } if(width > 1367 && width < 1680) { diff --git a/src/store/getters.js b/src/store/getters.js index 999ef0c6..90a26513 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -11,6 +11,7 @@ const getters = { orgId: state => state.user.orgId, permissions: state => state.user.permissions, identity: state => state.user.identity, + attention: state => state.user.attention, intTimeNote: state => state.user.intTimeNote, curIdentity: state => state.user.curIdentity, permission_routes: state => state.permission.routes, diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 2edadce3..70a5c504 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -17,6 +17,7 @@ const user = { curIdentity: sessionStorage.getItem("curIdentity") == null ? 1 : sessionStorage.getItem("curIdentity"), // 用户当前选择的身份 1学员 2教师 3管理员 permissions: [], intTimeNote:0, + attention:false, }, mutations: { SET_IntTimeNote: (state, u) => { @@ -44,8 +45,15 @@ const user = { SET_PERMISSIONS: (state, permissions) => { state.permissions = permissions }, + SET_Attention: (state, m)=>{ + state.attention = m + } }, actions: { + // /用户触发事件 + setAttention({ commit }, iden) { + commit('SET_Attention', iden); + }, // /用户触发事件 userTrigger({ commit }, event) { event.source='page'; diff --git a/src/views/homepage/Index.vue b/src/views/homepage/Index.vue index a22976a9..cc45ebea 100644 --- a/src/views/homepage/Index.vue +++ b/src/views/homepage/Index.vue @@ -7,11 +7,11 @@
    -
  • +
  • {{follow.passive}} 关注{{self?'我':'他'}}的人
  • -
  • +
  • {{follow.initiative}} {{self?'我':'他'}}关注的人
  • @@ -89,9 +89,11 @@ if(this.pageId == this.userInfo.aid) { this.self = true; } - }, methods:{ + jumpAttention() {// 点击事件跳转关注 + this.$store.dispatch("setAttention", true); + }, init(){ this.getMedal(); this.userhobbyInfo(); diff --git a/src/views/homepage/leavingMessage.vue b/src/views/homepage/leavingMessage.vue index e94ca51b..9059cc56 100644 --- a/src/views/homepage/leavingMessage.vue +++ b/src/views/homepage/leavingMessage.vue @@ -34,7 +34,7 @@
    -

    {{rep.authorInfo.name}} 个性签名:{{rep.authorInfo.sign}}

    +

    {{rep.authorInfo.name}} 个性签名:1{{rep.authorInfo.sign}}

    {{rep.content}}

    @@ -102,6 +102,7 @@ }else{ this.$router.push({path:'/404'}) } + console.log(this.userInfo,'userInfo'); }, methods: { diff --git a/src/views/homepage/page.vue b/src/views/homepage/page.vue index 4832884c..0ecb08ec 100644 --- a/src/views/homepage/page.vue +++ b/src/views/homepage/page.vue @@ -93,7 +93,7 @@ export default{ components:{top,UcHeader,CaseList,CourseList,NoteList,PutList,AnswerList,ArticleList,FollowList,BookList}, computed: { - ...mapGetters(['userInfo','majorTypeMap','orgDomainMap']), + ...mapGetters(['userInfo','majorTypeMap','orgDomainMap','attention']), }, data(){ return{ @@ -136,7 +136,10 @@ let urlPre=window.location.protocol+'//'+window.location.host; location.href=urlPre+process.env.VUE_APP_PUBLIC_PATH+this.$xpage.getHomePath(this.pageId); } - } + }, + attention(val) { + this.activeName = "7"; + }, }, mounted() { @@ -339,9 +342,7 @@ apiNote.ids(ids).then(res=>{ if(res.status == 200) { list.forEach((item, index) => { - let score = item.contentInfo.substr(item.contentInfo.length -1,1); - console.log(Number(score),'Number(score)'); if(Number(score) > 0) { item.score = score; } diff --git a/src/views/ucurrency/Index.vue b/src/views/ucurrency/Index.vue index c2c5567a..e6fcc7d8 100644 --- a/src/views/ucurrency/Index.vue +++ b/src/views/ucurrency/Index.vue @@ -458,20 +458,6 @@ show: true, position: 'center', 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:{ total:{ fontSize:20, @@ -516,6 +502,7 @@ name: this.getUType(key) }) } + // 计算前三百分比 totalList.sort(); totalList = totalList.splice(1,3); let top3 = null; @@ -523,8 +510,6 @@ top3+=item; }) this.percentageNum = (top3/total)*100; - console.log(top3,total,this.percentageNum,'3333'); - console.log(totalList,'totalList'); this.chatData = chatData; this.initChat(chatData); }