From b20a4d7c75c2ff8951e93d9c0394df9277fc6093 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 15 五月 2023 21:05:17 +0800 Subject: [PATCH] 2023-05-15 --- src/tabviews/zshare/actionList/normalbutton/index.jsx | 91 ++++++++++++++++++--------------------------- 1 files changed, 37 insertions(+), 54 deletions(-) diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 9f4b267..8cb10c1 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -1061,37 +1061,48 @@ 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) // 娑堟伅 } @@ -1566,36 +1577,8 @@ 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) { -- Gitblit v1.8.0