From 6cc278a2ffb418d1172ed84cf3b0b554b090cc8b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 28 七月 2021 14:29:50 +0800
Subject: [PATCH] 2021-07-28

---
 src/views/login/loginform.jsx |    7 ++++---
 src/locales/en-US/login.js    |    4 ++--
 src/locales/zh-CN/login.js    |    4 ++--
 src/views/login/index.jsx     |    9 ++++++---
 4 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/src/locales/en-US/login.js b/src/locales/en-US/login.js
index 513d262..f2df2c1 100644
--- a/src/locales/en-US/login.js
+++ b/src/locales/en-US/login.js
@@ -1,7 +1,7 @@
 export default {
   'login.auth.tip': 'The system is not authorized, please contact the administrator.',
-  'login.auth.ok': 'OK',
-  'login.auth.cancel': 'Cancel',
+  'login.ok': 'OK',
+  'login.cancel': 'Cancel',
   'login.username': 'Username',
   'login.username.empty': 'Please input your username!',
   'login.phone': 'Mobile phone no',
diff --git a/src/locales/zh-CN/login.js b/src/locales/zh-CN/login.js
index 70de125..321aa63 100644
--- a/src/locales/zh-CN/login.js
+++ b/src/locales/zh-CN/login.js
@@ -1,7 +1,7 @@
 export default {
   'login.auth.tip': '绯荤粺鏈巿鏉冿紝璇疯仈绯荤鐞嗗憳銆�',
-  'login.auth.ok': '纭畾',
-  'login.auth.cancel': '鍙栨秷',
+  'login.ok': '纭畾',
+  'login.cancel': '鍙栨秷',
   'login.username': '鐢ㄦ埛鍚�',
   'login.username.empty': '璇疯緭鍏ョ敤鎴峰悕!',
   'login.phone': '鎵嬫満鍙�',
diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx
index 15916d9..ace4c55 100644
--- a/src/views/login/index.jsx
+++ b/src/views/login/index.jsx
@@ -29,6 +29,7 @@
     dict: iszhCN ? zhCN : enUS,
     isDisabled: false,
     auth: false,
+    authError: '',
     loginlogo: window.GLOB.loginlogo || '',
     bgImage: window.GLOB.bgImage || '',
     platName: window.GLOB.platName || '',
@@ -273,7 +274,8 @@
         } else if (res.ErrCode === 'N') {
           localStorage.removeItem(_authUrl)
           this.setState({
-            auth: false
+            auth: false,
+            authError: res.message
           })
         }
       })
@@ -539,6 +541,7 @@
             platName={this.state.platName}
             dict={this.state.dict}
             auth={this.state.auth}
+            authError={this.state.authError}
             touristLogin={touristLogin}
             loginWays={loginWays}
             lang={this.state.selectedlang}
@@ -559,8 +562,8 @@
         {/* 缂栬緫鐘舵�佺櫥褰� */}
         <Modal
           title={this.state.dict['login.sync.cloud']}
-          okText={this.state.dict['login.auth.ok']}
-          cancelText={this.state.dict['login.auth.cancel']}
+          okText={this.state.dict['login.ok']}
+          cancelText={this.state.dict['login.cancel']}
           visible={this.state.syncApp}
           onOk={this.syncSubmit}
           maskClosable={false}
diff --git a/src/views/login/loginform.jsx b/src/views/login/loginform.jsx
index 8dff444..3e19642 100644
--- a/src/views/login/loginform.jsx
+++ b/src/views/login/loginform.jsx
@@ -19,6 +19,7 @@
     handleSubmit: PropTypes.func,
     dict: PropTypes.object,
     auth: PropTypes.bool,
+    authError: PropTypes.string,
     touristLogin: PropTypes.bool,
     lang: PropTypes.string,
     langList: PropTypes.array,
@@ -110,9 +111,9 @@
     e.preventDefault()
     if (!this.props.auth) {
       warning({
-        title: this.props.dict['login.auth.tip'],
-        okText: this.props.dict['login.auth.ok'],
-        cancelText: this.props.dict['login.auth.cancel'],
+        title: this.props.authError || this.props.dict['login.auth.tip'],
+        okText: this.props.dict['login.ok'],
+        cancelText: this.props.dict['login.cancel'],
         onOk() {},
         onCancel() {}
       })

--
Gitblit v1.8.0