wgt-node-utils 1.2.52 → 1.2.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/README.md +21 -2
- package/dist/bundle.js +1 -1
- package/package.json +1 -1
- package/src/index.js +29 -9
package/README.md
CHANGED
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
#### readF2eFiles // node启动时将静态资源读取到内存中
|
|
81
81
|
#### 使用方法
|
|
82
82
|
```javascript
|
|
83
|
-
await wgtNodeUtils.readF2eFiles(buildName, version, dirname)
|
|
83
|
+
await wgtNodeUtils.readF2eFiles(buildName, version, dirname, useGlobal)
|
|
84
84
|
```
|
|
85
85
|
##### 参数说明:
|
|
86
86
|
|参数 | 类型 | 说明 | 是否必传 | 默认值 |
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
| buildName | string | 项目打包名称 | 是 | -- |
|
|
89
89
|
| version | string | 项目版本号 | 是 | -- |
|
|
90
90
|
| dirname | string | 项目绝对地址 | 是 | -- |
|
|
91
|
+
| useGlobal | boolean | 是否需要读取global.css文件 | 否 | false |
|
|
91
92
|
|
|
92
93
|
#### getMainDomainByHostname // 获取主域名
|
|
93
94
|
#### 使用
|
|
@@ -294,7 +295,7 @@
|
|
|
294
295
|
#### getSearchSiteSystem // 获取search模版的设备
|
|
295
296
|
#### 使用
|
|
296
297
|
```javascript
|
|
297
|
-
await wgtNodeUtils.
|
|
298
|
+
await wgtNodeUtils.getSearchSiteSystem(searchSiteSystem)
|
|
298
299
|
```
|
|
299
300
|
##### 参数说明:
|
|
300
301
|
|参数 | 类型 | 说明 | 是否必传 | 默认值 |
|
|
@@ -302,4 +303,22 @@
|
|
|
302
303
|
| req.searchSiteSystem | string | search模版回传的当前展示pc还是手机端 只有两个值 pc 或者mobile | 是 | -- |
|
|
303
304
|
|
|
304
305
|
|
|
306
|
+
|
|
307
|
+
#### getGetTemplateConfiguration // 获取当前模版配置 是否是search模版调用
|
|
308
|
+
#### 使用
|
|
309
|
+
```javascript
|
|
310
|
+
wgtNodeUtils.getGetTemplateConfiguration(req)
|
|
311
|
+
```
|
|
312
|
+
##### 参数说明:
|
|
313
|
+
|参数 | 类型 | 说明 | 是否必传 | 默认值 |
|
|
314
|
+
|---------|--------------|-----------------------------------------------------------------------------|------|-----|
|
|
315
|
+
| req | Object | node端req 请求体 | 是 | -- |
|
|
316
|
+
##### 返回格式
|
|
317
|
+
```javascript
|
|
318
|
+
return {
|
|
319
|
+
isSearchSite,
|
|
320
|
+
hostname,
|
|
321
|
+
system,
|
|
322
|
+
};
|
|
323
|
+
```
|
|
305
324
|
|