From f3d4db769ba9b51b799d981511a710fd443d0e08 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 21 四月 2025 12:18:03 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/components/resetPassword/index.jsx | 42 ++++++++++++++++++++++++++---------------- 1 files changed, 26 insertions(+), 16 deletions(-) diff --git a/src/components/resetPassword/index.jsx b/src/components/resetPassword/index.jsx index a72283a..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 => { @@ -60,10 +61,14 @@ func: 's_PwdUpt', LText: `select '${res.originpwd}','${res.password}'` } + + if (window.GLOB.execType === 'x') { + _param.exec_type = 'x' + } - _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') // 鏃堕棿鎴� - _param.LText = Utils.formatOptions(_param.LText) // 鍏抽敭瀛楃鏇挎崲锛宐ase64鍔犲瘑 - _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) // md5瀵嗛挜 + _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + _param.LText = Utils.formatOptions(_param.LText, _param.exec_type) + _param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : _param.LText, _param.timestamp) Api.getSystemConfig(_param).then(result => { if (result.status) { @@ -73,7 +78,7 @@ }) notification.success({ top: 92, - message: '淇敼鎴愬姛锛岃閲嶆柊鐧诲綍銆�', + message: dict['re_login'] || '淇敼鎴愬姛锛岃閲嶆柊鐧诲綍銆�', duration: 2 }) this.callback && this.callback() @@ -94,7 +99,7 @@ if (!/^1[3456789]\d{9}$/.test(res.phone)) { notification.warning({ top: 92, - message: '鎵嬫満鍙锋牸寮忛敊璇紝璇烽噸濉紒', + message: dict['phone_error'] || '鎵嬫満鍙锋牸寮忛敊璇紝璇烽噸濉紒', duration: 5 }) return @@ -110,7 +115,7 @@ this.setState({ code: res.vercode, type: 'phonepwd', - okText: '纭畾' + okText: dict['ok'] || '纭畾' }) }, () => {}) } else if (type === 'phonepwd') { @@ -125,10 +130,14 @@ mob: this.state.mob, check_code: this.state.code } + + if (window.GLOB.execType === 'x') { + _param.exec_type = 'x' + } - _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') // 鏃堕棿鎴� - _param.LText = Utils.formatOptions(_param.LText) // 鍏抽敭瀛楃鏇挎崲锛宐ase64鍔犲瘑 - _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) // md5瀵嗛挜 + _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + _param.LText = Utils.formatOptions(_param.LText, _param.exec_type) + _param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : _param.LText, _param.timestamp) Api.getSystemConfig(_param).then(result => { if (result.status) { @@ -138,7 +147,7 @@ }) notification.success({ top: 92, - message: '淇敼鎴愬姛锛岃閲嶆柊鐧诲綍銆�', + message: dict['re_login'] || '淇敼鎴愬姛锛岃閲嶆柊鐧诲綍銆�', duration: 2 }) this.callback && this.callback() @@ -158,22 +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={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