| | |
| | | |
| | | let _this = this |
| | | let data = record || selectedData || [] |
| | | |
| | | |
| | | if (btn.Ot !== 'notRequired' && data.length === 0) { |
| | | // 需要选择行时,校验数据 |
| | | notification.warning({ |
| | |
| | | const { btn } = this.props |
| | | |
| | | let param = null |
| | | let callback = result.mk_ex_invoke |
| | | |
| | | if (btn.callbackType === 'script' || btn.callbackType === 'default') { |
| | | delete result.mk_ex_invoke |
| | | |
| | | if (callback === 'false' || callback === false) { |
| | | if (result.status) { |
| | | if (params.length === 0) { |
| | | this.execSuccess(result) |
| | | _resolve() |
| | | } else { |
| | | this.customLoopRequest(params, _resolve) |
| | | } |
| | | } else { |
| | | this.execError(result) |
| | | _resolve() |
| | | } |
| | | return |
| | | } else if (btn.callbackType === 'script' || btn.callbackType === 'default') { |
| | | param = this.getCallBackSql(result, record) |
| | | } else if (btn.callbackType === 'func') { |
| | | param = { |
| | |
| | | } else { |
| | | result.rduri = btn.interface |
| | | } |
| | | |
| | | let host = window.GLOB.baseurl.replace(/http(s):\/\//, '') |
| | | if (result.rduri.indexOf(host) === -1 && /\/dostars/.test(result.rduri)) { |
| | | result.$login = true |
| | | } |
| | | } |
| | | } |
| | | |
| | | Api.genericInterface(result).then(res => { |
| | | if (!res) return // LoginError时中断请求 |
| | | this.outerCallbackRequest(params, res, record, outParam, _resolve) |
| | | }, () => { |
| | | this.outerCallbackRequest(params, {status: false, message: 500, ErrCode: 'E', ErrMesg: 500}, record, outParam, _resolve) |
| | |
| | | result.mk_api_key = record.mk_api_key |
| | | } |
| | | |
| | | // special 版本升级回调处理 |
| | | if (window.GLOB.mkHS && btn.outerFunc === 's_get_sVersionDetail_Ltext' && btn.callbackFunc) { |
| | | let callback = result.mk_ex_invoke |
| | | |
| | | delete result.mk_ex_invoke |
| | | |
| | | if (callback === 'false' || callback === false) { |
| | | if (result.status) { |
| | | if (params.length === 0) { |
| | | this.execSuccess(result) |
| | | _resolve() |
| | | } else { |
| | | this.outerLoopRequest(params, _resolve) |
| | | } |
| | | } else { |
| | | this.execError(result) |
| | | _resolve() |
| | | } |
| | | return |
| | | } else if (window.GLOB.mkHS && btn.outerFunc === 's_get_sVersionDetail_Ltext' && btn.callbackFunc) { // special 版本升级回调处理 |
| | | if (result.status) { |
| | | this.verupRequest(params, result, outParam, _resolve) |
| | | } else { |
| | |
| | | _param.miniprogram.pagepath = `/pages/index/index?MenuId=${verify.wxNoteLinkMenuId}` |
| | | } |
| | | } |
| | | |
| | | let keys = [] |
| | | |
| | | verify.wxNoteKeys.forEach(item => { |
| | | keys.push(item.key) |
| | | |
| | | _param.data[item.key] = {value: '', color: item.color} |
| | | }) |
| | | |
| | |
| | | m.client_msg_id = item.send_id |
| | | } |
| | | |
| | | keys.forEach(key => { |
| | | if (item[key] !== undefined) { |
| | | m.data[key].value = item[key] |
| | | verify.wxNoteKeys.forEach(note => { |
| | | if (item[note.value] !== undefined) { |
| | | m.data[note.key].value = item[note.value] |
| | | } |
| | | }) |
| | | |
| | |
| | | }) |
| | | MKEmitter.emit('autoExecOver', btn.uuid, 'error') |
| | | return |
| | | } else if (btn.OpenType !== 'pop' || !btnconfig || btnconfig.setting.finish !== 'unclose') { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | } |
| | | |
| | | this.setState({ |
| | | loading: false, |
| | | loadingNumber: '', |
| | | loadingTotal: '', |
| | | }) |