| | |
| | | |
| | | if (params[0].$unCheckParam) { |
| | | this.checkLoopRequest(params, _resolve) |
| | | } else if (btn.preFunc && params.length === 1) { |
| | | let param = params[0] |
| | | let _param = fromJS(param).toJS() |
| | | _param.func = btn.preFunc |
| | | |
| | | Api.genericInterface(_param).then(res => { |
| | | if (res.status) { |
| | | if (res.ErrCode !== '-1') { |
| | | param = {...param, ...res} |
| | | |
| | | delete param.status |
| | | delete param.ErrCode |
| | | delete param.ErrMesg |
| | | delete param.message |
| | | |
| | | setTimeout(() => { |
| | | Api.genericInterface(param).then(result => { |
| | | if (!result.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | | }, 600) |
| | | } |
| | | |
| | | this.triggerNote(res) // 消息 |
| | | this.execSuccess(res) |
| | | } else { |
| | | this.execError(res) |
| | | } |
| | | }, () => { |
| | | this.updateStatus() |
| | | _resolve() |
| | | }) |
| | | } else if (params.length <= 20 && btn.execType !== 'single') { |
| | | let deffers = params.map((param, i) => { |
| | | return new Promise(resolve => { |
| | | setTimeout(() => { |
| | | let _param = null |
| | | if (btn.preFunc) { |
| | | _param = fromJS(param).toJS() |
| | | param.func = btn.preFunc |
| | | } |
| | | Api.genericInterface(param).then(res => { |
| | | if (btn.preFunc && res.status && res.ErrCode !== '-1') { |
| | | _param = {..._param, ...res} |
| | | |
| | | delete _param.status |
| | | delete _param.ErrCode |
| | | delete _param.ErrMesg |
| | | delete _param.message |
| | | |
| | | setTimeout(() => { |
| | | Api.genericInterface(_param).then(result => { |
| | | if (!result.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | | }, 600) |
| | | } |
| | | |
| | | if (res.status) { |
| | | this.triggerNote(res) // 消息 |
| | | } |
| | |
| | | loadingNumber: params.length |
| | | }) |
| | | |
| | | let _param = null |
| | | |
| | | if (btn.preFunc) { |
| | | _param = fromJS(param).toJS() |
| | | param.func = btn.preFunc |
| | | } |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | if (res.status) { |
| | | if (btn.preFunc && res.ErrCode !== '-1') { |
| | | _param = {..._param, ...res} |
| | | |
| | | delete _param.status |
| | | delete _param.ErrCode |
| | | delete _param.ErrMesg |
| | | delete _param.message |
| | | |
| | | setTimeout(() => { |
| | | Api.genericInterface(_param).then(result => { |
| | | if (!result.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | | }, 600) |
| | | } |
| | | |
| | | this.triggerNote(res) // 消息 |
| | | |
| | | if (params.length === 0) { |