natasha пре 3 година
родитељ
комит
fcc7ddf80e
2 измењених фајлова са 3 додато и 3 уклоњено
  1. 2 2
      src/App.vue
  2. 1 1
      src/components/login/LoginNav.vue

+ 2 - 2
src/App.vue

@@ -28,12 +28,12 @@ export default {
   methods:{
       // 判断是否为chrome浏览器 
       handleUserAgentRoot(){
-          if(!localStorage.getItem("useragent_root_close") && navigator.userAgent.indexOf('Chrome') == -1){
+          if(!sessionStorage.getItem("useragent_root_close") && navigator.userAgent.indexOf('Chrome') == -1){
               this.userAgentTipShow = true
           }
       },
       handleClickUserAgent(){
-          localStorage.setItem("useragent_root_close", true);
+          sessionStorage.setItem("useragent_root_close", true);
           this.userAgentTipShow = false
       },
   }

+ 1 - 1
src/components/login/LoginNav.vue

@@ -226,7 +226,7 @@ export default {
       Cookies.remove("session_id");
       Cookies.remove("user_code");
       Cookies.remove("user_type");
-      localStorage.removeItem("useragent_root_close");
+      sessionStorage.removeItem("useragent_root_close");
       removeToken();
       this.userShow = false;
       this.userMessage = null;