@ningboyz/apis 1.4.115 → 1.4.116
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/package.json +2 -2
- package/packages/axios.ts +24 -0
- package/packages/hznj/type.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ningboyz/apis",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.116",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "宁波甬政请求库",
|
|
6
6
|
"author": "nbyt-syq",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"registry": "https://registry.npmjs.org/"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@ningboyz/types": "1.4.
|
|
20
|
+
"@ningboyz/types": "1.4.116",
|
|
21
21
|
"axios": "1.8.4",
|
|
22
22
|
"lodash": "^4.17.21"
|
|
23
23
|
},
|
package/packages/axios.ts
CHANGED
|
@@ -108,6 +108,30 @@ class HttpRequest {
|
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
postJson<T>(url: string, querys?: object, params?: object, headers?: object): Promise<TResp.IResponse<T>> {
|
|
112
|
+
const lowerQuerys = querys ? this.toLowerCase(querys) : undefined;
|
|
113
|
+
return new Promise((resolve, reject) => {
|
|
114
|
+
const data = !_.isNil(params) ? params: void 0;
|
|
115
|
+
this.instance
|
|
116
|
+
.request<T>({
|
|
117
|
+
method: this.METHOD_POST,
|
|
118
|
+
url,
|
|
119
|
+
params: lowerQuerys,
|
|
120
|
+
data,
|
|
121
|
+
headers: {
|
|
122
|
+
...headers
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
.then((res: AxiosResponse) => {
|
|
126
|
+
resolve(res.data as TResp.IResponse<T>);
|
|
127
|
+
})
|
|
128
|
+
.catch((err: any) => {
|
|
129
|
+
reject(err);
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
|
|
111
135
|
postFile<T>(url: string, querys?: object, params?: object): Promise<TResp.IResponse<T>> {
|
|
112
136
|
const lowerQuerys = querys ? this.toLowerCase(querys) : undefined;
|
|
113
137
|
return new Promise((resolve, reject) => {
|
package/packages/hznj/type.ts
CHANGED
|
@@ -557,12 +557,16 @@ export interface IHznjZbjgSelectdbQuerys {
|
|
|
557
557
|
sourcend: number;
|
|
558
558
|
withflow: number;
|
|
559
559
|
useronly: number;
|
|
560
|
+
lockzbcz: number;
|
|
561
|
+
excezbcz: number;
|
|
560
562
|
}
|
|
561
563
|
|
|
562
564
|
export class THznjZbjgSelectdbQuerys implements IHznjZbjgSelectdbQuerys {
|
|
563
565
|
sourcend: number = -1;
|
|
564
566
|
withflow: number = 0;
|
|
565
567
|
useronly: number = -1;
|
|
568
|
+
lockzbcz: number = -1;
|
|
569
|
+
excezbcz: number = -1;
|
|
566
570
|
}
|
|
567
571
|
|
|
568
572
|
export interface IHznjZbjgFinishedQuerys {
|