service schemaApi返回data

This commit is contained in:
catchonme 2020-01-14 10:56:33 +08:00
parent 7a8df2f643
commit 4183077db0
1 changed files with 3 additions and 1 deletions

View File

@ -2,7 +2,7 @@ import {types, getParent, flow, getEnv, getRoot} from 'mobx-state-tree';
import {iRendererStore} from './iRenderer';
import {IRendererStore} from './index';
import {Api, ApiObject, Payload, fetchOptions} from '../types';
import {extendObject, isEmpty} from '../utils/helper';
import {extendObject, isEmpty, isObject} from '../utils/helper';
import {ServerError} from '../utils/errors';
export const ServiceStore = iRendererStore
@ -363,6 +363,8 @@ export const ServiceStore = iRendererStore
if (json.data) {
self.schema = json.data;
self.schemaKey = '' + Date.now();
let schemaData = isObject(json.data) && isObject(json.data.data) ? json.data.data : null;
schemaData && self.updateData(schemaData)
}
updateMessage(json.msg || (options && options.successMessage));