natasha пре 2 година
родитељ
комит
85d055fffe
3 измењених фајлова са 9 додато и 50 уклоњено
  1. 0 36
      src/App.vue
  2. 7 11
      src/components/login/login.vue
  3. 2 3
      src/views/login/index.vue

+ 0 - 36
src/App.vue

@@ -29,21 +29,6 @@ export default {
       this.dir = "rtl";
       this.dir = "rtl";
     }
     }
     this.handleUserAgentRoot()
     this.handleUserAgentRoot()
-    window.addEventListener(
-        'click',()=>{
-            sessionStorage.setItem('lastClickTime',new Date().getTime())
-        }
-    )
-    window.addEventListener(
-        'mousewheel',()=>{
-            sessionStorage.setItem('lastClickTime',new Date().getTime())
-        }
-    )
-    window.addEventListener(
-        'mousemove',()=>{
-            sessionStorage.setItem('lastClickTime',new Date().getTime())
-        }
-    )
   },
   },
   methods:{
   methods:{
       // 判断是否为chrome浏览器 
       // 判断是否为chrome浏览器 
@@ -56,29 +41,8 @@ export default {
           sessionStorage.setItem("useragent_root_close", true);
           sessionStorage.setItem("useragent_root_close", true);
           this.userAgentTipShow = false
           this.userAgentTipShow = false
       },
       },
-      // 是否超时
-    isTimeOut(){
-        clearInterval(this.timeOut)
-        this.timeOut = setInterval(()=>{
-            let lastClickTime = sessionStorage.getItem('lastClickTime')*1
-            let nowTime = new Date().getTime()
-            let dataConfig = JSON.parse(getConfig());
-            if(nowTime - lastClickTime > 1000 * dataConfig.user_connection_timeout_duration){
-                clearInterval(this.timeOut)
-                removeSession("SysList");
-                removeToken();
-                Cookies.remove("JSESSIONID");
-                this.userShow = false;
-                this.userMessage = null;
-                sessionStorage.removeItem("useragent_root_close");
-                window.location.href = dataConfig.sys_home_url
-            }
-        })
-    }
   },
   },
   mounted(){
   mounted(){
-    sessionStorage.setItem('lastClickTime',new Date().getTime())
-    this.isTimeOut()
   },
   },
 };
 };
 </script>
 </script>

+ 7 - 11
src/components/login/login.vue

@@ -110,7 +110,7 @@
             />
             />
           </div>
           </div>
         </div>
         </div>
-        <div class="verificationCode-box">
+        <!-- <div class="verificationCode-box">
           <input
           <input
             type="text"
             type="text"
             :class="'input'"
             :class="'input'"
@@ -123,7 +123,7 @@
                 :class="VerificationCodeShow ? 'waitTime' : 'getVerification'">
                 :class="VerificationCodeShow ? 'waitTime' : 'getVerification'">
                 {{ VerificationCodeShow ? time+'s' : $t("Key93") }}
                 {{ VerificationCodeShow ? time+'s' : $t("Key93") }}
           </div>
           </div>
-        </div>
+        </div> -->
       </template>
       </template>
       <!-- 验证码登录   v-show="loginType == '验证码'"
       <!-- 验证码登录   v-show="loginType == '验证码'"
        -->
        -->
@@ -225,7 +225,7 @@ import { setI18nLang } from "@/utils/i18n";
 export default {
 export default {
   //import引入的组件需要注入到对象中才能使用
   //import引入的组件需要注入到对象中才能使用
   components: { UserAgreement },
   components: { UserAgreement },
-  props: ["ForgetType", "changeLoginReg", "changeLoginType", "getChildSysList","changeEmailTips"],
+  props: ["ForgetType", "changeLoginReg", "changeLoginType", "getChildSysList"],
   data() {
   data() {
     //这里存放数据
     //这里存放数据
     return {
     return {
@@ -362,9 +362,9 @@ export default {
         password: md5(this.password).toUpperCase(),
         password: md5(this.password).toUpperCase(),
         verification_code_image_text: this.verificationCode,
         verification_code_image_text: this.verificationCode,
         verification_code_image_id: this.verificationCodeimgID,
         verification_code_image_id: this.verificationCodeimgID,
-        dynamic_verification_type:'EMAIL',
-        phone_or_email: this.email_phone,
-        dynamic_verification_code: this.emailCode
+        // dynamic_verification_type:'EMAIL',
+        // phone_or_email: this.email_phone,
+        // dynamic_verification_code: this.emailCode
       };
       };
       if (this.rememberMe) {
       if (this.rememberMe) {
       } else {
       } else {
@@ -385,10 +385,7 @@ export default {
             };
             };
             localStorage.setItem("user_name", JSON.stringify(obj));
             localStorage.setItem("user_name", JSON.stringify(obj));
           }
           }
-        setToken(res);
-          if(res.last_update_password_days>=res.sys_recommend_password_update_days){
-            this.changeEmailTips(res.last_update_password_days)
-          }else{
+          setToken(res);
             this.$message.success(this.$t("Key442"));
             this.$message.success(this.$t("Key442"));
             setI18nLang(this.language_type).then(() => {
             setI18nLang(this.language_type).then(() => {
                 if (
                 if (
@@ -401,7 +398,6 @@ export default {
                     this.getChildSysList();
                     this.getChildSysList();
                 }
                 }
             });
             });
-          }
         })
         })
         .catch((err) => {
         .catch((err) => {
           this.isLogin = false;
           this.isLogin = false;

+ 2 - 3
src/views/login/index.vue

@@ -32,7 +32,6 @@
               :changeLoginReg="changeLoginReg"
               :changeLoginReg="changeLoginReg"
               :changeLoginType="changeLoginType"
               :changeLoginType="changeLoginType"
               :getChildSysList="getChildSysList"
               :getChildSysList="getChildSysList"
-              :changeEmailTips="changeEmailTips"
             />
             />
           </div>
           </div>
           <div
           <div
@@ -90,7 +89,7 @@
         <p>{{ $t("Key247") }}...</p>
         <p>{{ $t("Key247") }}...</p>
       </div>
       </div>
     </template>
     </template>
-    <div class="emailTipsBox" v-if="emailTipShow">
+    <!-- <div class="emailTipsBox" v-if="emailTipShow">
         <div class="emailTipsBox-innder">
         <div class="emailTipsBox-innder">
             <img
             <img
                 src="../../assets/login/close-forget.png"
                 src="../../assets/login/close-forget.png"
@@ -101,7 +100,7 @@
             <b>您已{{emailTipDay}}天未修改密码,为了账户安全,请更改密码。</b>
             <b>您已{{emailTipDay}}天未修改密码,为了账户安全,请更改密码。</b>
             <a @click="changeLoginReg('Forget password')">好的</a>
             <a @click="changeLoginReg('Forget password')">好的</a>
         </div>
         </div>
-    </div>
+    </div> -->
   </div>
   </div>
 </template>
 </template>