| | |
| | | } |
| | | } |
| | | |
| | | if (this.props.menuType === 'HS' && param.timestamp) { // 云端验证 |
| | | if (this.props.menuType === 'HS' && param.timestamp) { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } else if (this.props.menuType === 'HS' && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // 函数 s_sDataDictb_TBBack 云端验证 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp) |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | if (this.props.menuType === 'HS' && param.timestamp) { // 云端验证 |
| | | if (this.props.menuType === 'HS' && param.timestamp) { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } else if (this.props.menuType === 'HS' && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // 函数 s_sDataDictb_TBBack 云端验证 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp) |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | |
| | | // 内部请求 |
| | | if (btn.innerFunc) { |
| | | param.func = btn.innerFunc |
| | | |
| | | // 函数 s_sDataDictb_TBBack 云端验证 |
| | | if (this.props.menuType === 'HS' && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp) |
| | | param.open_key = Utils.encrypt(param.secretkey, param.timestamp, true) |
| | | } |
| | | |
| | | // 存在内部函数时,数据预处理 |
| | | Api.genericInterface(param).then(res => { |
| | | if (res.status) { |
| | |
| | | // 外部请求 |
| | | _outParam = JSON.parse(JSON.stringify(res)) |
| | | |
| | | if (btn.outerFunc) { |
| | | res.func = btn.outerFunc |
| | | } |
| | | if (this.props.menuType === 'HS') { |
| | | if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | res.rduri = options.cloudServiceApi |
| | | } else if (btn.sysInterface !== 'true') { |
| | | res.rduri = btn.interface |
| | | } |
| | | |
| | | // 函数 s_sDataDictb_TBBack 云端验证 |
| | | if (res.func === 's_sDataDictb_TBBack' && res.LTextOut) { |
| | | res.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | res.secretkey = Utils.encrypt(res.LTextOut, res.timestamp) |
| | | res.open_key = Utils.encrypt(res.secretkey, res.timestamp, true) |
| | | } |
| | | } else { |
| | | if (btn.sysInterface === 'true' && window.GLOB.mainSystemApi) { |
| | |
| | | } else if (btn.sysInterface !== 'true') { |
| | | res.rduri = btn.interface |
| | | } |
| | | } |
| | | |
| | | if (btn.outerFunc) { |
| | | res.func = btn.outerFunc |
| | | } |
| | | |
| | | return Api.genericInterface(res) |
| | |
| | | response.func = btn.callbackFunc |
| | | |
| | | let _callbackparam = {..._outParam, ...response} |
| | | |
| | | // 函数 s_sDataDictb_TBBack 云端验证 |
| | | if (this.props.menuType === 'HS' && _callbackparam.func === 's_sDataDictb_TBBack' && _callbackparam.LTextOut) { |
| | | _callbackparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | _callbackparam.secretkey = Utils.encrypt(_callbackparam.LTextOut, _callbackparam.timestamp) |
| | | _callbackparam.open_key = Utils.encrypt(_callbackparam.secretkey, _callbackparam.timestamp, true) |
| | | } |
| | | |
| | | return Api.genericInterface(_callbackparam) |
| | | } else { |
| | | if (response.status) { |