From 7506900639d82442b6def1a15049b5b6a88b44ba Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 27 五月 2022 20:29:33 +0800
Subject: [PATCH] 保存时间限制

---
 src/views/login/index.jsx |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx
index 09d4090..036109b 100644
--- a/src/views/login/index.jsx
+++ b/src/views/login/index.jsx
@@ -517,6 +517,26 @@
             // res.indexlogo = res.indexlogo ? res.indexlogo.replace(/:8080/ig, '').replace(/http:/ig, 'https:') : ''
             // res.loginlogo = res.loginlogo ? res.loginlogo.replace(/:8080/ig, '').replace(/http:/ig, 'https:') : ''
 
+            if (options.sysType === 'local' && window.GLOB.systemType !== 'production') {
+              if (md5(('mk' + window.GLOB.appkey + res.sys_datetime + res.member_type + res.registry_date).toLowerCase()) !== res.secret_key) {
+                Modal.warning({
+                  title: '瀵嗛挜閿欒锛岃鑱旂郴绠$悊鍛橈紒',
+                  okText: '鐭ラ亾浜�'
+                })
+                this.setState({
+                  auth: false,
+                  authError: '瀵嗛挜閿欒锛岃鑱旂郴绠$悊鍛橈紒'
+                })
+                return
+              } else if (res.member_type === 'personal' && res.registry_date) {
+                let saveDelay = 0
+                try {
+                  saveDelay = parseInt((new Date().getTime() - new Date(res.registry_date).getTime()) / 4320000)
+                  sessionStorage.setItem('mkDelay', saveDelay)
+                } catch(e) {}
+              }
+            }
+
             let _url = _href + 'system'
             let systemMsg = {
               favicon: res.titlelogo || '',

--
Gitblit v1.8.0