Browse Source

Merge branch 'master' of http://221.216.211.14:3000/GCLS/GCLS_Page_Personal

gcj 3 years ago
parent
commit
97edf5b13d

+ 48 - 0
src/App.vue

@@ -1,6 +1,11 @@
 <template>
   <div id="app" :dir="dir">
     <router-view />
+    <div class="userAgentTips" v-if="userAgentTipShow">
+        <img src="./assets/userAgentWarning.png" width="32px" />
+        <span>当前浏览器可能与网站不兼容!建议使用 chrome 浏览器获得最佳使用体验。 </span>
+        <img src="./assets/userAgentClose.png" width="16px" @click="handleClickUserAgent" />
+    </div>
   </div>
 </template>
 
@@ -10,6 +15,7 @@ export default {
   data() {
     return {
       dir: "ltr",
+      userAgentTipShow: false,
     };
   },
   created() {
@@ -17,6 +23,48 @@ export default {
     if (lang_type == "AR") {
       this.dir = "rtl";
     }
+    if(localStorage.getItem("useragent_root_type")&&localStorage.getItem("useragent_root_type")!=='true'&&!localStorage.getItem("useragent_root_close")){
+        this.userAgentTipShow = true
+    }else{
+        this.handleUserAgentRoot()
+    }
   },
+  methods:{
+      // 判断是否为chrome浏览器 
+      handleUserAgentRoot(){
+          if(navigator.userAgent.indexOf('Chrome') > -1){
+              localStorage.setItem("useragent_root_type", true);
+          }else{
+              localStorage.setItem("useragent_root_type", false);
+          }
+      },
+      handleClickUserAgent(){
+          localStorage.setItem("useragent_root_close", true);
+          this.userAgentTipShow = false
+      },
+  }
 };
 </script>
+<style lang="scss" scoped>
+.userAgentTips{
+    position: fixed;
+    top: 62px;
+    left: 50%;
+    // width: 624px;
+    margin-left: -312px;
+    background: #FFFFFF;
+    border-radius: 8px;
+    padding: 12px 16px 12px 8px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    font-size: 16px;
+    line-height: 24px;
+    :nth-child(1){
+        margin-right: 8px;
+    }
+    :nth-child(3){
+        cursor: pointer;
+    }
+}
+</style>

BIN
src/assets/userAgentClose.png


BIN
src/assets/userAgentWarning.png


+ 4 - 2
src/components/Personalcenter/Mymessage.vue

@@ -36,7 +36,6 @@
                   class="cc-msg-content"
                   :class="[
                     msgItem.is_read == 'true' ? 'active' : '',
-                    msgItem.isShow ? 'showAll' : 'overflow',
                   ]"
                   v-html="msgItem.content"
                 ></div>
@@ -174,6 +173,9 @@ export default {
           msgItem.is_read = "true";
         });
       }
+      if(msgItem.message_type==101){
+          window.location.href = `/GCLS-Learn/#/main`;
+      }
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -291,7 +293,7 @@ export default {
           }
           &-content {
             max-width: 712px;
-            height: 20px;
+            // height: 20px;
             font-size: 14px;
             line-height: 150%;
             color: #2c2c2c;

+ 1 - 0
src/components/common/Header.vue

@@ -204,6 +204,7 @@ export default {
     },
     QuitLogin() {
       removeToken();
+      localStorage.removeItem("useragent_root_close");
       this.userShow = false;
       this.userMessage = null;
       window.location.href = "/";