ls-pro-common 3.0.52 → 3.0.54
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.
- package/dist/common.css +3 -0
- package/dist/common.js +1 -1
- package/dist/common.min.css +3 -0
- package/dist/common.min.js +1 -1
- package/es/service/BaseService.d.ts +2 -0
- package/es/service/BaseService.js +10 -8
- package/lib/service/BaseService.d.ts +2 -0
- package/lib/service/BaseService.js +10 -8
- package/package.json +2 -2
|
@@ -3,6 +3,8 @@ import type { BaseApiType, MethodType } from '../typing';
|
|
|
3
3
|
declare class BaseService {
|
|
4
4
|
/** 定义每个服务的api */
|
|
5
5
|
api: BaseApiType;
|
|
6
|
+
/** 是否需要网关,默认需要 设置为fasle时url自行处理网关问题 */
|
|
7
|
+
needGateway: boolean;
|
|
6
8
|
/** 定义每个服务接口对应的请求方法,默认为 restful */
|
|
7
9
|
method: MethodType;
|
|
8
10
|
/** 加载数据方法 @param param 请求参数对象 */
|
|
@@ -11,6 +11,8 @@ var BaseService = /*#__PURE__*/function () {
|
|
|
11
11
|
_classCallCheck(this, BaseService);
|
|
12
12
|
/** 定义每个服务的api */
|
|
13
13
|
this.api = {};
|
|
14
|
+
/** 是否需要网关,默认需要 设置为fasle时url自行处理网关问题 */
|
|
15
|
+
this.needGateway = true;
|
|
14
16
|
/** 定义每个服务接口对应的请求方法,默认为 restful */
|
|
15
17
|
this.method = {
|
|
16
18
|
get: 'get',
|
|
@@ -40,12 +42,12 @@ var BaseService = /*#__PURE__*/function () {
|
|
|
40
42
|
break;
|
|
41
43
|
}
|
|
42
44
|
_context.next = 7;
|
|
43
|
-
return httpPost(url, param);
|
|
45
|
+
return httpPost(url, param, true, this.needGateway);
|
|
44
46
|
case 7:
|
|
45
47
|
return _context.abrupt("return", _context.sent);
|
|
46
48
|
case 8:
|
|
47
49
|
_context.next = 10;
|
|
48
|
-
return httpGet(url, param);
|
|
50
|
+
return httpGet(url, param, this.needGateway);
|
|
49
51
|
case 10:
|
|
50
52
|
return _context.abrupt("return", _context.sent);
|
|
51
53
|
case 11:
|
|
@@ -84,12 +86,12 @@ var BaseService = /*#__PURE__*/function () {
|
|
|
84
86
|
break;
|
|
85
87
|
}
|
|
86
88
|
_context2.next = 8;
|
|
87
|
-
return httpPut(url, data);
|
|
89
|
+
return httpPut(url, data, this.needGateway);
|
|
88
90
|
case 8:
|
|
89
91
|
return _context2.abrupt("return", _context2.sent);
|
|
90
92
|
case 9:
|
|
91
93
|
_context2.next = 11;
|
|
92
|
-
return httpPost(url, data);
|
|
94
|
+
return httpPost(url, data, true, this.needGateway);
|
|
93
95
|
case 11:
|
|
94
96
|
return _context2.abrupt("return", _context2.sent);
|
|
95
97
|
case 12:
|
|
@@ -121,7 +123,7 @@ var BaseService = /*#__PURE__*/function () {
|
|
|
121
123
|
return _context3.abrupt("return", Promise.reject("主从一起保存方法没有配置api"));
|
|
122
124
|
case 4:
|
|
123
125
|
_context3.next = 6;
|
|
124
|
-
return httpPost(url, data);
|
|
126
|
+
return httpPost(url, data, true, this.needGateway);
|
|
125
127
|
case 6:
|
|
126
128
|
return _context3.abrupt("return", _context3.sent);
|
|
127
129
|
case 7:
|
|
@@ -157,12 +159,12 @@ var BaseService = /*#__PURE__*/function () {
|
|
|
157
159
|
break;
|
|
158
160
|
}
|
|
159
161
|
_context4.next = 7;
|
|
160
|
-
return httpPost(url, data);
|
|
162
|
+
return httpPost(url, data, true, this.needGateway);
|
|
161
163
|
case 7:
|
|
162
164
|
return _context4.abrupt("return", _context4.sent);
|
|
163
165
|
case 8:
|
|
164
166
|
_context4.next = 10;
|
|
165
|
-
return httpDelete(url, data);
|
|
167
|
+
return httpDelete(url, data, this.needGateway);
|
|
166
168
|
case 10:
|
|
167
169
|
return _context4.abrupt("return", _context4.sent);
|
|
168
170
|
case 11:
|
|
@@ -194,7 +196,7 @@ var BaseService = /*#__PURE__*/function () {
|
|
|
194
196
|
return _context5.abrupt("return", Promise.reject("审核方法没有配置api"));
|
|
195
197
|
case 4:
|
|
196
198
|
_context5.next = 6;
|
|
197
|
-
return httpPost(url, data);
|
|
199
|
+
return httpPost(url, data, true, this.needGateway);
|
|
198
200
|
case 6:
|
|
199
201
|
return _context5.abrupt("return", _context5.sent);
|
|
200
202
|
case 7:
|
|
@@ -3,6 +3,8 @@ import type { BaseApiType, MethodType } from '../typing';
|
|
|
3
3
|
declare class BaseService {
|
|
4
4
|
/** 定义每个服务的api */
|
|
5
5
|
api: BaseApiType;
|
|
6
|
+
/** 是否需要网关,默认需要 设置为fasle时url自行处理网关问题 */
|
|
7
|
+
needGateway: boolean;
|
|
6
8
|
/** 定义每个服务接口对应的请求方法,默认为 restful */
|
|
7
9
|
method: MethodType;
|
|
8
10
|
/** 加载数据方法 @param param 请求参数对象 */
|
|
@@ -11,6 +11,8 @@ var BaseService = /*#__PURE__*/function () {
|
|
|
11
11
|
_classCallCheck(this, BaseService);
|
|
12
12
|
/** 定义每个服务的api */
|
|
13
13
|
this.api = {};
|
|
14
|
+
/** 是否需要网关,默认需要 设置为fasle时url自行处理网关问题 */
|
|
15
|
+
this.needGateway = true;
|
|
14
16
|
/** 定义每个服务接口对应的请求方法,默认为 restful */
|
|
15
17
|
this.method = {
|
|
16
18
|
get: 'get',
|
|
@@ -40,12 +42,12 @@ var BaseService = /*#__PURE__*/function () {
|
|
|
40
42
|
break;
|
|
41
43
|
}
|
|
42
44
|
_context.next = 7;
|
|
43
|
-
return httpPost(url, param);
|
|
45
|
+
return httpPost(url, param, true, this.needGateway);
|
|
44
46
|
case 7:
|
|
45
47
|
return _context.abrupt("return", _context.sent);
|
|
46
48
|
case 8:
|
|
47
49
|
_context.next = 10;
|
|
48
|
-
return httpGet(url, param);
|
|
50
|
+
return httpGet(url, param, this.needGateway);
|
|
49
51
|
case 10:
|
|
50
52
|
return _context.abrupt("return", _context.sent);
|
|
51
53
|
case 11:
|
|
@@ -84,12 +86,12 @@ var BaseService = /*#__PURE__*/function () {
|
|
|
84
86
|
break;
|
|
85
87
|
}
|
|
86
88
|
_context2.next = 8;
|
|
87
|
-
return httpPut(url, data);
|
|
89
|
+
return httpPut(url, data, this.needGateway);
|
|
88
90
|
case 8:
|
|
89
91
|
return _context2.abrupt("return", _context2.sent);
|
|
90
92
|
case 9:
|
|
91
93
|
_context2.next = 11;
|
|
92
|
-
return httpPost(url, data);
|
|
94
|
+
return httpPost(url, data, true, this.needGateway);
|
|
93
95
|
case 11:
|
|
94
96
|
return _context2.abrupt("return", _context2.sent);
|
|
95
97
|
case 12:
|
|
@@ -121,7 +123,7 @@ var BaseService = /*#__PURE__*/function () {
|
|
|
121
123
|
return _context3.abrupt("return", Promise.reject("主从一起保存方法没有配置api"));
|
|
122
124
|
case 4:
|
|
123
125
|
_context3.next = 6;
|
|
124
|
-
return httpPost(url, data);
|
|
126
|
+
return httpPost(url, data, true, this.needGateway);
|
|
125
127
|
case 6:
|
|
126
128
|
return _context3.abrupt("return", _context3.sent);
|
|
127
129
|
case 7:
|
|
@@ -157,12 +159,12 @@ var BaseService = /*#__PURE__*/function () {
|
|
|
157
159
|
break;
|
|
158
160
|
}
|
|
159
161
|
_context4.next = 7;
|
|
160
|
-
return httpPost(url, data);
|
|
162
|
+
return httpPost(url, data, true, this.needGateway);
|
|
161
163
|
case 7:
|
|
162
164
|
return _context4.abrupt("return", _context4.sent);
|
|
163
165
|
case 8:
|
|
164
166
|
_context4.next = 10;
|
|
165
|
-
return httpDelete(url, data);
|
|
167
|
+
return httpDelete(url, data, this.needGateway);
|
|
166
168
|
case 10:
|
|
167
169
|
return _context4.abrupt("return", _context4.sent);
|
|
168
170
|
case 11:
|
|
@@ -194,7 +196,7 @@ var BaseService = /*#__PURE__*/function () {
|
|
|
194
196
|
return _context5.abrupt("return", Promise.reject("审核方法没有配置api"));
|
|
195
197
|
case 4:
|
|
196
198
|
_context5.next = 6;
|
|
197
|
-
return httpPost(url, data);
|
|
199
|
+
return httpPost(url, data, true, this.needGateway);
|
|
198
200
|
case 6:
|
|
199
201
|
return _context5.abrupt("return", _context5.sent);
|
|
200
202
|
case 7:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ls-pro-common",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.54",
|
|
4
4
|
"description": "ls-pro-common",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": [
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@ant-design/icons": "^4.3.0",
|
|
24
|
-
"ls-pro-table": "^3.0.
|
|
24
|
+
"ls-pro-table": "^3.0.37",
|
|
25
25
|
"ls-pro-form": "^3.0.14",
|
|
26
26
|
"ls-pro-field": "^3.0.6",
|
|
27
27
|
"ls-pro-descriptions": "^3.0.1",
|