wgt-node-utils 1.2.50 → 1.2.52
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 +13 -0
- package/dist/bundle.js +1 -1
- package/package.json +1 -1
- package/src/index.js +15 -0
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -109,6 +109,21 @@ class wgtNodeUtils {
|
|
|
109
109
|
return system;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
// 获取cloud front传回的设备信息
|
|
113
|
+
getSearchSiteSystem = (device) => {
|
|
114
|
+
const system = {
|
|
115
|
+
isAndroid: device,
|
|
116
|
+
isPhone: device,
|
|
117
|
+
isTablet: device
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
// 其它设备均为空的情况下,默认当前设置为pc
|
|
121
|
+
if (!system.isAndroid && !system.isPhone && !system.isTablet) {
|
|
122
|
+
system.isPC = true;
|
|
123
|
+
}
|
|
124
|
+
return system;
|
|
125
|
+
}
|
|
126
|
+
|
|
112
127
|
/***
|
|
113
128
|
* 通用头信息添加
|
|
114
129
|
* @res node端 返回头
|