@zgfe/modules-settings 1.2.8-node.4 → 1.2.8-node.5

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.
@@ -37,37 +37,27 @@ var AppInfo = function AppInfo(_ref) {
37
37
  var appName = value.appName,
38
38
  appAccount = value.appAccount;
39
39
  var data = {
40
- app_name: appName,
41
- app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
40
+ appName: appName,
41
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
42
42
  };
43
43
  if (showAppAccount) {
44
- data.app_account = appAccount;
44
+ data.appAccount = appAccount;
45
45
  }
46
46
  urlRequest(apis.setting.updateAppName, {
47
47
  method: 'post',
48
48
  data: data
49
49
  }).then(function (res) {
50
- if ((res === null || res === void 0 ? void 0 : res.flag) === 101) {
51
- notification.success({
52
- message: '更改成功'
53
- });
54
- // 重置表单
55
- setInitialValues({
56
- appName: appName,
57
- appAccount: appAccount
58
- });
59
- form.resetFields();
60
- // 主应用更新appList
61
- settingsCallback('updateAppList');
62
- } else if ((res === null || res === void 0 ? void 0 : res.flag) === -102) {
63
- notification.error({
64
- message: '开发者角色无权限修改'
65
- });
66
- } else if ((res === null || res === void 0 ? void 0 : res.flag) === 202) {
67
- notification.error({
68
- message: '应用名称已存在'
69
- });
70
- }
50
+ notification.success({
51
+ message: '更改成功'
52
+ });
53
+ // 重置表单
54
+ setInitialValues({
55
+ appName: appName,
56
+ appAccount: appAccount
57
+ });
58
+ form.resetFields();
59
+ // 主应用更新appList
60
+ settingsCallback('updateAppList');
71
61
  }).catch(function () {
72
62
  notification.error({
73
63
  message: '修改失败,请重试'
package/es/types/app.d.ts CHANGED
@@ -11,9 +11,9 @@ export interface IAppInfoForm {
11
11
  appAccount: string;
12
12
  }
13
13
  export interface IAppInfoParams {
14
- app_name: string;
15
- app_id: number;
16
- app_account: string;
14
+ appName: string;
15
+ appId: number;
16
+ appAccount: string;
17
17
  wdwdwd: boolean;
18
18
  }
19
19
  export interface IAppInfoRes<T> extends InterfaceApiResult<T> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-settings",
3
- "version": "1.2.8-node.4",
3
+ "version": "1.2.8-node.5",
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": "2cf99a13a326d3efadadda1315e63a296c08a87c",
54
+ "gitHead": "ddb1252662d0dbc09d624d5544112205417465de",
55
55
  "gitHooks": {
56
56
  "pre-commit": "lint-staged"
57
57
  }