From 7f9516f38c087fa56884bdc7e3224dea1b48afa3 Mon Sep 17 00:00:00 2001 From: liaoxuezhi Date: Mon, 9 Sep 2019 11:59:44 +0800 Subject: [PATCH] =?UTF-8?q?Service=20=E5=8F=AF=E4=BB=A5=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=95=B0=E7=BB=84=E6=A0=BC=E5=BC=8F=E7=9A=84=E6=B8=B2=E6=9F=93?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/service.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/store/service.ts b/src/store/service.ts index 7ccc563db..cdbc97a51 100644 --- a/src/store/service.ts +++ b/src/store/service.ts @@ -277,15 +277,14 @@ export const ServiceStore = iRendererStore const json:Payload = yield (getRoot(self) as IRendererStore).fetcher(api, data, options); fetchSchemaCancel = null; - if (!isEmpty(json.data)) { - self.schema = json.data; - self.schemaKey = '' + Date.now(); - } - if (!json.ok) { updateMessage(json.msg || options && options.errorMessage || '获取失败,请重试', true); (getRoot(self) as IRendererStore).notify('error', self.msg); } else { + if (json.data) { + self.schema = json.data; + self.schemaKey = '' + Date.now(); + } updateMessage(json.msg || options && options.successMessage); // 配置了获取成功提示后提示,默认是空不会提示。