Procházet zdrojové kódy

修改系统维护模块

zhuliu před 2 roky
rodič
revize
3c3cda4611

+ 1 - 1
RMS-FrontEnd/src/config/index.js

@@ -1,7 +1,7 @@
 const doname = /^([\w-]+\.)+((com)|(net)|(org)|(gov\.cn)|(info)|(cc)|(com\.cn)|(net\.cn)|(org\.cn)|(name)|(biz)|(tv)|(cn)|(mobi)|(name)|(sh)|(ac)|(io)|(tw)|(com\.tw)|(hk)|(com\.hk)|(ws)|(travel)|(us)|(tm)|(la)|(me\.uk)|(org\.uk)|(ltd\.uk)|(plc\.uk)|(in)|(eu)|(it)|(jp))$/;
 export default {
     baseURL: "/api",
-    updateTime:'2023-08-03 13:30:00',
+    updateTime:'2023-08-04 08:00:00',
     host: window.location.host,
     hostname: window.location.hostname,
     staticURL: process.env.NODE_ENV === 'production' ? window.location.protocol+'//'+window.location.hostname+':8084' : (process.env.NODE_ENV === 'test'?'http://139.224.24.90:8083':'http://192.168.1.24:8084'),

+ 7 - 1
RMS-FrontEnd/src/views/index/index.vue

@@ -26,7 +26,13 @@ export default {
             if(that.input == 'xiaoshi'){
               that.show = false
               clearInterval(that.timer)
-              that.$router.push({path: '/admin/login'})
+              that.$router.push(
+                {
+                  name: 'Login',
+                  params:{
+                    canShow:true
+                  }
+                })
             }else{
               that.$set(that,'input','')
             }

+ 33 - 26
RMS-FrontEnd/src/views/login/index.vue

@@ -162,6 +162,9 @@ export default {
     };
   },
   computed: {
+    canShow(){
+      return this.$route.params.canShow
+    },
     // 获取当前时间
     currentTime() {
       return formatAxis(new Date());
@@ -182,36 +185,40 @@ export default {
     var time = new Date(this.$c.updateTime).getTime()
     var time2 = new Date().getTime()
     if(time2 < time){
-      this.$router.push({path: '/'})
-      return false
+      if(!this.canShow){
+        this.$router.push({path: '/'})
+        return false
+      }else{
+        this.show = true
+      }
     }else{
       this.show = true
     }
-    
-    var url=location.href;
-    var params=url.split("?");
-       if(params[1]){
-         var a = params[1]
-          var b= a.split("=")
-          // console.log(b[1])
-          if(b){
-            var token=b[1]
-            this.$api.IsadminLogin({token:token}).then(response=>{
-              // console.log(response)
-              if(response.data==true){
-                 this.$router.push({
-                    path: '/admin/rManage'
-                  })
-              }else{
-                this.$message.error('您未登录,请重新登录!')
-              }
+    if(!this.canShow){
+      var url=location.href;
+      var params=url.split("?");
+        if(params[1]){
+          var a = params[1]
+            var b= a.split("=")
+            // console.log(b[1])
+            if(b){
+              var token=b[1]
+              this.$api.IsadminLogin({token:token}).then(response=>{
+                // console.log(response)
+                if(response.data==true){
+                  this.$router.push({
+                      path: '/admin/rManage'
+                    })
+                }else{
+                  this.$message.error('您未登录,请重新登录!')
+                }
+                
+              })
               
-            })
-             
-          }
- 
-       }
-    
+            }
+  
+        }
+      }
     this.initTime();
    
   },