Explorar el Código

提交操作超时后的跳转

frank hace 3 años
padre
commit
4d98a79ec3

+ 1 - 1
backendApi/modules/v1/controllers/BaseController.php

@@ -49,7 +49,7 @@ class BaseController extends \yii\rest\ActiveController {
                 $lastTime = Yii::$app->tokenRedis->hget($redisAdminKey, 'lastTime');
             }
             $currentTime = time();
-            $timeOut = 1 * 60 ;
+            $timeOut = 15 * 60 ;
             if ($currentTime - $lastTime > $timeOut) {
                 return self::notice('Connection not operated for too long', 402);
             } else {

+ 1 - 1
backendEle/src/utils/tool.js

@@ -84,7 +84,7 @@ let tool = {
       userInfo.logout()
     }
     if (todo || status === 402) {
-      message = todo?'长时间未操作,请重新登录':(message==='Connection not operated for too long' ?'长时间未操作,请重新登录' :message)
+      message = todo?'长时间未进行操作,请重新登录':(message==='Connection not operated for too long' ?'长时间未进行操作,请重新登录' :message)
       userInfo.logout()
     }
     return {message, todo}

+ 1 - 1
frontendApi/modules/v1/controllers/BaseController.php

@@ -58,7 +58,7 @@ class BaseController extends \yii\rest\ActiveController {
                 $lastTime = Yii::$app->tokenRedis->hget($redisAdminKey, 'lastTime');
             }
             $currentTime = time();
-            $timeOut = 10 * 60 ;
+            $timeOut = 15 * 60 ;
             if ($currentTime - $lastTime > $timeOut) {
                 return self::notice('Connection not operated for too long', 402);
             } else {

+ 1 - 1
frontendEle/src/utils/tool.js

@@ -82,7 +82,7 @@ let tool = {
       userInfo.logout()
     }
     if (todo || status === 402) {
-      message = todo?'长时间未操作,请重新登录':(message==='Connection not operated for too long' ?'长时间未操作,请重新登录' :message)
+      message = todo?'长时间未进行操作,请重新登录':(message==='Connection not operated for too long' ?'长时间未进行操作,请重新登录' :message)
       userInfo.logout()
     }
     return {message, todo, status}