Skip to content

Commit

Permalink
Service 可以返回数组格式的渲染器
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed Sep 9, 2019
1 parent fabdbd9 commit 7f9516f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/store/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

// 配置了获取成功提示后提示,默认是空不会提示。
Expand Down

0 comments on commit 7f9516f

Please sign in to comment.