From 0519dcda8b6fb2914987f8d4d58e1d14bcf98dc3 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 30 六月 2023 14:33:06 +0800 Subject: [PATCH] 2023-06-30 --- src/tabviews/zshare/mutilform/mkVercode/index.jsx | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 48 insertions(+), 2 deletions(-) diff --git a/src/tabviews/zshare/mutilform/mkVercode/index.jsx b/src/tabviews/zshare/mutilform/mkVercode/index.jsx index dfa614b..c0569d0 100644 --- a/src/tabviews/zshare/mutilform/mkVercode/index.jsx +++ b/src/tabviews/zshare/mutilform/mkVercode/index.jsx @@ -146,7 +146,30 @@ } 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, @@ -182,7 +205,30 @@ } 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, -- Gitblit v1.8.0