| | |
| | | if (config.enter === 'tab') { |
| | | MKEmitter.emit('mkFC', 'focus', config.tabUuid) |
| | | } else { |
| | | MKEmitter.emit('mkFC', 'focus', config.tabUuid) |
| | | this.props.onSubmit() |
| | | config.tabUuid && MKEmitter.emit('mkFC', 'focus', config.tabUuid) |
| | | this.props.onSubmit(config.tabUuid, config.errTabUuid) |
| | | } |
| | | } |
| | | |
| | |
| | | let n_id = (() => { |
| | | let uuid = [] |
| | | let timestamp = new Date().getTime() |
| | | let _options = '0123456789abcdefghigklmnopqrstuv' |
| | | let _options = '01234567890123456789012345678901' |
| | | for (let i = 0; i < 19; i++) { |
| | | uuid.push(_options.substr(Math.floor(Math.random() * 0x20), 1)) |
| | | } |
| | |
| | | } else { |
| | | this.props.onSend(send_type, timestamp, n_id) |
| | | } |
| | | }, () => { |
| | | }, (error) => { |
| | | if (error && error.ErrCode === 'LoginError') { |
| | | let param = { |
| | | func: 's_visitor_login', |
| | | timestamp: moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | SessionUid: 'bh0bapabtd45epsgra79segbch6c1ibk', |
| | | TypeCharOne: 'pc', |
| | | appkey: '202004041613277377A6A2456D34A4948AE84' |
| | | } |
| | | |
| | | param.LText = md5(window.btoa('bh0bapabtd45epsgra79segbch6c1ibk' + param.timestamp)) |
| | | param.secretkey = md5(param.LText + 'mingke' + param.timestamp) |
| | | |
| | | let params = { |
| | | url: 'https://sso.mk9h.cn/webapi/dologon', |
| | | method: 'post', |
| | | data: JSON.stringify(param) |
| | | } |
| | | |
| | | Api.directRequest(params) |
| | | |
| | | return |
| | | } |
| | | |
| | | clearTimeout(this.timer) |
| | | this.setState({ |
| | | verdisabled: false, |
| | |
| | | } else { |
| | | this.props.onSend(send_type, timestamp, n_id) |
| | | } |
| | | }, () => { |
| | | }, (error) => { |
| | | if (error && error.ErrCode === 'LoginError') { |
| | | let param = { |
| | | func: 's_visitor_login', |
| | | timestamp: moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | SessionUid: 'bh0bapabtd45epsgra79segbch6c1ibk', |
| | | TypeCharOne: 'pc', |
| | | appkey: '202004041613277377A6A2456D34A4948AE84' |
| | | } |
| | | |
| | | param.LText = md5(window.btoa('bh0bapabtd45epsgra79segbch6c1ibk' + param.timestamp)) |
| | | param.secretkey = md5(param.LText + 'mingke' + param.timestamp) |
| | | |
| | | let params = { |
| | | url: 'https://sso.mk9h.cn/webapi/dologon', |
| | | method: 'post', |
| | | data: JSON.stringify(param) |
| | | } |
| | | |
| | | Api.directRequest(params) |
| | | |
| | | return |
| | | } |
| | | |
| | | clearTimeout(this.timer) |
| | | this.setState({ |
| | | verdisabled: false, |