wgt-node-utils 1.2.19 → 1.2.20
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/README.md +18 -0
- package/dist/bundle.js +1 -1
- package/package.json +1 -1
- package/src/index.js +43 -0
package/README.md
CHANGED
|
@@ -265,5 +265,23 @@
|
|
|
265
265
|
| option.useSendFeiShu | boolean | 项目环境变量 | 否 | false |
|
|
266
266
|
|
|
267
267
|
|
|
268
|
+
#### getSiteLanguage // 获取站点语言列表
|
|
269
|
+
#### 使用
|
|
270
|
+
```javascript
|
|
271
|
+
await wgtNodeUtils.getSiteLanguage(url)
|
|
272
|
+
```
|
|
273
|
+
##### 参数说明:
|
|
274
|
+
|参数 | 类型 | 说明 | 是否必传 | 默认值 |
|
|
275
|
+
|---------|--------------|-----------------------------------------------------------------------------|------|-----|
|
|
276
|
+
| url | string | 请求url | 是 | -- |
|
|
268
277
|
|
|
278
|
+
#### getCloudFrontViewerCountry // 获取国家code || 用户浏览器设备语言
|
|
279
|
+
#### 使用
|
|
280
|
+
```javascript
|
|
281
|
+
await wgtNodeUtils.getCloudFrontViewerCountry(req)
|
|
282
|
+
```
|
|
283
|
+
##### 参数说明:
|
|
284
|
+
|参数 | 类型 | 说明 | 是否必传 | 默认值 |
|
|
285
|
+
|---------|--------------|-----------------------------------------------------------------------------|------|-----|
|
|
286
|
+
| req | Object | node 请求req | 是 | -- |
|
|
269
287
|
|