| | |
| | | delete result.message |
| | | delete result.status |
| | | |
| | | result.func = btn.callbackFunc |
| | | |
| | | let ssoParam = null |
| | | let sinParam = null |
| | | let callParam = {...outParam, ...result} |
| | | |
| | | if (callParam.LTextOut) { |
| | | callParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | callParam.secretkey = Utils.encrypt(callParam.LTextOut, callParam.timestamp) |
| | | callParam.open_key = Utils.encryptOpenKey(callParam.secretkey, callParam.timestamp) |
| | | } |
| | | |
| | | callParam.func = btn.callbackFunc |
| | | callParam.userid = sessionStorage.getItem('LocalUserID') || '' |
| | | callParam.LoginUID = sessionStorage.getItem('LocalLoginUID') || '' |
| | | |
| | | if (callParam.UpType === 'SSO' && window.GLOB.localSystemApi) { |
| | | if (result.LTextOut) { |
| | | callParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | callParam.secretkey = Utils.encrypt(callParam.LTextOut, callParam.timestamp) |
| | | callParam.open_key = Utils.encryptOpenKey(callParam.secretkey, callParam.timestamp) |
| | | } else { |
| | | callParam = {...outParam} |
| | | callParam.func = btn.callbackFunc |
| | | callParam.MenuNO = 'sVersionDetail_LocalM' |
| | | callParam.UpType = 'SSO' |
| | | callParam.LTextOut = 'minke' |
| | | callParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | callParam.secretkey = Utils.encrypt(callParam.LTextOut, callParam.timestamp) |
| | | callParam.open_key = Utils.encryptOpenKey(callParam.secretkey, callParam.timestamp) |
| | | callParam.userid = sessionStorage.getItem('LocalUserID') || '' |
| | | callParam.LoginUID = sessionStorage.getItem('LocalLoginUID') || '' |
| | | |
| | | delete result.ErrCode |
| | | delete result.ErrMesg |
| | | |
| | | sinParam = {...result} |
| | | sinParam.func = 'sPC_TrdMenu_AddUpt_sso' |
| | | |
| | | if (window.GLOB.sysType === 'local') { |
| | | if (!window.GLOB.systemType && window.GLOB.cloudServiceApi) { |
| | | sinParam.rduri = window.GLOB.cloudServiceApi |
| | | } else if (window.GLOB.localSystemApi) { |
| | | sinParam.rduri = window.GLOB.localSystemApi |
| | | sinParam.userid = sessionStorage.getItem('LocalUserID') || '' |
| | | sinParam.LoginUID = sessionStorage.getItem('LocalLoginUID') || '' |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (result.UpType === 'SSO' && window.GLOB.localSystemApi) { |
| | | ssoParam = fromJS(callParam).toJS() |
| | | ssoParam.rduri = window.GLOB.localSystemApi |
| | | |
| | | delete ssoParam.UpType |
| | | } else { |
| | | delete callParam.UpType |
| | | } |
| | | |
| | | if (ssoParam) { |
| | | if (sinParam) { |
| | | Api.genericInterface(sinParam).then(res => { |
| | | if (!res.status) { |
| | | this.execError(res) |
| | | _resolve() |
| | | } else { |
| | | Api.genericInterface(callParam).then(re => { |
| | | if (!re.status) { |
| | | this.execError(re) |
| | | _resolve() |
| | | } else { |
| | | if (params.length === 0) { |
| | | this.execSuccess(res) |
| | | _resolve() |
| | | } else { |
| | | this.outerLoopRequest(params, _resolve) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } else if (ssoParam) { |
| | | Api.genericInterface(ssoParam).then(res => { |
| | | if (!res.status) { |
| | | this.execError(res) |