Ver código fonte

修改网址跳转

11wqe1 3 semanas atrás
pai
commit
79e315f8d8
2 arquivos alterados com 39 adições e 12 exclusões
  1. 19 6
      src/components/sidebarL.vue
  2. 20 6
      src/components/topPage.vue

+ 19 - 6
src/components/sidebarL.vue

@@ -108,11 +108,24 @@ import { myMixin } from "@/mixins/mixin.js"
                         return e.region == 'cn'
                     })
                     
-                    // 如果hk,com没有图标,默认使用cn的
+                     // 如果hk,com没有图标,默认使用cn的
+                    if (!data[0].activeIcon){
+                        data[0].activeIcon = data2[0].activeIcon
+                    }
+                    if (!data[0].defaultIcon){
+                        data[0].defaultIcon = data2[0].defaultIcon
+                    }
+                    if (!data[0].hoverIcon){
+                        data[0].hoverIcon = data2[0].hoverIcon
+                    }
                     if (!data[0].icon){
                         data[0].icon = data2[0].icon
-                        data[0].activeIcon = data2[0].activeIcon
                     }
+                    if (!data[0].platformIcon){
+                        data[0].platformIcon = data2[0].platformIcon
+                    }
+                    // console.log('data3',data);
+
                     return data
                 };
             },
@@ -217,8 +230,8 @@ import { myMixin } from "@/mixins/mixin.js"
 
                 // 查出对应账号的应用区域地址
                 val.url.forEach(e => {
-                        // if (e.region == this.roleUser.schoolArea || e.region == this.roleUser.orgArea) {
-                    if (e.region == this.$region) {
+                    if (e.region == this.roleUser.schoolArea || e.region == this.roleUser.orgArea) {
+                    // if (e.region == this.$region) {
                         url = e.url
                     }
                 });
@@ -310,8 +323,8 @@ import { myMixin } from "@/mixins/mixin.js"
                 
                 let url = ''
                 val.url.forEach(e => {
-                    // if (e.region == this.roleUser.schoolArea || e.region == this.roleUser.orgArea) {
-                    if (e.region == this.$region) {
+                    if (e.region == this.roleUser.schoolArea || e.region == this.roleUser.orgArea) {
+                    // if (e.region == this.$region) {
                         url = e.url
                     }
                 });

+ 20 - 6
src/components/topPage.vue

@@ -63,7 +63,6 @@
                 :key="index+'1p'">
                 <div class="TabListCon">
                     <div v-for="(p,pin) in AppCon(item.url)" :key="pin+'p'">
-                        
                         <img class="imgApp"
                          :src="tabList[index].hovered ? p.hoverIcon ? p.hoverIcon : p.platformIcon : p.platformIcon" alt="">
                         <div class="TabListName">
@@ -235,22 +234,37 @@ import { myMixin } from "@/mixins/mixin.js"
             AppCon(){
                 return function(c) {
                     let k = JSON.parse(JSON.stringify(c))
-
+                    // console.log('k',k);
+                    
                     // 获取属于区域的url
                     let data = k.filter(e=>{
                         return e.region == this.roleUser.schoolArea || e.region == this.roleUser.orgArea
                     })
+                    // console.log('data',data);
 
-                    // 设置默认的区域的url(所在区域没有hover图标默认使用cn图标)
+                    // 设置默认的图标(所在区域没有hover图标默认使用cn图标)
                     let data2 = k.filter(e=>{
                         return e.region == 'cn'
                     })
+                    // console.log('data2',data2);
                     
                     // 如果hk,com没有图标,默认使用cn的
+                    if (!data[0].activeIcon){
+                        data[0].activeIcon = data2[0].activeIcon
+                    }
+                    if (!data[0].defaultIcon){
+                        data[0].defaultIcon = data2[0].defaultIcon
+                    }
+                    if (!data[0].hoverIcon){
+                        data[0].hoverIcon = data2[0].hoverIcon
+                    }
                     if (!data[0].icon){
                         data[0].icon = data2[0].icon
-                        data[0].activeIcon = data2[0].activeIcon
                     }
+                    if (!data[0].platformIcon){
+                        data[0].platformIcon = data2[0].platformIcon
+                    }
+                    // console.log('data3',data);
                     
                     return data
                 };
@@ -446,8 +460,8 @@ import { myMixin } from "@/mixins/mixin.js"
                 
                 let url = ''
                 val.url.forEach(e => {
-                     // if (e.region == this.roleUser.schoolArea || e.region == this.roleUser.orgArea) {
-                    if (e.region == this.$region) {
+                    if (e.region == this.roleUser.schoolArea || e.region == this.roleUser.orgArea) {
+                    // if (e.region == this.$region) {
                         url = e.url
                     }
                 });