From 9ff5920c0a58771219b134a7b46b7d0c1e1542ad Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 19 六月 2024 23:50:13 +0800
Subject: [PATCH] 2024-06-19

---
 src/components/resetPassword/index.jsx |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/components/resetPassword/index.jsx b/src/components/resetPassword/index.jsx
index 71ca86a..de2862b 100644
--- a/src/components/resetPassword/index.jsx
+++ b/src/components/resetPassword/index.jsx
@@ -14,7 +14,8 @@
     visible: false,
     loading: false,
     type: 'account',
-    okText: '纭畾',
+    okText: window.GLOB.dict['ok'] || '纭畾',
+    dict: window.GLOB.dict,
     smsId: '',
     mob: '',
     code: ''
@@ -40,7 +41,7 @@
       visible: true,
       loading: false,
       type: 'account',
-      okText: '纭畾',
+      okText: window.GLOB.dict['ok'] || '纭畾',
       mob: '',
       code: '',
       smsId: sessionStorage.getItem('mk_sms_id') || ''
@@ -48,7 +49,7 @@
   }
 
   resetPwdSubmit = () => {
-    const { type } = this.state
+    const { type, dict } = this.state
 
     if (type === 'account') {
       this.formRef.handleConfirm().then(res => {
@@ -77,7 +78,7 @@
             })
             notification.success({
               top: 92,
-              message: '淇敼鎴愬姛锛岃閲嶆柊鐧诲綍銆�',
+              message: dict['re_login'] || '淇敼鎴愬姛锛岃閲嶆柊鐧诲綍銆�',
               duration: 2
             })
             this.callback && this.callback()
@@ -98,7 +99,7 @@
         if (!/^1[3456789]\d{9}$/.test(res.phone)) {
           notification.warning({
             top: 92,
-            message: '鎵嬫満鍙锋牸寮忛敊璇紝璇烽噸濉紒',
+            message: dict['phone_error'] || '鎵嬫満鍙锋牸寮忛敊璇紝璇烽噸濉紒',
             duration: 5
           })
           return
@@ -114,7 +115,7 @@
         this.setState({
           code: res.vercode,
           type: 'phonepwd',
-          okText: '纭畾'
+          okText: dict['ok'] || '纭畾'
         })
       }, () => {})
     } else if (type === 'phonepwd') {
@@ -146,7 +147,7 @@
             })
             notification.success({
               top: 92,
-              message: '淇敼鎴愬姛锛岃閲嶆柊鐧诲綍銆�',
+              message: dict['re_login'] || '淇敼鎴愬姛锛岃閲嶆柊鐧诲綍銆�',
               duration: 2
             })
             this.callback && this.callback()
@@ -166,23 +167,23 @@
   }
 
   render() {
-    const { visible, loading, okText, type, mob, smsId } = this.state
+    const { visible, loading, okText, type, mob, smsId, dict } = this.state
 
     return (
       <Modal
-        title="淇敼瀵嗙爜"
+        title={dict['ch_pwd'] || '淇敼瀵嗙爜'}
         wrapClassName="reset-password-modal"
         visible={visible}
         maskClosable={false}
         onOk={this.resetPwdSubmit}
         onCancel={() => { this.setState({ visible: false })}}
         okText={okText}
-        cancelText="鍙栨秷"
+        cancelText={dict['cancel'] || '鍙栨秷'}
         confirmLoading={loading}
         destroyOnClose
       >
         <Resetpwd type={type} mob={mob} smsId={smsId} wrappedComponentRef={(inst) => this.formRef = inst} resetPwdSubmit={this.resetPwdSubmit}/>
-        {type === 'account' && smsId ? <div className="forget-pwd"><span onClick={() => this.setState({type: 'mob', okText: '涓嬩竴姝�'})}>蹇樿瀵嗙爜锛�</span></div> : null}
+        {type === 'account' && smsId ? <div className="forget-pwd"><span onClick={() => this.setState({type: 'mob', okText: dict['next'] || '涓嬩竴姝�'})}>{dict['forgot_pwd'] || '蹇樿瀵嗙爜锛�'}</span></div> : null}
       </Modal>
     )
   }

--
Gitblit v1.8.0