@zgfe/modules-settings 1.2.2 → 1.2.3-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,13 +2,13 @@ var apiPrefix = '/analysis/api'; // node服务api接口前缀
2
2
  var apis = {
3
3
  // new
4
4
  user: {
5
- getCurrentUser: apiPrefix + '/common/proxy/company/currentUser.jsp'
5
+ getCurrentUser: '/zg/web/v2/company/currentUser'
6
6
  },
7
7
  app: {
8
8
  queryLeftMenus: apiPrefix + '/common/proxy/index/getLeftMenusByAppId.jsp',
9
9
  deleteApp: apiPrefix + '/common/proxy/user/deleteApp.jsp',
10
10
  createApp: apiPrefix + '/system/createApp',
11
- queryAppList: apiPrefix + '/common/proxy/data/v2ajaxGetDataByApp.jsp',
11
+ queryAppList: '/zg/web/v2/data/v2ajaxGetDataByApp',
12
12
  queryPackageInfo: apiPrefix + '/system/packageInfo',
13
13
  queryVirtualApps: apiPrefix + '/common/proxy/user/sourceApp.jsp',
14
14
  getCompanyAppList: apiPrefix + '/common/proxy/user/getCompanyAppList.jsp',
@@ -47,7 +47,7 @@ var apis = {
47
47
  editNoticeConfig: apiPrefix + '/systemSettings/setNoticeSettings'
48
48
  },
49
49
  eventMeta: {
50
- queryEventMeta: apiPrefix + '/common/proxy/data/queryEventMetasOfGroup.jsp'
50
+ queryEventMeta: '/zg/web/v2/data/queryEventMetasOfGroup'
51
51
  },
52
52
  // 多因子认证
53
53
  mfa: {
@@ -125,7 +125,8 @@ var AppMember = function AppMember() {
125
125
  request(apis.app.queryAppList, {
126
126
  method: 'get'
127
127
  }).then(function (res) {
128
- setCompanyAppList((res === null || res === void 0 ? void 0 : res.applist) || []);
128
+ var _res$data;
129
+ setCompanyAppList((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.appList) || []);
129
130
  });
130
131
  // 请求左侧菜单
131
132
  request(apis.app.queryLeftMenus, {
@@ -161,7 +161,8 @@ var CompanySetting = function CompanySetting(props) {
161
161
  request(api.user.getCurrentUser, {
162
162
  method: 'get'
163
163
  }).then(function (res) {
164
- var data = (res || {}).user;
164
+ var _res$data;
165
+ var data = res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.user;
165
166
  if (!data) return;
166
167
  data.isCreator = data.id === data.userId;
167
168
  data.isDemoAccount = data.email === 'demo@zhugeio.com';
@@ -179,16 +180,16 @@ var CompanySetting = function CompanySetting(props) {
179
180
  request(api.app.queryAppList, {
180
181
  method: 'get'
181
182
  }).then(function (res) {
182
- setCompanyAppList(res && res.applist || []);
183
+ setCompanyAppList(res && res.data.appList || []);
183
184
  if (settingCurrentUser && authConfig && authConfig.dataAuth) {
184
185
  var appIds = authConfig.dataAuth.map(function (item) {
185
186
  return item.appId;
186
187
  });
187
188
  if (appIds.includes(0) || isAdmin) {
188
- setAppList(res && res.applist || []);
189
+ setAppList(res && res.data.appList || []);
189
190
  } else {
190
191
  var result = [];
191
- res && res.applist && res.applist.forEach(function (item) {
192
+ res && res.data.appList && res.data.appList.forEach(function (item) {
192
193
  if (appIds.includes(item.id)) {
193
194
  result.push(item);
194
195
  }
@@ -196,7 +197,7 @@ var CompanySetting = function CompanySetting(props) {
196
197
  setAppList(result);
197
198
  }
198
199
  } else {
199
- setAppList(res && res.applist || []);
200
+ setAppList(res && res.data.appList || []);
200
201
  }
201
202
  apisOkNum += 1;
202
203
  setPageReady(apisOkNum);
@@ -87,10 +87,6 @@ var VirtualApp = function VirtualApp(props) {
87
87
  setVirtualAppList(list);
88
88
  setVirtualAppsIdMap(idMap);
89
89
  setReady(true);
90
- // context.commit(mutations.virtualApp.updateVirtualApps, {
91
- // list,
92
- // idMap
93
- // })
94
90
  }).catch(function (err) {
95
91
  notification.error({
96
92
  message: '查询虚拟应用失败'
@@ -52,7 +52,7 @@ var VirtualApp = function VirtualApp(props) {
52
52
  selfRequest(api.eventMeta.queryEventMeta, {
53
53
  method: 'post',
54
54
  data: {
55
- app_id: sourceAppId,
55
+ appId: sourceAppId,
56
56
  plat: 0
57
57
  }
58
58
  }).then(function (res) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-settings",
3
- "version": "1.2.2",
3
+ "version": "1.2.3-alpha.1",
4
4
  "module": "es/index.js",
5
5
  "typings": "es/index.d.ts",
6
6
  "files": [
@@ -51,7 +51,7 @@
51
51
  "umi-request": "^1.4.0",
52
52
  "yorkie": "^2.0.0"
53
53
  },
54
- "gitHead": "a648c5ef08952efbed317ca5b82d8baf87a8e7b2",
54
+ "gitHead": "b445a1cbce82a1059bd87c069b813ea25452bbab",
55
55
  "gitHooks": {
56
56
  "pre-commit": "lint-staged"
57
57
  }