From 9a11e62adeb8d435b52a361eb62d5b59e1deef2a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 23 五月 2024 21:14:50 +0800
Subject: [PATCH] 2024-05-23

---
 src/views/login/index.jsx |  344 ++++++++++++++++++++++++++------------------------------
 1 files changed, 160 insertions(+), 184 deletions(-)

diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx
index 9b220fc..d8a5ada 100644
--- a/src/views/login/index.jsx
+++ b/src/views/login/index.jsx
@@ -1,11 +1,12 @@
 import React, { Component } from 'react'
-import { message, Modal, notification } from 'antd'
+import { message, Modal } from 'antd'
 import md5 from 'md5'
 import moment from 'moment'
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js' 
-import options, { styles } from '@/store/options.js'
+import MKEmitter from '@/utils/events.js'
+import { styles } from '@/store/options.js'
 import zhCN from '@/locales/zh-CN/login.js'
 import enUS from '@/locales/en-US/login.js'
 import asyncComponent from '@/utils/asyncComponent'
@@ -13,7 +14,7 @@
 import './index.scss'
 
 const LoginForm = asyncLoadComponent(() => import('./loginform'))
-const Resetpwd = asyncLoadComponent(() => import('@/components/header/resetpwd'))
+const Resetpwd = asyncLoadComponent(() => import('@/components/resetPassword'))
 const LoginCloudForm = asyncComponent(() => import('./logincloudform'))
 const iszhCN = sessionStorage.getItem('lang') !== 'en-US'
 
@@ -38,15 +39,6 @@
     loginWays: null,
     touristLogin: false,
     syncing: false,
-    visible: false,
-    resetLoading: false
-  }
-
-  changelang (item) {
-    // 鍒囨崲璇█
-    this.setState({
-      dict: item === 'zh-CN' ? zhCN : enUS
-    })
   }
 
   handleSubmit = () => {
@@ -68,11 +60,8 @@
    * @param {Object} param 鐢ㄦ埛鍚嶅瘑鐮佺瓑淇℃伅
    */
   async loginsubmit (param) {
-    let city = sessionStorage.getItem('city') || ''
-    let ipAddress = sessionStorage.getItem('ipAddress') || ''
-
     // 鐧诲綍鎻愪氦
-    let res = await Api.getusermsg(param.username, param.password, false, ipAddress, city)
+    let res = await Api.getusermsg(param.username, param.password, false)
     if (res.status) {
       if (res.check_mob) {
         let loginWays = this.state.loginWays.filter(item => item.type === 'sms_vcode')
@@ -95,13 +84,11 @@
       sessionStorage.setItem('Full_Name', res.FullName)
       sessionStorage.setItem('avatar', res.icon || '')
       sessionStorage.setItem('dataM', res.dataM ? 'true' : '')
-      sessionStorage.setItem('localDataM', res.dataM ? 'true' : '')
       sessionStorage.setItem('debug', res.debug || '')
       sessionStorage.setItem('role_id', res.role_id || '')
       sessionStorage.setItem('departmentcode', res.departmentcode || '')
       sessionStorage.setItem('organization', res.organization || '')
       sessionStorage.setItem('mk_user_type', res.mk_user_type || '')
-      sessionStorage.setItem('localRole_id', res.role_id || '')
 
       if (res.paas_externalDatabase) {
         sessionStorage.setItem('externalDatabase', res.paas_externalDatabase)
@@ -114,15 +101,32 @@
       sessionStorage.removeItem('visitorUserID')
       sessionStorage.removeItem('visitorLoginUID')
       
-      if (param.remember) { // 璁颁綇瀵嗙爜鏃惰处鍙峰瘑鐮佸瓨鍏ocalStorage
-        localStorage.setItem(_href, window.btoa(window.encodeURIComponent(JSON.stringify({username: param.username, password: param.password}))))
+      let users = localStorage.getItem(_href + 'users')
+      
+      if (users) {
+        try {
+          users = JSON.parse(window.decodeURIComponent(window.atob(users)))
+        } catch (e) {
+          console.warn('Parse Failure')
+          users = []
+        }
       } else {
-        localStorage.removeItem(_href)
+        users = []
       }
+
+      users = users.filter(item => item.username !== param.username)
+
+      if (users.length > 4) {
+        users.length = 4
+      }
+
+      users.unshift({username: param.username, password: param.remember ? param.password : ''})
+
+      localStorage.setItem(_href + 'users', window.btoa(window.encodeURIComponent(JSON.stringify(users))))
 
       let level = localStorage.getItem(_href + 'pwdlevel')
 
-      if (level) {
+      if (level && process.env.NODE_ENV === 'production') {
         let visible = false
         let tip = '瀵嗙爜寮哄害涓嶅锛岃淇敼瀵嗙爜锛�'
         if (param.password.length < 8) {
@@ -142,22 +146,27 @@
         if (visible) {
           message.warning(tip)
           this.setState({
-            isDisabled: false,
-            visible: true
+            isDisabled: false
+          })
+          
+          MKEmitter.emit('resetpassword', () => {
+            const input = document.getElementById('password')
+            if (input) {
+              input.select()
+            }
           })
           return
         }
       }
 
-      let _history = sessionStorage.getItem('history')
-      if (_history) {
-        sessionStorage.removeItem('history')
-        // 鏌ョ湅鏄惁涓哄叾浠栭〉闈㈣烦杞紝璺緞瀛樺湪鏃讹紝璺冲洖鍘熼〉闈�
-        this.props.history.replace(_history)
+      let iframe = sessionStorage.getItem('iframe')
+      if (iframe) {
+        sessionStorage.removeItem('iframe')
+        this.props.history.replace(iframe.replace(/@loginuid@/, res.LoginUID))
       } else {
         this.props.history.replace('/main')
       }
-    } else if (res.ErrCode === 'Need_Get_Appkey' && options.sysType === 'SSO') {
+    } else if (res.ErrCode === 'Need_Get_Appkey' && window.GLOB.sysType === 'SSO') {
       message.warning('搴旂敤灏氭湭鍒涘缓锛岃鍚戜簯绔悓姝ュ簲鐢紒')
 
       this.setState({
@@ -172,7 +181,8 @@
           input.select()
         }
       } else if (res.message.indexOf('鐧诲綍鏉冮檺') > -1) {
-        const input = document.getElementById('username')
+        const wrap = document.getElementById('username')
+        const input = wrap ? wrap.getElementsByTagName('input')[0] : null
         if (input) {
           input.select()
         }
@@ -184,11 +194,8 @@
   }
 
   async phoneloginsubmit (param) {
-    let city = sessionStorage.getItem('city') || ''
-    let ipAddress = sessionStorage.getItem('ipAddress') || ''
-
     // 鐧诲綍鎻愪氦
-    let res = await Api.getphoneusermsg(param.phone, param.vercode, false, ipAddress, city)
+    let res = await Api.getphoneusermsg(param.phone, param.vercode, false)
     if (res.status) {
       sessionStorage.setItem('UserID', res.UserID)
       sessionStorage.setItem('LoginUID', res.LoginUID)
@@ -196,13 +203,11 @@
       sessionStorage.setItem('Full_Name', res.FullName)
       sessionStorage.setItem('avatar', res.icon || '')
       sessionStorage.setItem('dataM', res.dataM ? 'true' : '')
-      sessionStorage.setItem('localDataM', res.dataM ? 'true' : '')
       sessionStorage.setItem('debug', res.debug || '')
       sessionStorage.setItem('role_id', res.role_id || '')
       sessionStorage.setItem('departmentcode', res.departmentcode || '')
       sessionStorage.setItem('organization', res.organization || '')
       sessionStorage.setItem('mk_user_type', res.mk_user_type || '')
-      sessionStorage.setItem('localRole_id', res.role_id || '')
       
       if (res.paas_externalDatabase) {
         sessionStorage.setItem('externalDatabase', res.paas_externalDatabase)
@@ -215,15 +220,14 @@
       sessionStorage.removeItem('visitorUserID')
       sessionStorage.removeItem('visitorLoginUID')
 
-      let _history = sessionStorage.getItem('history')
-      if (_history) {
-        sessionStorage.removeItem('history')
-        // 鏌ョ湅鏄惁涓哄叾浠栭〉闈㈣烦杞紝璺緞瀛樺湪鏃讹紝璺冲洖鍘熼〉闈�
-        this.props.history.replace(_history)
+      let iframe = sessionStorage.getItem('iframe')
+      if (iframe) {
+        sessionStorage.removeItem('iframe')
+        this.props.history.replace(iframe.replace(/@loginuid@/, res.LoginUID))
       } else {
         this.props.history.replace('/main')
       }
-    } else if (res.ErrCode === 'Need_Get_Appkey' && options.sysType === 'SSO') {
+    } else if (res.ErrCode === 'Need_Get_Appkey' && window.GLOB.sysType === 'SSO') {
       message.warning('搴旂敤灏氭湭鍒涘缓锛岃鍚戜簯绔悓姝ュ簲鐢紒')
 
       this.setState({
@@ -247,13 +251,11 @@
         sessionStorage.setItem('Full_Name', res.FullName)
         sessionStorage.setItem('avatar', res.icon || '')
         sessionStorage.setItem('dataM', res.dataM ? 'true' : '')
-        sessionStorage.setItem('localDataM', res.dataM ? 'true' : '')
         sessionStorage.setItem('debug', res.debug || '')
         sessionStorage.setItem('role_id', res.role_id || '')
         sessionStorage.setItem('departmentcode', res.departmentcode || '')
         sessionStorage.setItem('organization', res.organization || '')
         sessionStorage.setItem('mk_user_type', res.mk_user_type || '')
-        sessionStorage.setItem('localRole_id', res.role_id || '')
 
         if (res.paas_externalDatabase) {
           sessionStorage.setItem('externalDatabase', res.paas_externalDatabase)
@@ -263,15 +265,14 @@
         sessionStorage.removeItem('visitorUserID')
         sessionStorage.removeItem('visitorLoginUID')
   
-        let _history = sessionStorage.getItem('history')
-        if (_history) {
-          sessionStorage.removeItem('history')
-          // 鏌ョ湅鏄惁涓哄叾浠栭〉闈㈣烦杞紝璺緞瀛樺湪鏃讹紝璺冲洖鍘熼〉闈�
-          this.props.history.replace(_history)
+        let iframe = sessionStorage.getItem('iframe')
+        if (iframe) {
+          sessionStorage.removeItem('iframe')
+          this.props.history.replace(iframe.replace(/@loginuid@/, res.LoginUID))
         } else {
           this.props.history.replace('/main')
         }
-      } else if (res.ErrCode === 'Need_Get_Appkey' && options.sysType === 'SSO') {
+      } else if (res.ErrCode === 'Need_Get_Appkey' && window.GLOB.sysType === 'SSO') {
         message.warning('搴旂敤灏氭湭鍒涘缓锛岃鍚戜簯绔悓姝ュ簲鐢紒')
   
         this.setState({
@@ -303,45 +304,22 @@
         document.getElementsByTagName('head')[0].removeChild(JSONP)
       },500)
     })
-}
+  }
 
   componentDidMount () {
     // md5("/ws/location/v1/ip?callback=callbackFunction&key=key&output=jsonp secret key")
     // md5("/ws/location/v1/ip?callback=callbackFunction&key=BA7BZ-4QB65-LFCIA-QPDA6-4G6O7-MJB4Q&output=jsonpuThL4ZM3XOj642ksEQh76tyHFjh4")
 
-    // 鑾峰彇ip鍙婂煄甯備俊鎭�
-    // let ipurl = window.atob('aHR0cHM6Ly9lcGMubWs5a$mkC5jbi93ZWJhcGkvaXBsb2M='.replace(/\$mk/ig, ''))
-    // Api.directRequest(ipurl, 'get', null, 'true').then(res => {
-    //   if (!res || !res.ip) return
-    //   sessionStorage.setItem('ipAddress', res.ip)
-    // })
+    setTimeout(() => {
+      Api.delCacheConfig()
+    }, 50)
+
     if (window.GLOB.filter) {
       let view = document.getElementById('mk-login-view')
       
       if (view) {
         view.style.filter = 'grayscale(100%)'
       }
-    }
-
-    if (sessionStorage.getItem('loginError')) {
-      try {
-        let res = JSON.parse(sessionStorage.getItem('loginError'))
-        console.info(res.url)
-        console.info(res.request)
-        console.info(res.response)
-
-        let result = JSON.parse(res.response)
-
-        notification.warning({
-          top: 92,
-          message: result.message,
-          duration: 5
-        })
-      } catch (e) {}
-      
-      setTimeout(() => {
-        sessionStorage.removeItem('loginError')
-      }, 2000)
     }
 
     const _addressUrl = _href + 'queryAddress'
@@ -358,6 +336,7 @@
     authCode = authCode ? authCode.split(',') : []
     let index = authCode.findIndex(key => key === _s)
     let license = false
+    let appkey = window.GLOB.localkey || window.GLOB.appkey
 
     if (window.GLOB.licenseKey) {
       if (window.GLOB.licenseKey.length !== 20) {
@@ -366,7 +345,7 @@
           okText: '鐭ラ亾浜�'
         })
       } else {
-        let key = md5(window.GLOB.appId + 'minke_software' + window.GLOB.appkey).toUpperCase().substr(-6)
+        let key = md5(window.GLOB.appId + 'minke_software' + appkey).toUpperCase().substr(-6)
   
         let key1 = window.GLOB.licenseKey.substring(0, 6)
         let key2 = window.GLOB.licenseKey.substring(6, 14)
@@ -374,7 +353,7 @@
         let key4 = md5(key1 + key2).toUpperCase().substr(-6)
   
         if (key === key1 && key3 === key4) {
-          let last = window.GLOB.appkey[window.GLOB.appkey.length - 1]
+          let last = appkey[appkey.length - 1]
           let offset = 0
           let keys = {}
       
@@ -438,22 +417,17 @@
     }
 
     if (!window.GLOB.licenseKey && (index === -1 || index > 5)) {
-      let _appId = window.GLOB.appId
-  
-      if (options.sysType === 'cloud') { // 浜戠浣跨敤绯荤粺閰嶇疆appid
-        _appId = options.caId
-      }
-  
-      let str = md5('MK19' + _appId + timeStamp)
+      let str = md5('MK19' + window.GLOB.appId + timeStamp)
       let _rduri = window.atob('aHR0cHM6Ly9lcGMubWs5aC5$mkjbi93ZWJhcGkvZG9zdGFycw=='.replace(/\$mk/ig, ''))
       let _func = window.atob('c0VtcG93ZXJDbG91$mkZF9HZXRfTGlua1VybA=='.replace(/\$mk/ig, ''))
       let _id = window.atob('YmgwYmFwYWJ0ZDQ1ZXBz$mkZ3JhNzlzZWdiY2g2YzFpYms='.replace(/\$mk/ig, ''))
   
       let param = {
         func: _func,
-        AppID: _appId,
+        AppID: window.GLOB.appId,
         TimeStamp: timeStamp,
-        appkey: window.GLOB.appkey,
+        appkey: appkey,
+        SessionUid: localStorage.getItem('SessionUid') || '',
         userid: _id,
         LoginUID: _id,
         nonc: Utils.getuuid()
@@ -476,7 +450,11 @@
       param.sign = md5(values)
       param.t = new Date().getTime()
   
-      Api.directRequest(_rduri + '/' + _func, 'post', param, 'true').then(res => {
+      Api.directRequest({
+        url: _rduri + '/' + _func,
+        method: 'post',
+        data: JSON.stringify(param)
+      }).then(res => {
         if (res.status) {
           if (res.EPC === str) {
             let box = []
@@ -486,6 +464,16 @@
             }
             box = box.join(',')
             localStorage.setItem(_authUrl, box)
+
+            if (res.e_files === 'true') {
+              localStorage.setItem(_href + 'files', md5(_href + 'files'))
+              localStorage.setItem(_href + 'filesDate', res.e_files_end_date)
+              window.GLOB.storeFiles = true
+              window.GLOB.storeDate = Math.ceil((new Date(res.e_files_end_date).getTime() - new Date().getTime()) / 86400000)
+            } else {
+              localStorage.removeItem(_href + 'files')
+              window.GLOB.storeFiles = false
+            }
     
             this.setState({
               auth: true
@@ -499,6 +487,9 @@
             }
           } else {
             localStorage.removeItem(_authUrl)
+            localStorage.removeItem(_href + 'files')
+            window.GLOB.storeFiles = false
+
             this.setState({
               auth: false
             })
@@ -517,25 +508,55 @@
             authError: res.message
           })
         }
+      }, (error) => {
+        if (error && error.ErrCode === 'LoginError') {
+          let param = {
+            func: 's_visitor_login',
+            timestamp: moment().format('YYYY-MM-DD HH:mm:ss'), 
+            SessionUid: _id,
+            TypeCharOne: 'pc',
+            appkey: '202004041613277377A6A2456D34A4948AE84'
+          }
+
+          param.LText = md5(window.btoa(_id + param.timestamp))
+          param.secretkey = md5(param.LText + 'mingke' + param.timestamp)
+
+          let params = {
+            url: _rduri.replace('dostars', 'dologon'),
+            method: 'post',
+            data: JSON.stringify(param)
+          }
+
+          Api.directRequest(params)
+
+          return
+        }
+
+        if (index === -1 || index > 10) {
+          this.setState({
+            auth: false,
+            authError: '缃戠粶閿欒瀵艰嚧绯荤粺鎺堟潈澶辫触锛岃鑱旂郴绠$悊鍛樸��'
+          })
+        }
       })
     }
 
     Api.getTouristMsg().then(result => {
       if (result.status) {
-        if (result.website && process.env.NODE_ENV === 'production') {
-          let website = result.website.replace(/http(s)?:\/\/|\/$/ig, '').toLowerCase()
-          let current = window.GLOB.baseurl.replace(/http(s)?:\/\/|\/$/ig, '').toLowerCase()
+        // if (result.website && process.env.NODE_ENV === 'production') {
+        //   let website = result.website.replace(/http(s)?:\/\/|\/$/ig, '').toLowerCase()
+        //   let current = window.GLOB.baseurl.replace(/http(s)?:\/\/|\/$/ig, '').toLowerCase()
 
-          if (website !== current) {
-            try {
-              window.history.replaceState(null, null, result.website.replace(/\/$/ig, '') + '/admin/index.html#/login')
-              window.location.reload()
-            } catch(e) {
-              window.location.href = result.website.replace(/\/$/ig, '') + '/admin/index.html#/login'
-            }
-            return
-          }
-        }
+        //   if (website !== current) {
+        //     try {
+        //       window.history.replaceState(null, null, result.website.replace(/\/$/ig, '') + '/admin/index.html#/login')
+        //       window.location.reload()
+        //     } catch(e) {
+        //       window.location.href = result.website.replace(/\/$/ig, '') + '/admin/index.html#/login'
+        //     }
+        //     return
+        //   }
+        // }
         
         sessionStorage.setItem('visitorUserID', result.UserID || '')
         sessionStorage.setItem('visitorLoginUID', result.LoginUID || '')
@@ -548,7 +569,8 @@
         let _param = {
           func: 's_Get_style',
           TypeCharOne: 'PC',
-          LText: `select '${window.GLOB.appkey}'`,
+          LText: `select '${appkey}'`,
+          appkey: appkey
         }
 
         _param.userid = result.UserID
@@ -557,15 +579,11 @@
         _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp)
 
         Api.getSystemConfig(_param).then(res => {
+          if (!res) return
+          
           if (res.status) {
-            // positecgroup
-            // res.Banner = res.Banner ? res.Banner.replace(/:8080/ig, '').replace(/http:/ig, 'https:') : ''
-            // res.doclogo = res.doclogo ? res.doclogo.replace(/:8080/ig, '').replace(/http:/ig, 'https:') : ''
-            // 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) {
+            if (window.GLOB.sysType === 'local' && window.GLOB.systemType !== 'production') {
+              if (md5(('mk' + appkey + res.sys_datetime + res.member_type + res.registry_date).toLowerCase()) !== res.secret_key) {
                 Modal.warning({
                   title: '瀵嗛挜閿欒锛岃鑱旂郴绠$悊鍛橈紒',
                   okText: '鐭ラ亾浜�'
@@ -603,7 +621,19 @@
               showline: res.split_line_show || 'true',
               webSite: res.WebSite || '',
               navBar: res.menu_type, // shutter 鐧惧彾绐椼�乴inkage_navigation 鑱斿姩鑿滃崟銆乴inkage 鑱斿姩鑿滃崟_鏃犲鑸爮銆乵enu_board 鑿滃崟闈㈡澘銆乵enu_board_navigation 鑿滃崟闈㈡澘_鏍囩椤�
-              app_version: res.app_version
+              app_version: res.app_version,
+              Member_Level: 0,
+              appname: res.appname || ''
+            }
+
+            if ([10, 20, 30, 40, 50, 60, 70, 80, 90, 100].includes(res.member_level)) {
+              systemMsg.Member_Level = md5('mksoft' + appkey + res.member_level)
+              if (!window.GLOB.memberLevel) {
+                Object.defineProperty(window.GLOB, 'memberLevel', {
+                  writable: false,
+                  value: res.member_level
+                })
+              }
             }
 
             let level = res.pwd_level || ''
@@ -621,10 +651,12 @@
             }
 
             sessionStorage.setItem('home_background', res.index_background_color || '')
+
+            let seconds = 0
             if (res.sys_datetime) {
-              sessionStorage.setItem('sys_datetime', res.sys_datetime)
-              sessionStorage.setItem('app_datetime', new Date().getTime())
+              seconds = Math.floor((new Date(res.sys_datetime).getTime() - new Date().getTime()) / 1000)
             }
+            sessionStorage.setItem('sys_time_shim', isNaN(seconds) ? 0 : seconds)
 
             // url鏍囬
             document.title = systemMsg.platTitle
@@ -649,7 +681,11 @@
                 login_ways.push({
                   type: item.way_no,
                   smsId: item.sms_id
-                }) 
+                })
+
+                if (item.way_no === 'sms_vcode' && item.sms_id) {
+                  sessionStorage.setItem('mk_sms_id', item.sms_id)
+                }
               })
             } else {
               login_ways.push({
@@ -674,6 +710,7 @@
             window.GLOB.style = systemMsg.style
             window.GLOB.navBar = systemMsg.navBar
             window.GLOB.appVersion = systemMsg.app_version
+            sessionStorage.setItem('appname', res.appname || '')
         
             if (window.GLOB.style && styles[window.GLOB.style]) {
               document.body.className = styles[window.GLOB.style] + ' ' + (res.split_line_show === 'false' ? 'hidden-split-line' : '')
@@ -685,13 +722,6 @@
               link.rel = 'shortcut icon'
               link.href = res.titlelogo
               document.getElementsByTagName('head')[0].appendChild(link)
-            }
-
-            let memberLevel = res.member_level
-
-            if (typeof(memberLevel) === 'number' && memberLevel > 10 && parseInt(memberLevel / 10) * 10 === memberLevel) {
-              sessionStorage.setItem('Member_Level', md5('mksoft' + window.GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + memberLevel))
-              window.GLOB.memberLevel = memberLevel
             }
 
             // positecgroup
@@ -775,15 +805,15 @@
       func: 's_get_app_from_cloud',
       UserName: '',
       Password: '',
-      systemType: options.sysType,
+      systemType: window.GLOB.sysType,
       Type: 'X',
       debug: 'Y'
     }
 
     param.appkey = window.GLOB.appkey || ''
 
-    if (options.cloudServiceApi) {
-      param.rduri = options.cloudServiceApi.replace('dostars', 'dostar')
+    if (window.GLOB.cloudServiceApi) {
+      param.rduri = window.GLOB.cloudServiceApi.replace('dostars', 'dostar')
     }
 
     this.logincloudRef.handleConfirm().then(result => {
@@ -830,48 +860,6 @@
     })
   }
 
-  resetPwdSubmit = () => {
-    this.formRef.handleConfirm().then(res => {
-      this.setState({
-        resetLoading: true
-      })
-
-      let _param = {
-        func: 's_PwdUpt',
-        LText: `select '${res.originpwd}','${res.password}'`
-      }
-      
-      _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瀵嗛挜
-  
-      Api.getSystemConfig(_param).then(result => {
-        this.setState({
-          visible: !result.status,
-          resetLoading: false
-        })
-
-        if (result.status) {
-          notification.success({
-            top: 92,
-            message: '淇敼鎴愬姛锛岃閲嶆柊鐧诲綍銆�',
-            duration: 2
-          })
-          const input = document.getElementById('password')
-          if (input) {
-            input.select()
-          }
-        } else {
-          notification.warning({
-            top: 92,
-            message: result.message,
-            duration: 5
-          })
-        }
-      })
-    }, () => {})
-  }
-
   /**
    * @description 缁勪欢閿�姣侊紝娓呴櫎state鏇存柊
    */
@@ -892,7 +880,6 @@
         </div>
         <div className="login-middle" style={lineColor ? {borderColor: lineColor} : {}}>
           {loginWays ? <LoginForm
-            platName={this.state.platName}
             dict={this.state.dict}
             auth={this.state.auth}
             authError={this.state.authError}
@@ -901,7 +888,6 @@
             lang={this.state.selectedlang}
             langList={this.state.langList}
             isDisabled={this.state.isDisabled}
-            changelang={(value) => this.changelang(value)}
             handleSubmit={() => this.handleSubmit()}
             authLogin={this.authLogin}
             wrappedComponentRef={(inst) => this.loginformRef = inst}
@@ -912,7 +898,8 @@
             <a target="_blank" rel="noopener noreferrer" href={webSite} dangerouslySetInnerHTML={{ __html: copyRight.replace(/\s/ig, '&nbsp;') }}></a> :
             <p dangerouslySetInnerHTML={{ __html: copyRight ? copyRight.replace(/\s/ig, '&nbsp;') : '' }}></p>
           }
-          {ICP ? <p dangerouslySetInnerHTML={{ __html: ICP.replace(/\s/ig, '&nbsp;') }}></p> : null}
+          <br/>
+          {ICP ? <a target="_blank" rel="noopener noreferrer" href="https://beian.miit.gov.cn/#/Integrated/index" dangerouslySetInnerHTML={{ __html: ICP.replace(/\s/ig, '&nbsp;') }}></a> : null}
         </div>
         {/* 缂栬緫鐘舵�佺櫥褰� */}
         <Modal
@@ -931,18 +918,7 @@
           <LoginCloudForm handleSubmit={() => this.syncSubmit()} wrappedComponentRef={(inst) => this.logincloudRef = inst}/>
         </Modal>
         {/* 淇敼瀵嗙爜 */}
-        <Modal
-          title="淇敼瀵嗙爜"
-          okText={this.state.dict['login.ok']}
-          cancelText={this.state.dict['login.cancel']}
-          visible={this.state.visible}
-          onOk={this.resetPwdSubmit}
-          confirmLoading={this.state.resetLoading}
-          onCancel={() => this.setState({visible: false, resetLoading: false})}
-          destroyOnClose
-        >
-          <Resetpwd wrappedComponentRef={(inst) => this.formRef = inst} resetPwdSubmit={this.resetPwdSubmit}/>
-        </Modal>
+        <Resetpwd />
       </div>
     )
   }

--
Gitblit v1.8.0