wgt-node-utils 0.0.21 → 0.0.23
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/bundle.js +1 -1
- package/package.json +2 -2
- package/src/index.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wgt-node-utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"description": "WGT工具类包",
|
|
5
5
|
"main": "dist/bundle.js",
|
|
6
6
|
"scripts": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"author": "rookie",
|
|
15
15
|
"license": "ISC",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"axios": "^
|
|
17
|
+
"axios": "^0.19.2"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@babel/core": "^7.25.8",
|
package/src/index.js
CHANGED
|
@@ -432,6 +432,7 @@ class wgtNodeUtils {
|
|
|
432
432
|
name: 'English',
|
|
433
433
|
icon: 'cfgv1bursfevmln3akj0.webp'
|
|
434
434
|
}]
|
|
435
|
+
console.log(axios, 'axios')
|
|
435
436
|
return new Promise((resolve) => {
|
|
436
437
|
axios.get(url).then(res => {
|
|
437
438
|
let list = res.data.data || [];
|
|
@@ -444,7 +445,8 @@ class wgtNodeUtils {
|
|
|
444
445
|
}
|
|
445
446
|
});
|
|
446
447
|
resolve(list || defaultLanList);
|
|
447
|
-
}).catch(() => {
|
|
448
|
+
}).catch((e) => {
|
|
449
|
+
console.log(e)
|
|
448
450
|
this.appendLog('语言读取', '语言接口调用失败', 'test', components = '');
|
|
449
451
|
// 调用失败时,返回en
|
|
450
452
|
resolve(defaultLanList);
|