beer-network 1.2.3 → 1.2.4
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/api.js +12 -4
- package/package.json +1 -1
package/api.js
CHANGED
|
@@ -301,11 +301,19 @@ export default class Fetch {
|
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
303
|
async pageTable(response) {
|
|
304
|
+
if (response.success) {
|
|
305
|
+
return {
|
|
306
|
+
data: response.data.records || response.data,
|
|
307
|
+
page: response.data.currentPage || 1,
|
|
308
|
+
total: response.data.totalSize || response.data.length,
|
|
309
|
+
success: true
|
|
310
|
+
};
|
|
311
|
+
}
|
|
304
312
|
return {
|
|
305
|
-
data:
|
|
306
|
-
page:
|
|
307
|
-
total:
|
|
308
|
-
success:
|
|
313
|
+
data: [],
|
|
314
|
+
page: 1,
|
|
315
|
+
total: 0,
|
|
316
|
+
success: true
|
|
309
317
|
};
|
|
310
318
|
}
|
|
311
319
|
async sleep(value) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "beer-network",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.4",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"pub-w": "tsc && copy package.json .\\dist\\package.json && npm publish ./dist",
|
|
7
7
|
"pub-m": "tsc && cp package.json ./dist/package.json && npm publish ./dist"
|