@conecli/cone-render 0.10.1-shop3.22 → 0.10.1-shop3.24
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/utils/index.h5.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import Taro from '@tarojs/taro';
|
|
2
1
|
stopNativeScrollEvent,
|
|
3
2
|
getAppChannelType,
|
|
4
3
|
isAndroidDevice,
|
|
5
4
|
isHarmonyDevice,
|
|
6
5
|
isH5AndJdShopView,
|
|
7
6
|
isChartH5,
|
|
8
7
|
isH5AndJdShopViewNativeScroll,
|
|
9
8
|
isIosDevice,
|
|
10
9
|
isJdAndAndroidDevice,
|
|
11
10
|
isJdAndIosDevice,
|
|
12
11
|
isJdApp,
|
|
13
12
|
isWxApp,
|
|
14
13
|
isWxMiniH5View,
|
|
15
14
|
isJdAndHarmonyDevice,
|
|
16
15
|
isNewHarmonyShop,
|
|
17
16
|
isH5AndJingGouMini,
|
|
18
17
|
urlCookie,
|
|
19
18
|
sgmCustomReport,
|
|
20
19
|
draCustomReport,
|
|
21
20
|
remoteCustomReport,
|
|
22
21
|
draInterfaceCustomReport,
|
|
23
22
|
draBusinessCustomReport,
|
|
24
23
|
isMemberPage,
|
|
25
24
|
isH5AndJdShopViewH5Scroll,
|
|
26
25
|
isH5AndJdShopH5CustomScrollView,
|
|
27
26
|
isAppClassifyPage,
|
|
28
27
|
isAppHomeForMarketPage,
|
|
29
28
|
isPc,
|
|
30
29
|
ipLoc_djd,
|
|
31
30
|
jdAppVersionCompare,
|
|
32
31
|
isTjScence,
|
|
33
32
|
isH5AdnJxMini,
|
|
34
33
|
isTjM,
|
|
35
34
|
isTjJxM,
|
|
36
35
|
isTJApp,
|
|
37
36
|
isH5AdnHaoWuJie,
|
|
38
37
|
tjChannel,
|
|
39
38
|
dealNativePixelToCssPixel,
|
|
40
39
|
isAppStowShop,
|
|
41
40
|
isJdAndroidX5Core,
|
|
42
41
|
parseQueryUrlObj,
|
|
43
42
|
isIpadDevice,
|
|
44
43
|
isTabletDevice,
|
|
45
44
|
checkPadScreenOrientationIsLandscape,
|
|
46
45
|
isSupportHybridHttpRequest,
|
|
47
46
|
isLanguageForEn,
|
|
48
47
|
sColor,
|
|
49
48
|
draInterfaceDSMCustomReport,
|
|
50
49
|
isInJdShopView,
|
|
51
50
|
addHttps,
|
|
52
51
|
clearTaroStorageKey,
|
|
53
52
|
countStringify as h5CountStringify,
|
|
54
53
|
dateFormat,
|
|
55
54
|
dealAddress,
|
|
56
55
|
dealShopContentData as originDealShopContentData,
|
|
57
56
|
debounce,
|
|
58
57
|
filterUrlQueryData,
|
|
59
58
|
formatTabActiveMenuType,
|
|
60
59
|
getAvifSupport,
|
|
61
60
|
getWebpSupport,
|
|
62
61
|
getTaroStorageKeyValue,
|
|
63
62
|
getWxAppCookieStr,
|
|
64
63
|
isH5,
|
|
65
64
|
isMin,
|
|
66
65
|
isJdMin,
|
|
67
66
|
isWxMin,
|
|
68
67
|
isWxMinAndWxapp,
|
|
69
68
|
isJdMinAndHarmony,
|
|
70
69
|
lodashThrottle,
|
|
71
70
|
objectToUrlEncode,
|
|
72
71
|
parseQueryUrlString,
|
|
73
72
|
removeTaroStorageKey,
|
|
74
73
|
setLowSmallPicUrl,
|
|
75
74
|
setTaroStorage,
|
|
76
75
|
showFailToast,
|
|
77
76
|
showNormalToast,
|
|
78
77
|
showSuccessToast,
|
|
79
78
|
sliceArrToChunkList,
|
|
80
79
|
throttle,
|
|
81
80
|
getQualityImageNew,
|
|
82
81
|
getQualityImageOld,
|
|
83
82
|
isOpenJdAppUrl,
|
|
84
83
|
jdOpenAppParams,
|
|
85
84
|
createJdOpenAppUrl,
|
|
86
85
|
isEmpty,
|
|
87
86
|
getJdAppReportPageSource,
|
|
88
87
|
dealJdOpenAppData,
|
|
89
88
|
getBorderStyle,
|
|
90
89
|
const getNum = Number(num);
|
|
91
90
|
let _changeLayoutWidth = layoutWidth;
|
|
92
91
|
if (!_changeLayoutWidth) {
|
|
93
92
|
_changeLayoutWidth =
|
|
94
93
|
_ShopSystemInfo && _ShopSystemInfo?.windowWidth
|
|
95
94
|
? _ShopSystemInfo.windowWidth
|
|
96
95
|
: Taro.getSystemInfoSync()?.windowWidth;
|
|
97
96
|
}
|
|
98
97
|
return _ShopSystemInfo?.isJdTabletDevice && !layoutWidth
|
|
99
98
|
? Math.floor(getNum * 1.2 * (_changeLayoutWidth / 720))
|
|
100
99
|
: Math.round((getNum / widthSize) * _changeLayoutWidth);
|
|
101
100
|
const getRootFontSize = (40 * (systemInfo?.windowWidth ?? _ShopSystemInfo.windowWidth)) / 750;
|
|
102
101
|
let getRealRootFontSize = getRootFontSize > 40 ? 40 : getRootFontSize < 20 ? 20 : getRootFontSize;
|
|
103
102
|
if (_ShopSystemInfo?.isJdTabletDevice) {
|
|
104
103
|
getRealRootFontSize = Math.floor(
|
|
105
104
|
24 * ((systemInfo?.windowWidth ?? _ShopSystemInfo.windowWidth) / 720),
|
|
106
105
|
);
|
|
107
106
|
}
|
|
108
107
|
return Math.ceil(
|
|
109
108
|
(((parseInt(String(changeSize), 10) / 40) * 750) / designWidth) * getRealRootFontSize,
|
|
110
109
|
);
|
|
111
110
|
console.log(
|
|
112
111
|
'获取系统宽度systemInfo?.windowWidth',
|
|
113
112
|
systemInfo?.windowWidth,
|
|
114
113
|
'taroToTransformRoutimePXNumber(changeWidth)',
|
|
115
114
|
taroToTransformRoutimePXNumber(changeWidth, 750, systemInfo),
|
|
116
115
|
);
|
|
117
116
|
return buildType === BUILD_TYPE.CLASSIFY && systemInfo?.windowWidth
|
|
118
117
|
? systemInfo?.windowWidth - taroToTransformRoutimePXNumber(changeWidth, 750, systemInfo)
|
|
119
118
|
: systemInfo?.windowWidth ?? 0;
|
|
120
119
|
const systemInfo = _ShopSystemInfo || Taro.getSystemInfoSync();
|
|
121
120
|
console.log(
|
|
122
121
|
'获取系统宽度systemInfo?.windowWidth',
|
|
123
122
|
systemInfo?.windowWidth,
|
|
124
123
|
'taroToTransformRoutimePXNumber(changeWidth)',
|
|
125
124
|
taroToTransformRoutimePXNumber(changeWidth, 750, systemInfo),
|
|
126
125
|
);
|
|
127
126
|
const containerWidth =
|
|
128
127
|
isClassify && systemInfo?.windowWidth
|
|
129
128
|
? systemInfo?.windowWidth - taroToTransformRoutimePXNumber(changeWidth, 750, systemInfo)
|
|
130
129
|
: (systemInfo?.windowWidth ?? 0);
|
|
131
130
|
if (global?.info?.sysInfo) {
|
|
132
131
|
global.info.sysInfo['containerWidth'] = containerWidth;
|
|
133
132
|
}
|
|
134
133
|
return (
|
|
135
134
|
isJdApp &&
|
|
136
135
|
(parseQueryUrlObj['device'] === 'tablet' || Math.min(rootEleWidth, window.screen.height) >= 720)
|
|
137
136
|
);
|
|
138
137
|
const systemInfo = Taro.getSystemInfoSync();
|
|
139
138
|
if (params && params?.pageWidth && params?.pageHeight) {
|
|
140
139
|
systemInfo.windowWidth = params?.pageWidth;
|
|
141
140
|
systemInfo.windowHeight = params?.pageHeight;
|
|
142
141
|
console.warn('松果app内获取重置系统信息宽度值', params, ',systemInfo信息集合为', systemInfo);
|
|
143
142
|
} else {
|
|
144
143
|
if (isPc) {
|
|
145
144
|
systemInfo.windowWidth = 375;
|
|
146
145
|
} else {
|
|
147
146
|
const getWinWidth = window.innerWidth;
|
|
148
147
|
const getWinHeight = window.innerHeight;
|
|
149
148
|
const getScreenWidth = window.screen.width;
|
|
150
149
|
const getScreenHeight = window.screen.height;
|
|
151
150
|
const getRootEleInitWidth = params?.rootEleInitWidth || 0;
|
|
152
151
|
const isReplaceSystemWidth = params?.replaceSystemWidth || false;
|
|
153
152
|
systemInfo.isJdTabletDevice = checkIsJdTabletDevice(getRootEleInitWidth);
|
|
154
153
|
systemInfo.isJdTabletLandscape =
|
|
155
154
|
systemInfo.isJdTabletDevice && checkPadScreenOrientationIsLandscape();
|
|
156
155
|
if (!systemInfo.isJdTabletDevice && isReplaceSystemWidth) {
|
|
157
156
|
if (systemInfo?.windowWidth <= 0) {
|
|
158
157
|
systemInfo.windowWidth = Math.min(getRootEleInitWidth, getScreenWidth);
|
|
159
158
|
systemInfo.windowHeight = getScreenHeight;
|
|
160
159
|
console.warn(
|
|
161
160
|
'====初始化获取当前设备不是pad,但是触发屏幕宽高最小值600,系统获取宽度为0,进行重置系统宽度为根元素宽度与屏幕宽度最小值====',
|
|
162
161
|
systemInfo.windowWidth,
|
|
163
162
|
'getRootEleInitWidth',
|
|
164
163
|
getRootEleInitWidth,
|
|
165
164
|
'getScreenWidth',
|
|
166
165
|
getScreenWidth,
|
|
167
166
|
'getScreenHeight',
|
|
168
167
|
getScreenHeight,
|
|
169
168
|
);
|
|
170
169
|
draBusinessCustomReport({
|
|
171
170
|
type: 'jdapp_pad_width_error_info',
|
|
172
171
|
errMsg: `松果app内获取当前设备不是pad,触发屏幕宽高最小值600,系统信息宽度为0,进行重置,通过window获取的结果,getWinWidth:${getWinWidth},getScreenWidth: ${getScreenWidth},getWinHeight:${getWinHeight},getScreenHeight: ${getScreenHeight},根元素宽度值:${getRootEleInitWidth}`,
|
|
173
172
|
originReqDataStr: JSON.stringify({
|
|
174
173
|
isJdApp,
|
|
175
174
|
isAndroidDevice,
|
|
176
175
|
getScreenWidth,
|
|
177
176
|
getScreenHeight,
|
|
178
177
|
getWinWidth,
|
|
179
178
|
getWinHeight,
|
|
180
179
|
getRootEleInitWidth,
|
|
181
180
|
}),
|
|
182
181
|
});
|
|
183
182
|
}
|
|
184
183
|
} else {
|
|
185
184
|
if (isJdApp && isAndroidDevice && !systemInfo.isJdTabletDevice && systemInfo) {
|
|
186
185
|
const isLandscape = getScreenWidth >= getScreenHeight;
|
|
187
186
|
const { windowWidth, windowHeight, screenWidth, screenHeight } = systemInfo;
|
|
188
187
|
if (windowWidth <= 0) {
|
|
189
188
|
systemInfo.initWindowWidth = windowWidth;
|
|
190
189
|
if (isLandscape) {
|
|
191
190
|
systemInfo.windowWidth = getScreenHeight;
|
|
192
191
|
systemInfo.windowHeight = getScreenWidth;
|
|
193
192
|
systemInfo.screenWidth = getScreenHeight;
|
|
194
193
|
systemInfo.screenHeight = getScreenWidth;
|
|
195
194
|
} else {
|
|
196
195
|
systemInfo.windowWidth = getScreenWidth;
|
|
197
196
|
systemInfo.windowHeight = getScreenHeight;
|
|
198
197
|
systemInfo.screenWidth = getScreenWidth;
|
|
199
198
|
systemInfo.screenHeight = getScreenHeight;
|
|
200
199
|
}
|
|
201
200
|
console.warn(
|
|
202
201
|
`松果安卓app内获取系统信息宽度异常为小于等于0,是否为横屏${isLandscape},进行重置,taro获取窗口宽度值${windowWidth},重置后的宽度值${systemInfo.windowWidth},taro获取窗口高度值${windowHeight},重置后的高度值${systemInfo.windowHeight},根元素宽度值${getRootEleInitWidth}`,
|
|
203
202
|
);
|
|
204
203
|
draBusinessCustomReport({
|
|
205
204
|
type: 'android_jdapp_width_error_info',
|
|
206
205
|
errMsg: `松果安卓app内获取系统信息宽度为小于等于0,是否为横屏${isLandscape},进行重置,通过window获取的结果,getWinWidth:${getWinWidth},getScreenWidth: ${getScreenWidth},getWinHeight:${getWinHeight},getScreenHeight: ${getScreenHeight},根元素宽度值:${getRootEleInitWidth}`,
|
|
207
206
|
originReqDataStr: JSON.stringify({
|
|
208
207
|
isJdApp,
|
|
209
208
|
initData: `Taro.getSystemInfo获取窗口宽度值${windowWidth},高度值${windowHeight},获取屏幕宽度值${screenWidth},高度值${screenHeight}`,
|
|
210
209
|
getScreenWidth,
|
|
211
210
|
getScreenHeight,
|
|
212
211
|
getWinWidth,
|
|
213
212
|
getWinHeight,
|
|
214
213
|
getRootEleInitWidth,
|
|
215
214
|
}),
|
|
216
215
|
});
|
|
217
216
|
sgmCustomReport({
|
|
218
217
|
type: 2,
|
|
219
218
|
code: 'android_jdapp_width_error_info',
|
|
220
219
|
msg: {
|
|
221
220
|
title: `松果安卓app内获取系统信息宽度为小于等于0,是否为横屏${isLandscape},进行重置,通过window获取的结果,getWinWidth:${getWinWidth},getScreenWidth: ${getScreenWidth},getWinHeight:${getWinHeight},getScreenHeight: ${getScreenHeight},根元素宽度值:${getRootEleInitWidth}`,
|
|
222
221
|
initData: `Taro.getSystemInfo获取窗口宽度值${windowWidth},高度值${windowHeight},获取屏幕宽度值${screenWidth},高度值${screenHeight}`,
|
|
223
222
|
taroSysInfo: systemInfo,
|
|
224
223
|
},
|
|
225
224
|
});
|
|
226
225
|
} else {
|
|
227
226
|
let _getChangeWinWidthState = false;
|
|
228
227
|
if (getWinWidth > 0 && windowWidth > 0 && windowWidth > getWinWidth) {
|
|
229
228
|
if (isLandscape) {
|
|
230
229
|
systemInfo.windowWidth = getScreenHeight;
|
|
231
230
|
systemInfo.windowHeight = getScreenWidth;
|
|
232
231
|
systemInfo.screenWidth = getScreenHeight;
|
|
233
232
|
systemInfo.screenHeight = getScreenWidth;
|
|
234
233
|
} else {
|
|
235
234
|
systemInfo.windowWidth = getScreenWidth;
|
|
236
235
|
systemInfo.windowHeight = getScreenHeight;
|
|
237
236
|
systemInfo.screenWidth = getScreenWidth;
|
|
238
237
|
systemInfo.screenHeight = getScreenHeight;
|
|
239
238
|
}
|
|
240
239
|
_getChangeWinWidthState = true;
|
|
241
240
|
}
|
|
242
241
|
_getChangeWinWidthState &&
|
|
243
242
|
console.warn(
|
|
244
243
|
`松果安卓app内获取系统信息宽度异常,是否为横屏${isLandscape},进行重置,taro获取窗口宽度值${windowWidth},重置后的宽度值${systemInfo.windowWidth},taro获取屏幕宽度值${screenWidth},重置后的宽度值${systemInfo.screenWidth}`,
|
|
245
244
|
);
|
|
246
245
|
if (_getChangeWinWidthState) {
|
|
247
246
|
draBusinessCustomReport({
|
|
248
247
|
type: 'android_jdapp_width_error_info_2',
|
|
249
248
|
title: `松果安卓app内获取系统信息宽度异常,是否为横屏${isLandscape},进行重置,通过window获取的结果,getWinWidth:${getWinWidth},getScreenWidth: ${getScreenWidth},getWinHeight:${getWinHeight},getScreenHeight: ${getScreenHeight},根元素宽度值:${getRootEleInitWidth}`,
|
|
250
249
|
originReqDataStr: JSON.stringify({
|
|
251
250
|
isJdApp,
|
|
252
251
|
initData: `Taro.getSystemInfo获取窗口宽度值${windowWidth},高度值${windowHeight},获取屏幕宽度值${screenWidth},高度值${screenHeight}`,
|
|
253
252
|
getScreenWidth,
|
|
254
253
|
getScreenHeight,
|
|
255
254
|
getWinWidth,
|
|
256
255
|
getWinHeight,
|
|
257
256
|
getRootEleInitWidth,
|
|
258
257
|
}),
|
|
259
258
|
});
|
|
260
259
|
sgmCustomReport({
|
|
261
260
|
type: 2,
|
|
262
261
|
code: 'android_jdapp_width_error_info_2',
|
|
263
262
|
msg: {
|
|
264
263
|
title: `松果安卓app内获取系统信息宽度异常,是否为横屏${isLandscape},进行重置,通过window获取的结果,getWinWidth:${getWinWidth},getScreenWidth: ${getScreenWidth},getWinHeight:${getWinHeight},getScreenHeight: ${getScreenHeight},根元素宽度值:${getRootEleInitWidth}`,
|
|
265
264
|
initData: `Taro.getSystemInfo获取窗口宽度值${windowWidth},高度值${windowHeight},获取屏幕宽度值${screenWidth},高度值${screenHeight}`,
|
|
266
265
|
taroSysInfo: systemInfo,
|
|
267
266
|
},
|
|
268
267
|
});
|
|
269
268
|
}
|
|
270
269
|
}
|
|
271
270
|
}
|
|
272
271
|
}
|
|
273
272
|
|
|
274
273
|
if (systemInfo.isJdTabletDevice) {
|
|
275
274
|
systemInfo.windowWidth = Math.min(getRootEleInitWidth, getScreenWidth);
|
|
276
275
|
systemInfo.windowHeight = getScreenHeight;
|
|
277
276
|
if (systemInfo.isJdTabletLandscape) {
|
|
278
277
|
if (window?.PAGE_DATA?.isFitJdPadRenderCenter) {
|
|
279
278
|
systemInfo.windowWidth = Math.min(getRootEleInitWidth, getScreenWidth, getScreenHeight);
|
|
280
279
|
systemInfo.windowHeight = Math.max(
|
|
281
280
|
getRootEleInitWidth,
|
|
282
281
|
getScreenWidth,
|
|
283
282
|
getScreenHeight,
|
|
284
283
|
);
|
|
285
284
|
}
|
|
286
285
|
}
|
|
287
286
|
console.warn(
|
|
288
287
|
'====初始化获取当前设备是否是平板设备,是否横屏====',
|
|
289
288
|
systemInfo.isJdTabletDevice,
|
|
290
289
|
systemInfo.isJdTabletLandscape,
|
|
291
290
|
'屏幕信息',
|
|
292
291
|
window.screen,
|
|
293
292
|
'当前是否要求居中展示,居中展示那么宽高值要对调',
|
|
294
293
|
window?.PAGE_DATA?.isFitJdPadRenderCenter,
|
|
295
294
|
'当前pad最终展示的窗口宽度',
|
|
296
295
|
systemInfo.windowWidth,
|
|
297
296
|
);
|
|
298
297
|
}
|
|
299
298
|
}
|
|
300
299
|
}
|
|
301
300
|
systemInfo['containerWidth'] = getContainerWidth(buildType, systemInfo);
|
|
302
301
|
console.warn('====获取系统信息=====', systemInfo);
|
|
303
302
|
return systemInfo;
|
|
304
303
|
let result: boolean | null = null;
|
|
305
304
|
return function () {
|
|
306
305
|
if (result === null) {
|
|
307
306
|
const appVersionCheckPass = jdAppVersionCompare(MPAAS_CONFIG_APP_VERSION) >= 0;
|
|
308
307
|
if (!isJdApp) {
|
|
309
308
|
console.warn('🚗 ~~ file: utils.ts:191 站外H5默认打开图片优化~');
|
|
310
309
|
isIgnoreOptimizeFromServer = true;
|
|
311
310
|
result = true;
|
|
312
311
|
return true;
|
|
313
312
|
}
|
|
314
313
|
const enableAvifOptimize = appVersionCheckPass;
|
|
315
314
|
if (enableAvifOptimize) {
|
|
316
315
|
const configData = global?.getDynamicConfig('avifSwitch');
|
|
317
316
|
const {
|
|
318
317
|
globalOn = true,
|
|
319
318
|
ignoreOptimizeFromServer = false,
|
|
320
319
|
page = {},
|
|
321
320
|
grayscale = {},
|
|
322
321
|
whiteList = [],
|
|
323
322
|
blackList = [],
|
|
324
323
|
} = configData || {};
|
|
325
324
|
const { shopId = '0', venderId = '0' } = parseQueryUrlObj;
|
|
326
325
|
let imageEnableResult = true;
|
|
327
326
|
isIgnoreOptimizeFromServer = ignoreOptimizeFromServer;
|
|
328
327
|
if (
|
|
329
328
|
blackList.find((item) => item.sId === Number(shopId) || item.vId === Number(venderId))
|
|
330
329
|
) {
|
|
331
330
|
imageEnableResult = false;
|
|
332
331
|
} else if (
|
|
333
332
|
whiteList.find((item) => item.sId === Number(shopId) || item.vId === Number(venderId))
|
|
334
333
|
) {
|
|
335
334
|
isIgnoreOptimizeFromServer = true;
|
|
336
335
|
imageEnableResult = true;
|
|
337
336
|
} else if (grayscale[buildType] && isInGrayscale(grayscale[buildType])) {
|
|
338
337
|
isIgnoreOptimizeFromServer = true;
|
|
339
338
|
imageEnableResult = true;
|
|
340
339
|
} else {
|
|
341
340
|
imageEnableResult = globalOn === true || page[buildType] === true;
|
|
342
341
|
if (globalOn === true) {
|
|
343
342
|
isIgnoreOptimizeFromServer = true;
|
|
344
343
|
} else if (page[buildType] === true) {
|
|
345
344
|
} else {
|
|
346
345
|
}
|
|
347
346
|
}
|
|
348
347
|
result = imageEnableResult;
|
|
349
348
|
return imageEnableResult;
|
|
350
349
|
} else {
|
|
351
350
|
result = false;
|
|
352
351
|
return false;
|
|
353
352
|
}
|
|
354
353
|
} else {
|
|
355
354
|
return result;
|
|
356
355
|
}
|
|
357
356
|
};
|
|
358
357
|
if (typeof options === 'object' && isImageOptimizeEnable()) {
|
|
359
358
|
return getQualityImageNew(imgUrl, options, isIgnoreOptimizeFromServer);
|
|
360
359
|
} else {
|
|
361
360
|
return getQualityImageOld(imgUrl, options);
|
|
362
361
|
}
|
|
363
362
|
const getSystemInfo = getSystemAndContainerWidthInfo(params) || {
|
|
364
363
|
windowWidth: window.innerWidth,
|
|
365
364
|
containerWidth: getContainerWidth(buildType, {
|
|
366
365
|
windowWidth: window.innerWidth,
|
|
367
366
|
}),
|
|
368
367
|
screenWidth: window.innerWidth,
|
|
369
368
|
platform: '',
|
|
370
369
|
model: '',
|
|
371
370
|
system: '',
|
|
372
371
|
};
|
|
373
372
|
return getSystemInfo;
|
|
374
373
|
const params = Object.assign(
|
|
375
374
|
{},
|
|
376
375
|
{
|
|
377
376
|
title: '',
|
|
378
377
|
duration: 1500,
|
|
379
378
|
},
|
|
380
379
|
options,
|
|
381
380
|
);
|
|
382
381
|
params.duration = params.duration / 1000;
|
|
383
382
|
if (isJdApp && !isJdAndHarmonyDevice && !window?.PAGE_DATA?.businessData?.hideNativeToast) {
|
|
384
383
|
const showSuccessType = isIosDevice ? ToastIosType.SUCCESS : ToastAndroidType.SUCCESS;
|
|
385
384
|
const duration = isAndroidDevice ? 0 : params.duration;
|
|
386
385
|
nativePageShowToast(options.title, showSuccessType, duration);
|
|
387
386
|
console.log('执行原生toast success');
|
|
388
387
|
} else {
|
|
389
388
|
showSuccessToast(options);
|
|
390
389
|
}
|
|
391
390
|
const params = Object.assign(
|
|
392
391
|
{},
|
|
393
392
|
{
|
|
394
393
|
title: '',
|
|
395
394
|
duration: 1500,
|
|
396
395
|
},
|
|
397
396
|
options,
|
|
398
397
|
);
|
|
399
398
|
params.duration = params.duration / 1000;
|
|
400
399
|
if (isJdApp && !isJdAndHarmonyDevice && !window?.PAGE_DATA?.businessData?.hideNativeToast) {
|
|
401
400
|
const showSuccessType = isIosDevice ? ToastIosType.FAIL : ToastAndroidType.FAIL;
|
|
402
401
|
const duration = isAndroidDevice ? 0 : params.duration;
|
|
403
402
|
nativePageShowToast(options.title, showSuccessType, duration);
|
|
404
403
|
console.log('执行原生toast fail');
|
|
405
404
|
} else {
|
|
406
405
|
console.log('执行H5 toast fail');
|
|
407
406
|
showFailToast(options);
|
|
408
407
|
}
|
|
409
408
|
const params = Object.assign(
|
|
410
409
|
{},
|
|
411
410
|
{
|
|
412
411
|
title: '',
|
|
413
412
|
duration: 1500,
|
|
414
413
|
},
|
|
415
414
|
options,
|
|
416
415
|
);
|
|
417
416
|
params.duration = params.duration / 1000;
|
|
418
417
|
if (isJdApp && !isJdAndHarmonyDevice && !window?.PAGE_DATA?.businessData?.hideNativeToast) {
|
|
419
418
|
const showSuccessType = isIosDevice ? ToastIosType.NORMAL : ToastAndroidType.NORMAL;
|
|
420
419
|
const duration = isAndroidDevice ? 0 : params.duration;
|
|
421
420
|
nativePageShowToast(options.title, showSuccessType, duration);
|
|
422
421
|
} else {
|
|
423
422
|
showNormalToast(options);
|
|
424
423
|
}
|
|
425
424
|
if (isLanguageForEn) {
|
|
426
425
|
count = Number(count);
|
|
427
426
|
if (count >= 1000000000) {
|
|
428
427
|
return (count / 1000000000).toFixed(fixedNum) + 'B';
|
|
429
428
|
} else if (count >= 1000000) {
|
|
430
429
|
return (count / 1000000).toFixed(fixedNum) + 'M';
|
|
431
430
|
} else if (count >= 1000) {
|
|
432
431
|
return (count / 1000).toFixed(fixedNum) + 'K';
|
|
433
432
|
} else {
|
|
434
433
|
return count;
|
|
435
434
|
}
|
|
436
435
|
} else {
|
|
437
436
|
return h5CountStringify(count, fixedNum, unit, maxNum);
|
|
438
437
|
}
|
|
439
438
|
const createLoadingEle = document.createElement('div');
|
|
440
439
|
createLoadingEle.id = 'J_shopLoading';
|
|
441
440
|
createLoadingEle.className = `d-shop-loading flexible-center-box ${customClassName}`;
|
|
442
441
|
createLoadingEle.innerHTML = `<div class='d-loading-content'>
|
|
443
442
|
<span class='d-shop-loading-icon'></span>
|
|
444
443
|
<p class='d-shop-text'>${text}</p>
|
|
445
444
|
</div>`;
|
|
446
445
|
const getEle = document.body ? document.body : document.getElementsByTagName('body')[0];
|
|
447
446
|
getEle.appendChild(createLoadingEle);
|
|
448
447
|
const getEle = document.getElementById('J_shopLoading');
|
|
449
448
|
getEle && getEle.remove();
|
|
450
449
|
const systemInfo: UtilsInterFace.taroGetSystemInfoSyncRes = getReviseSystemInfo(params);
|
|
451
450
|
if (!systemInfo.system && window) {
|
|
452
451
|
systemInfo.system = window.navigator.userAgent;
|
|
453
452
|
systemInfo.isChrome = !!systemInfo?.system.match(/chrome/i);
|
|
454
453
|
}
|
|
455
454
|
const isIOS = !!systemInfo?.system.match(/ios/i);
|
|
456
455
|
const isAndroid = !!systemInfo?.system.match(/android/i);
|
|
457
456
|
systemInfo.navBarHeight = 0;
|
|
458
457
|
systemInfo.statusBarHeight = 0;
|
|
459
458
|
systemInfo.capsulePosition = null;
|
|
460
459
|
systemInfo.isIOS = isIOS;
|
|
461
460
|
systemInfo.isAndroid = isAndroid;
|
|
462
461
|
_ShopSystemInfo = systemInfo;
|
|
463
462
|
return systemInfo;
|
|
464
463
|
return originDealShopContentData(pageData, sgmCustomReport, isvdev);
|
|
465
464
|
const numScale = Number(scale);
|
|
466
465
|
if (isNaN(numScale)) {
|
|
467
466
|
console.warn(
|
|
468
467
|
`The 'scale' parameter of the 'isInGrayscale' function is invalid! Expected a number, but received ${scale}`,
|
|
469
468
|
);
|
|
470
469
|
return false;
|
|
471
470
|
}
|
|
472
471
|
const { venderId } = global.info.queryInfo || {};
|
|
473
472
|
const id = venderId;
|
|
474
473
|
if (!id && numScale !== 1) {
|
|
475
474
|
return false;
|
|
476
475
|
}
|
|
477
476
|
const useScale = Math.max(0, Math.min(1, numScale));
|
|
478
477
|
const isMatch = numScale === 1 || Math.floor(Number(id) % (1 / useScale)) === 0;
|
|
479
478
|
if (reportKey) {
|
|
480
479
|
sgmCustomReport({
|
|
481
480
|
code: getSgmCustomCode(`${SgmCustomCode.GRAYSCALE}_${reportKey}_invoke`),
|
|
482
481
|
msg: '灰度调用',
|
|
483
482
|
});
|
|
484
483
|
console.log(
|
|
485
484
|
`基于KEY[${reportKey}]的灰度调用1次~`,
|
|
486
485
|
getSgmCustomCode(`${SgmCustomCode.GRAYSCALE}_${reportKey}_invoke`),
|
|
487
486
|
);
|
|
488
487
|
if (isMatch) {
|
|
489
488
|
sgmCustomReport({
|
|
490
489
|
code: getSgmCustomCode(`${SgmCustomCode.GRAYSCALE}_${reportKey}_hit`),
|
|
491
490
|
msg: '灰度命中',
|
|
492
491
|
});
|
|
493
492
|
console.log(
|
|
494
493
|
`基于KEY[${reportKey}]的命中1次灰度!`,
|
|
495
494
|
getSgmCustomCode(`${SgmCustomCode.GRAYSCALE}_${reportKey}_hit`),
|
|
496
495
|
);
|
|
497
496
|
}
|
|
498
497
|
}
|
|
499
498
|
return isMatch;
|
|
500
499
|
isJdApp,
|
|
501
500
|
isWxApp,
|
|
502
501
|
isIosDevice,
|
|
503
502
|
isAndroidDevice,
|
|
504
503
|
isHarmonyDevice,
|
|
505
504
|
isJdAndIosDevice,
|
|
506
505
|
isJdAndAndroidDevice,
|
|
507
506
|
isJdAndHarmonyDevice,
|
|
508
507
|
isNewHarmonyShop,
|
|
509
508
|
isJdAndroidX5Core,
|
|
510
509
|
isMin,
|
|
511
510
|
isWxMin,
|
|
512
511
|
isWxMinAndWxapp,
|
|
513
512
|
isJdMinAndHarmony,
|
|
514
513
|
isJdMin,
|
|
515
514
|
isH5,
|
|
516
515
|
isH5AndJdShopView,
|
|
517
516
|
isChartH5,
|
|
518
517
|
isH5AndJdShopViewNativeScroll,
|
|
519
518
|
isH5AndJdShopViewH5Scroll,
|
|
520
519
|
isH5AndJdShopH5CustomScrollView,
|
|
521
520
|
isH5AndJingGouMini,
|
|
522
521
|
isWxMiniH5View,
|
|
523
522
|
urlCookie,
|
|
524
523
|
sliceArrToChunkList,
|
|
525
524
|
dealAddress,
|
|
526
525
|
objectToUrlEncode,
|
|
527
526
|
parseQueryUrlString,
|
|
528
527
|
setLowSmallPicUrl,
|
|
529
528
|
setTaroStorage,
|
|
530
529
|
getTaroStorageKeyValue,
|
|
531
530
|
removeTaroStorageKey,
|
|
532
531
|
clearTaroStorageKey,
|
|
533
532
|
getAvifSupport,
|
|
534
533
|
getWebpSupport,
|
|
535
534
|
getQualityImage,
|
|
536
535
|
formatCountForUnit as countStringify,
|
|
537
536
|
getWxAppCookieStr,
|
|
538
537
|
getSystemInfos,
|
|
539
538
|
pxTransformFromData,
|
|
540
539
|
dealShopContentDataAndReport as dealShopContentData,
|
|
541
540
|
dateFormat,
|
|
542
541
|
throttle,
|
|
543
542
|
lodashThrottle,
|
|
544
543
|
debounce,
|
|
545
544
|
addHttps,
|
|
546
545
|
commonShowSuccessToast as showSuccessToast,
|
|
547
546
|
commonShowFailToast as showFailToast,
|
|
548
547
|
commonShowNormalToast as showNormalToast,
|
|
549
548
|
showShopLoading,
|
|
550
549
|
hideShopLoading,
|
|
551
550
|
stopNativeScrollEvent,
|
|
552
551
|
getAppChannelType,
|
|
553
552
|
formatTabActiveMenuType,
|
|
554
553
|
filterUrlQueryData,
|
|
555
554
|
sgmCustomReport,
|
|
556
555
|
draCustomReport,
|
|
557
556
|
remoteCustomReport,
|
|
558
557
|
draInterfaceCustomReport,
|
|
559
558
|
draBusinessCustomReport,
|
|
560
559
|
isMemberPage,
|
|
561
560
|
getFloorDataToDataDefines,
|
|
562
561
|
isOpenJdAppUrl,
|
|
563
562
|
jdOpenAppParams,
|
|
564
563
|
createJdOpenAppUrl,
|
|
565
564
|
isEmpty,
|
|
566
565
|
getJdAppReportPageSource,
|
|
567
566
|
isAppClassifyPage,
|
|
568
567
|
isAppHomeForMarketPage,
|
|
569
568
|
isImageOptimizeEnable,
|
|
570
569
|
isPc,
|
|
571
570
|
ipLoc_djd,
|
|
572
571
|
isTjScence,
|
|
573
572
|
isH5AdnJxMini,
|
|
574
573
|
isTjM,
|
|
575
574
|
isTjJxM,
|
|
576
575
|
isTJApp,
|
|
577
576
|
isH5AdnHaoWuJie,
|
|
578
577
|
tjChannel,
|
|
579
578
|
dealJdOpenAppData,
|
|
580
579
|
jdAppVersionCompare,
|
|
581
580
|
dealNativePixelToCssPixel,
|
|
582
581
|
isAppStowShop,
|
|
583
582
|
getSgmCustomCode,
|
|
584
583
|
handleSgmCodeTaroVersion,
|
|
585
584
|
isInGrayscale,
|
|
586
585
|
isIpadDevice,
|
|
587
586
|
getBorderStyle,
|
|
588
587
|
isSupportHybridHttpRequest,
|
|
589
588
|
isLanguageForEn,
|
|
590
589
|
sColor,
|
|
591
590
|
draInterfaceDSMCustomReport,
|
|
592
591
|
isTabletDevice,
|
|
593
592
|
taroToTransformRoutimePXNumber,
|
|
594
593
|
updateContainerWidth,
|
|
595
594
|
isInJdShopView,
|
|
595
|
+
import Taro from '@tarojs/taro';
|
|
596
596
|
stopNativeScrollEvent,
|
|
597
597
|
getAppChannelType,
|
|
598
598
|
isAndroidDevice,
|
|
599
599
|
isHarmonyDevice,
|
|
600
600
|
isH5AndJdShopView,
|
|
601
601
|
isChartH5,
|
|
602
602
|
isH5AndJdShopViewNativeScroll,
|
|
603
603
|
isIosDevice,
|
|
604
604
|
isJdAndAndroidDevice,
|
|
605
605
|
isJdAndIosDevice,
|
|
606
606
|
isJdApp,
|
|
607
607
|
isWxApp,
|
|
608
608
|
isWxMiniH5View,
|
|
609
609
|
isJdAndHarmonyDevice,
|
|
610
610
|
isNewHarmonyShop,
|
|
611
611
|
isH5AndJingGouMini,
|
|
612
612
|
urlCookie,
|
|
613
613
|
sgmCustomReport,
|
|
614
614
|
draCustomReport,
|
|
615
615
|
remoteCustomReport,
|
|
616
616
|
draInterfaceCustomReport,
|
|
617
617
|
draBusinessCustomReport,
|
|
618
618
|
draBusinessCustomLogReport,
|
|
619
619
|
isMemberPage,
|
|
620
620
|
isH5AndJdShopViewH5Scroll,
|
|
621
621
|
isH5AndJdShopH5CustomScrollView,
|
|
622
622
|
isAppClassifyPage,
|
|
623
623
|
isAppHomeForMarketPage,
|
|
624
624
|
isPc,
|
|
625
625
|
ipLoc_djd,
|
|
626
626
|
jdAppVersionCompare,
|
|
627
627
|
isTjScence,
|
|
628
628
|
isH5AdnJxMini,
|
|
629
629
|
isTjM,
|
|
630
630
|
isTjJxM,
|
|
631
631
|
isTJApp,
|
|
632
632
|
isH5AdnHaoWuJie,
|
|
633
633
|
tjChannel,
|
|
634
634
|
dealNativePixelToCssPixel,
|
|
635
635
|
isAppStowShop,
|
|
636
636
|
isJdAndroidX5Core,
|
|
637
637
|
parseQueryUrlObj,
|
|
638
638
|
isIpadDevice,
|
|
639
639
|
isTabletDevice,
|
|
640
640
|
checkPadScreenOrientationIsLandscape,
|
|
641
641
|
isSupportHybridHttpRequest,
|
|
642
642
|
isLanguageForEn,
|
|
643
643
|
sColor,
|
|
644
644
|
draInterfaceDSMCustomReport,
|
|
645
645
|
isInJdShopView,
|
|
646
646
|
isDongWebView,
|
|
647
647
|
addHttps,
|
|
648
648
|
clearTaroStorageKey,
|
|
649
649
|
countStringify as h5CountStringify,
|
|
650
650
|
dateFormat,
|
|
651
651
|
dealAddress,
|
|
652
652
|
dealShopContentData as originDealShopContentData,
|
|
653
653
|
debounce,
|
|
654
654
|
filterUrlQueryData,
|
|
655
655
|
formatTabActiveMenuType,
|
|
656
656
|
getAvifSupport,
|
|
657
657
|
getWebpSupport,
|
|
658
658
|
getTaroStorageKeyValue,
|
|
659
659
|
getWxAppCookieStr,
|
|
660
660
|
isH5,
|
|
661
661
|
isMin,
|
|
662
662
|
isJdMin,
|
|
663
663
|
isWxMin,
|
|
664
664
|
isWxMinAndWxapp,
|
|
665
665
|
isJdMinAndHarmony,
|
|
666
666
|
lodashThrottle,
|
|
667
667
|
objectToUrlEncode,
|
|
668
668
|
parseQueryUrlString,
|
|
669
669
|
removeTaroStorageKey,
|
|
670
670
|
setLowSmallPicUrl,
|
|
671
671
|
setTaroStorage,
|
|
672
672
|
showFailToast,
|
|
673
673
|
showNormalToast,
|
|
674
674
|
showSuccessToast,
|
|
675
675
|
sliceArrToChunkList,
|
|
676
676
|
throttle,
|
|
677
677
|
getQualityImageNew,
|
|
678
678
|
getQualityImageOld,
|
|
679
679
|
isOpenJdAppUrl,
|
|
680
680
|
jdOpenAppParams,
|
|
681
681
|
createJdOpenAppUrl,
|
|
682
682
|
isEmpty,
|
|
683
683
|
getJdAppReportPageSource,
|
|
684
684
|
dealJdOpenAppData,
|
|
685
685
|
getBorderStyle,
|
|
686
686
|
const getNum = Number(num);
|
|
687
687
|
let _changeLayoutWidth = layoutWidth;
|
|
688
688
|
if (!_changeLayoutWidth) {
|
|
689
689
|
_changeLayoutWidth =
|
|
690
690
|
_ShopSystemInfo && _ShopSystemInfo?.windowWidth
|
|
691
691
|
? _ShopSystemInfo.windowWidth
|
|
692
692
|
: Taro.getSystemInfoSync()?.windowWidth;
|
|
693
693
|
}
|
|
694
694
|
return _ShopSystemInfo?.isJdTabletDevice && !layoutWidth
|
|
695
695
|
? Math.floor(getNum * 1.2 * (_changeLayoutWidth / 720))
|
|
696
696
|
: Math.round((getNum / widthSize) * _changeLayoutWidth);
|
|
697
697
|
const getRootFontSize = (40 * (systemInfo?.windowWidth ?? _ShopSystemInfo.windowWidth)) / 750;
|
|
698
698
|
let getRealRootFontSize = getRootFontSize > 40 ? 40 : getRootFontSize < 20 ? 20 : getRootFontSize;
|
|
699
699
|
if (_ShopSystemInfo?.isJdTabletDevice) {
|
|
700
700
|
getRealRootFontSize = Math.floor(
|
|
701
701
|
24 * ((systemInfo?.windowWidth ?? _ShopSystemInfo.windowWidth) / 720),
|
|
702
702
|
);
|
|
703
703
|
}
|
|
704
704
|
return Math.ceil(
|
|
705
705
|
(((parseInt(String(changeSize), 10) / 40) * 750) / designWidth) * getRealRootFontSize,
|
|
706
706
|
);
|
|
707
707
|
console.log(
|
|
708
708
|
'获取系统宽度systemInfo?.windowWidth',
|
|
709
709
|
systemInfo?.windowWidth,
|
|
710
710
|
'taroToTransformRoutimePXNumber(changeWidth)',
|
|
711
711
|
taroToTransformRoutimePXNumber(changeWidth, 750, systemInfo),
|
|
712
712
|
);
|
|
713
713
|
return buildType === BUILD_TYPE.CLASSIFY && systemInfo?.windowWidth
|
|
714
714
|
? systemInfo?.windowWidth - taroToTransformRoutimePXNumber(changeWidth, 750, systemInfo)
|
|
715
715
|
: systemInfo?.windowWidth ?? 0;
|
|
716
716
|
const systemInfo = _ShopSystemInfo || Taro.getSystemInfoSync();
|
|
717
717
|
console.log(
|
|
718
718
|
'获取系统宽度systemInfo?.windowWidth',
|
|
719
719
|
systemInfo?.windowWidth,
|
|
720
720
|
'taroToTransformRoutimePXNumber(changeWidth)',
|
|
721
721
|
taroToTransformRoutimePXNumber(changeWidth, 750, systemInfo),
|
|
722
722
|
);
|
|
723
723
|
const containerWidth =
|
|
724
724
|
isClassify && systemInfo?.windowWidth
|
|
725
725
|
? systemInfo?.windowWidth - taroToTransformRoutimePXNumber(changeWidth, 750, systemInfo)
|
|
726
726
|
: (systemInfo?.windowWidth ?? 0);
|
|
727
727
|
if (global?.info?.sysInfo) {
|
|
728
728
|
global.info.sysInfo['containerWidth'] = containerWidth;
|
|
729
729
|
}
|
|
730
730
|
return (
|
|
731
731
|
isJdApp &&
|
|
732
732
|
(parseQueryUrlObj['device'] === 'tablet' || Math.min(rootEleWidth, window.screen.height) >= 720)
|
|
733
733
|
);
|
|
734
734
|
const systemInfo = Taro.getSystemInfoSync();
|
|
735
735
|
if (params && params?.pageWidth && params?.pageHeight) {
|
|
736
736
|
systemInfo.windowWidth = params?.pageWidth;
|
|
737
737
|
systemInfo.windowHeight = params?.pageHeight;
|
|
738
738
|
console.warn('松果app内获取重置系统信息宽度值', params, ',systemInfo信息集合为', systemInfo);
|
|
739
739
|
} else {
|
|
740
740
|
if (isPc) {
|
|
741
741
|
systemInfo.windowWidth = 375;
|
|
742
742
|
} else {
|
|
743
743
|
const getWinWidth = window.innerWidth;
|
|
744
744
|
const getWinHeight = window.innerHeight;
|
|
745
745
|
const getScreenWidth = window.screen.width;
|
|
746
746
|
const getScreenHeight = window.screen.height;
|
|
747
747
|
const getRootEleInitWidth = params?.rootEleInitWidth || 0;
|
|
748
748
|
const isReplaceSystemWidth = params?.replaceSystemWidth || false;
|
|
749
749
|
systemInfo.isJdTabletDevice = checkIsJdTabletDevice(getRootEleInitWidth);
|
|
750
750
|
systemInfo.isJdTabletLandscape =
|
|
751
751
|
systemInfo.isJdTabletDevice &&
|
|
752
752
|
checkPadScreenOrientationIsLandscape(getRootEleInitWidth, getScreenWidth, getScreenHeight);
|
|
753
753
|
if (!systemInfo.isJdTabletDevice && isReplaceSystemWidth) {
|
|
754
754
|
if (systemInfo?.windowWidth <= 0) {
|
|
755
755
|
systemInfo.windowWidth = Math.min(getRootEleInitWidth, getScreenWidth);
|
|
756
756
|
systemInfo.windowHeight = getScreenHeight;
|
|
757
757
|
console.warn(
|
|
758
758
|
'====初始化获取当前设备不是pad,但是触发屏幕宽高最小值600,系统获取宽度为0,进行重置系统宽度为根元素宽度与屏幕宽度最小值====',
|
|
759
759
|
systemInfo.windowWidth,
|
|
760
760
|
'getRootEleInitWidth',
|
|
761
761
|
getRootEleInitWidth,
|
|
762
762
|
'getScreenWidth',
|
|
763
763
|
getScreenWidth,
|
|
764
764
|
'getScreenHeight',
|
|
765
765
|
getScreenHeight,
|
|
766
766
|
);
|
|
767
767
|
draBusinessCustomReport({
|
|
768
768
|
type: 'jdapp_pad_width_error_info',
|
|
769
769
|
errMsg: `松果app内获取当前设备不是pad,触发屏幕宽高最小值600,系统信息宽度为0,进行重置,通过window获取的结果,getWinWidth:${getWinWidth},getScreenWidth: ${getScreenWidth},getWinHeight:${getWinHeight},getScreenHeight: ${getScreenHeight},根元素宽度值:${getRootEleInitWidth}`,
|
|
770
770
|
originReqDataStr: JSON.stringify({
|
|
771
771
|
isJdApp,
|
|
772
772
|
isAndroidDevice,
|
|
773
773
|
getScreenWidth,
|
|
774
774
|
getScreenHeight,
|
|
775
775
|
getWinWidth,
|
|
776
776
|
getWinHeight,
|
|
777
777
|
getRootEleInitWidth,
|
|
778
778
|
}),
|
|
779
779
|
});
|
|
780
780
|
}
|
|
781
781
|
} else {
|
|
782
782
|
if (isJdApp && isAndroidDevice && !systemInfo.isJdTabletDevice && systemInfo) {
|
|
783
783
|
const isLandscape = getScreenWidth >= getScreenHeight;
|
|
784
784
|
const { windowWidth, windowHeight, screenWidth, screenHeight } = systemInfo;
|
|
785
785
|
if (windowWidth <= 0) {
|
|
786
786
|
systemInfo.initWindowWidth = windowWidth;
|
|
787
787
|
if (isLandscape) {
|
|
788
788
|
systemInfo.windowWidth = getScreenHeight;
|
|
789
789
|
systemInfo.windowHeight = getScreenWidth;
|
|
790
790
|
systemInfo.screenWidth = getScreenHeight;
|
|
791
791
|
systemInfo.screenHeight = getScreenWidth;
|
|
792
792
|
} else {
|
|
793
793
|
systemInfo.windowWidth = getScreenWidth;
|
|
794
794
|
systemInfo.windowHeight = getScreenHeight;
|
|
795
795
|
systemInfo.screenWidth = getScreenWidth;
|
|
796
796
|
systemInfo.screenHeight = getScreenHeight;
|
|
797
797
|
}
|
|
798
798
|
console.warn(
|
|
799
799
|
`松果安卓app内获取系统信息宽度异常为小于等于0,是否为横屏${isLandscape},进行重置,taro获取窗口宽度值${windowWidth},重置后的宽度值${systemInfo.windowWidth},taro获取窗口高度值${windowHeight},重置后的高度值${systemInfo.windowHeight},根元素宽度值${getRootEleInitWidth}`,
|
|
800
800
|
);
|
|
801
801
|
draBusinessCustomReport({
|
|
802
802
|
type: 'android_jdapp_width_error_info',
|
|
803
803
|
errMsg: `松果安卓app内获取系统信息宽度为小于等于0,是否为横屏${isLandscape},进行重置,通过window获取的结果,getWinWidth:${getWinWidth},getScreenWidth: ${getScreenWidth},getWinHeight:${getWinHeight},getScreenHeight: ${getScreenHeight},根元素宽度值:${getRootEleInitWidth}`,
|
|
804
804
|
originReqDataStr: JSON.stringify({
|
|
805
805
|
isJdApp,
|
|
806
806
|
initData: `Taro.getSystemInfo获取窗口宽度值${windowWidth},高度值${windowHeight},获取屏幕宽度值${screenWidth},高度值${screenHeight}`,
|
|
807
807
|
getScreenWidth,
|
|
808
808
|
getScreenHeight,
|
|
809
809
|
getWinWidth,
|
|
810
810
|
getWinHeight,
|
|
811
811
|
getRootEleInitWidth,
|
|
812
812
|
}),
|
|
813
813
|
});
|
|
814
814
|
sgmCustomReport({
|
|
815
815
|
type: 2,
|
|
816
816
|
code: 'android_jdapp_width_error_info',
|
|
817
817
|
msg: {
|
|
818
818
|
title: `松果安卓app内获取系统信息宽度为小于等于0,是否为横屏${isLandscape},进行重置,通过window获取的结果,getWinWidth:${getWinWidth},getScreenWidth: ${getScreenWidth},getWinHeight:${getWinHeight},getScreenHeight: ${getScreenHeight},根元素宽度值:${getRootEleInitWidth}`,
|
|
819
819
|
initData: `Taro.getSystemInfo获取窗口宽度值${windowWidth},高度值${windowHeight},获取屏幕宽度值${screenWidth},高度值${screenHeight}`,
|
|
820
820
|
taroSysInfo: systemInfo,
|
|
821
821
|
},
|
|
822
822
|
});
|
|
823
823
|
} else {
|
|
824
824
|
let _getChangeWinWidthState = false;
|
|
825
825
|
if (getWinWidth > 0 && windowWidth > 0 && windowWidth > getWinWidth) {
|
|
826
826
|
if (isLandscape) {
|
|
827
827
|
systemInfo.windowWidth = getScreenHeight;
|
|
828
828
|
systemInfo.windowHeight = getScreenWidth;
|
|
829
829
|
systemInfo.screenWidth = getScreenHeight;
|
|
830
830
|
systemInfo.screenHeight = getScreenWidth;
|
|
831
831
|
} else {
|
|
832
832
|
systemInfo.windowWidth = getScreenWidth;
|
|
833
833
|
systemInfo.windowHeight = getScreenHeight;
|
|
834
834
|
systemInfo.screenWidth = getScreenWidth;
|
|
835
835
|
systemInfo.screenHeight = getScreenHeight;
|
|
836
836
|
}
|
|
837
837
|
_getChangeWinWidthState = true;
|
|
838
838
|
}
|
|
839
839
|
_getChangeWinWidthState &&
|
|
840
840
|
console.warn(
|
|
841
841
|
`松果安卓app内获取系统信息宽度异常,是否为横屏${isLandscape},进行重置,taro获取窗口宽度值${windowWidth},重置后的宽度值${systemInfo.windowWidth},taro获取屏幕宽度值${screenWidth},重置后的宽度值${systemInfo.screenWidth}`,
|
|
842
842
|
);
|
|
843
843
|
if (_getChangeWinWidthState) {
|
|
844
844
|
draBusinessCustomReport({
|
|
845
845
|
type: 'android_jdapp_width_error_info_2',
|
|
846
846
|
title: `松果安卓app内获取系统信息宽度异常,是否为横屏${isLandscape},进行重置,通过window获取的结果,getWinWidth:${getWinWidth},getScreenWidth: ${getScreenWidth},getWinHeight:${getWinHeight},getScreenHeight: ${getScreenHeight},根元素宽度值:${getRootEleInitWidth}`,
|
|
847
847
|
originReqDataStr: JSON.stringify({
|
|
848
848
|
isJdApp,
|
|
849
849
|
initData: `Taro.getSystemInfo获取窗口宽度值${windowWidth},高度值${windowHeight},获取屏幕宽度值${screenWidth},高度值${screenHeight}`,
|
|
850
850
|
getScreenWidth,
|
|
851
851
|
getScreenHeight,
|
|
852
852
|
getWinWidth,
|
|
853
853
|
getWinHeight,
|
|
854
854
|
getRootEleInitWidth,
|
|
855
855
|
}),
|
|
856
856
|
});
|
|
857
857
|
sgmCustomReport({
|
|
858
858
|
type: 2,
|
|
859
859
|
code: 'android_jdapp_width_error_info_2',
|
|
860
860
|
msg: {
|
|
861
861
|
title: `松果安卓app内获取系统信息宽度异常,是否为横屏${isLandscape},进行重置,通过window获取的结果,getWinWidth:${getWinWidth},getScreenWidth: ${getScreenWidth},getWinHeight:${getWinHeight},getScreenHeight: ${getScreenHeight},根元素宽度值:${getRootEleInitWidth}`,
|
|
862
862
|
initData: `Taro.getSystemInfo获取窗口宽度值${windowWidth},高度值${windowHeight},获取屏幕宽度值${screenWidth},高度值${screenHeight}`,
|
|
863
863
|
taroSysInfo: systemInfo,
|
|
864
864
|
},
|
|
865
865
|
});
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
870
|
|
|
871
871
|
if (systemInfo.isJdTabletDevice) {
|
|
872
872
|
systemInfo.windowWidth = Math.min(getRootEleInitWidth, getScreenWidth, getScreenHeight);
|
|
873
873
|
systemInfo.windowHeight = Math.max(getScreenWidth, getScreenHeight);
|
|
874
874
|
if (systemInfo.isJdTabletLandscape) {
|
|
875
875
|
const getRenderCenterState = window?.PAGE_DATA?.businessData?.fitPadCenterRenderLowVersion
|
|
876
876
|
? jdAppVersionCompare(window.PAGE_DATA.businessData.fitPadCenterRenderLowVersion) < 0
|
|
877
877
|
: false;
|
|
878
878
|
if (getRenderCenterState && window?.PAGE_DATA) {
|
|
879
879
|
window.PAGE_DATA.isFitJdPadRenderCenter = true;
|
|
880
880
|
}
|
|
881
881
|
if (window?.PAGE_DATA?.isFitJdPadRenderCenter) {
|
|
882
882
|
systemInfo.windowWidth = Math.min(getRootEleInitWidth, getScreenWidth, getScreenHeight);
|
|
883
883
|
systemInfo.windowHeight = Math.max(
|
|
884
884
|
getRootEleInitWidth,
|
|
885
885
|
getScreenWidth,
|
|
886
886
|
getScreenHeight,
|
|
887
887
|
);
|
|
888
888
|
} else {
|
|
889
889
|
systemInfo.windowWidth = Math.max(getRootEleInitWidth, getScreenWidth, getScreenHeight);
|
|
890
890
|
systemInfo.windowHeight = Math.min(
|
|
891
891
|
getRootEleInitWidth,
|
|
892
892
|
getScreenWidth,
|
|
893
893
|
getScreenHeight,
|
|
894
894
|
);
|
|
895
895
|
}
|
|
896
896
|
}
|
|
897
897
|
console.warn(
|
|
898
898
|
'====初始化获取当前设备是否是平板设备,是否横屏====',
|
|
899
899
|
systemInfo.isJdTabletDevice,
|
|
900
900
|
systemInfo.isJdTabletLandscape,
|
|
901
901
|
'屏幕信息',
|
|
902
902
|
window.screen,
|
|
903
903
|
'getScreenWidth',
|
|
904
904
|
getScreenWidth,
|
|
905
905
|
'getScreenHeight',
|
|
906
906
|
getScreenHeight,
|
|
907
907
|
'getRootEleInitWidth',
|
|
908
908
|
getRootEleInitWidth,
|
|
909
909
|
'当前是否要求居中展示,居中展示那么宽高值要对调',
|
|
910
910
|
window?.PAGE_DATA?.isFitJdPadRenderCenter,
|
|
911
911
|
'当前pad最终展示的窗口宽度',
|
|
912
912
|
systemInfo.windowWidth,
|
|
913
913
|
);
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
916
|
}
|
|
917
917
|
systemInfo['containerWidth'] = getContainerWidth(buildType, systemInfo);
|
|
918
918
|
console.warn('====获取系统信息=====', systemInfo);
|
|
919
919
|
return systemInfo;
|
|
920
920
|
let result: boolean | null = null;
|
|
921
921
|
return function () {
|
|
922
922
|
if (result === null) {
|
|
923
923
|
const appVersionCheckPass = jdAppVersionCompare(MPAAS_CONFIG_APP_VERSION) >= 0;
|
|
924
924
|
if (!isJdApp) {
|
|
925
925
|
console.warn('🚗 ~~ file: utils.ts:191 站外H5默认打开图片优化~');
|
|
926
926
|
isIgnoreOptimizeFromServer = true;
|
|
927
927
|
result = true;
|
|
928
928
|
return true;
|
|
929
929
|
}
|
|
930
930
|
const enableAvifOptimize = appVersionCheckPass;
|
|
931
931
|
if (enableAvifOptimize) {
|
|
932
932
|
const configData = global?.getDynamicConfig('avifSwitch');
|
|
933
933
|
const {
|
|
934
934
|
globalOn = true,
|
|
935
935
|
ignoreOptimizeFromServer = false,
|
|
936
936
|
page = {},
|
|
937
937
|
grayscale = {},
|
|
938
938
|
whiteList = [],
|
|
939
939
|
blackList = [],
|
|
940
940
|
} = configData || {};
|
|
941
941
|
const { shopId = '0', venderId = '0' } = parseQueryUrlObj;
|
|
942
942
|
let imageEnableResult = true;
|
|
943
943
|
isIgnoreOptimizeFromServer = ignoreOptimizeFromServer;
|
|
944
944
|
if (
|
|
945
945
|
blackList.find((item) => item.sId === Number(shopId) || item.vId === Number(venderId))
|
|
946
946
|
) {
|
|
947
947
|
imageEnableResult = false;
|
|
948
948
|
} else if (
|
|
949
949
|
whiteList.find((item) => item.sId === Number(shopId) || item.vId === Number(venderId))
|
|
950
950
|
) {
|
|
951
951
|
isIgnoreOptimizeFromServer = true;
|
|
952
952
|
imageEnableResult = true;
|
|
953
953
|
} else if (grayscale[buildType] && isInGrayscale(grayscale[buildType])) {
|
|
954
954
|
isIgnoreOptimizeFromServer = true;
|
|
955
955
|
imageEnableResult = true;
|
|
956
956
|
} else {
|
|
957
957
|
imageEnableResult = globalOn === true || page[buildType] === true;
|
|
958
958
|
if (globalOn === true) {
|
|
959
959
|
isIgnoreOptimizeFromServer = true;
|
|
960
960
|
} else if (page[buildType] === true) {
|
|
961
961
|
} else {
|
|
962
962
|
}
|
|
963
963
|
}
|
|
964
964
|
result = imageEnableResult;
|
|
965
965
|
return imageEnableResult;
|
|
966
966
|
} else {
|
|
967
967
|
result = false;
|
|
968
968
|
return false;
|
|
969
969
|
}
|
|
970
970
|
} else {
|
|
971
971
|
return result;
|
|
972
972
|
}
|
|
973
973
|
};
|
|
974
974
|
if (typeof options === 'object' && isImageOptimizeEnable()) {
|
|
975
975
|
return getQualityImageNew(imgUrl, options, isIgnoreOptimizeFromServer);
|
|
976
976
|
} else {
|
|
977
977
|
return getQualityImageOld(imgUrl, options);
|
|
978
978
|
}
|
|
979
979
|
const getSystemInfo = getSystemAndContainerWidthInfo(params) || {
|
|
980
980
|
windowWidth: window.innerWidth,
|
|
981
981
|
containerWidth: getContainerWidth(buildType, {
|
|
982
982
|
windowWidth: window.innerWidth,
|
|
983
983
|
}),
|
|
984
984
|
screenWidth: window.innerWidth,
|
|
985
985
|
platform: '',
|
|
986
986
|
model: '',
|
|
987
987
|
system: '',
|
|
988
988
|
};
|
|
989
989
|
return getSystemInfo;
|
|
990
990
|
const params = Object.assign(
|
|
991
991
|
{},
|
|
992
992
|
{
|
|
993
993
|
title: '',
|
|
994
994
|
duration: 1500,
|
|
995
995
|
},
|
|
996
996
|
options,
|
|
997
997
|
);
|
|
998
998
|
params.duration = params.duration / 1000;
|
|
999
999
|
if (isJdApp && !isJdAndHarmonyDevice && !window?.PAGE_DATA?.businessData?.hideNativeToast) {
|
|
1000
1000
|
const showSuccessType = isIosDevice ? ToastIosType.SUCCESS : ToastAndroidType.SUCCESS;
|
|
1001
1001
|
const duration = isAndroidDevice ? 0 : params.duration;
|
|
1002
1002
|
nativePageShowToast(options.title, showSuccessType, duration);
|
|
1003
1003
|
console.log('执行原生toast success');
|
|
1004
1004
|
} else {
|
|
1005
1005
|
showSuccessToast(options);
|
|
1006
1006
|
}
|
|
1007
1007
|
const params = Object.assign(
|
|
1008
1008
|
{},
|
|
1009
1009
|
{
|
|
1010
1010
|
title: '',
|
|
1011
1011
|
duration: 1500,
|
|
1012
1012
|
},
|
|
1013
1013
|
options,
|
|
1014
1014
|
);
|
|
1015
1015
|
params.duration = params.duration / 1000;
|
|
1016
1016
|
if (isJdApp && !isJdAndHarmonyDevice && !window?.PAGE_DATA?.businessData?.hideNativeToast) {
|
|
1017
1017
|
const showSuccessType = isIosDevice ? ToastIosType.FAIL : ToastAndroidType.FAIL;
|
|
1018
1018
|
const duration = isAndroidDevice ? 0 : params.duration;
|
|
1019
1019
|
nativePageShowToast(options.title, showSuccessType, duration);
|
|
1020
1020
|
console.log('执行原生toast fail');
|
|
1021
1021
|
} else {
|
|
1022
1022
|
console.log('执行H5 toast fail');
|
|
1023
1023
|
showFailToast(options);
|
|
1024
1024
|
}
|
|
1025
1025
|
const params = Object.assign(
|
|
1026
1026
|
{},
|
|
1027
1027
|
{
|
|
1028
1028
|
title: '',
|
|
1029
1029
|
duration: 1500,
|
|
1030
1030
|
},
|
|
1031
1031
|
options,
|
|
1032
1032
|
);
|
|
1033
1033
|
params.duration = params.duration / 1000;
|
|
1034
1034
|
if (isJdApp && !isJdAndHarmonyDevice && !window?.PAGE_DATA?.businessData?.hideNativeToast) {
|
|
1035
1035
|
const showSuccessType = isIosDevice ? ToastIosType.NORMAL : ToastAndroidType.NORMAL;
|
|
1036
1036
|
const duration = isAndroidDevice ? 0 : params.duration;
|
|
1037
1037
|
nativePageShowToast(options.title, showSuccessType, duration);
|
|
1038
1038
|
} else {
|
|
1039
1039
|
showNormalToast(options);
|
|
1040
1040
|
}
|
|
1041
1041
|
if (isLanguageForEn) {
|
|
1042
1042
|
count = Number(count);
|
|
1043
1043
|
if (count >= 1000000000) {
|
|
1044
1044
|
return (count / 1000000000).toFixed(fixedNum) + 'B';
|
|
1045
1045
|
} else if (count >= 1000000) {
|
|
1046
1046
|
return (count / 1000000).toFixed(fixedNum) + 'M';
|
|
1047
1047
|
} else if (count >= 1000) {
|
|
1048
1048
|
return (count / 1000).toFixed(fixedNum) + 'K';
|
|
1049
1049
|
} else {
|
|
1050
1050
|
return count;
|
|
1051
1051
|
}
|
|
1052
1052
|
} else {
|
|
1053
1053
|
return h5CountStringify(count, fixedNum, unit, maxNum);
|
|
1054
1054
|
}
|
|
1055
1055
|
const createLoadingEle = document.createElement('div');
|
|
1056
1056
|
createLoadingEle.id = 'J_shopLoading';
|
|
1057
1057
|
createLoadingEle.className = `d-shop-loading flexible-center-box ${customClassName}`;
|
|
1058
1058
|
createLoadingEle.innerHTML = `<div class='d-loading-content'>
|
|
1059
1059
|
<span class='d-shop-loading-icon'></span>
|
|
1060
1060
|
<p class='d-shop-text'>${text}</p>
|
|
1061
1061
|
</div>`;
|
|
1062
1062
|
const getEle = document.body ? document.body : document.getElementsByTagName('body')[0];
|
|
1063
1063
|
getEle.appendChild(createLoadingEle);
|
|
1064
1064
|
const getEle = document.getElementById('J_shopLoading');
|
|
1065
1065
|
getEle && getEle.remove();
|
|
1066
1066
|
const systemInfo: UtilsInterFace.taroGetSystemInfoSyncRes = getReviseSystemInfo(params);
|
|
1067
1067
|
if (!systemInfo.system && window) {
|
|
1068
1068
|
systemInfo.system = window.navigator.userAgent;
|
|
1069
1069
|
systemInfo.isChrome = !!systemInfo?.system.match(/chrome/i);
|
|
1070
1070
|
}
|
|
1071
1071
|
const isIOS = !!systemInfo?.system.match(/ios/i);
|
|
1072
1072
|
const isAndroid = !!systemInfo?.system.match(/android/i);
|
|
1073
1073
|
systemInfo.navBarHeight = 0;
|
|
1074
1074
|
systemInfo.statusBarHeight = 0;
|
|
1075
1075
|
systemInfo.capsulePosition = null;
|
|
1076
1076
|
systemInfo.isIOS = isIOS;
|
|
1077
1077
|
systemInfo.isAndroid = isAndroid;
|
|
1078
1078
|
_ShopSystemInfo = systemInfo;
|
|
1079
1079
|
return systemInfo;
|
|
1080
1080
|
return originDealShopContentData(pageData, sgmCustomReport, isvdev);
|
|
1081
1081
|
const numScale = Number(scale);
|
|
1082
1082
|
if (isNaN(numScale)) {
|
|
1083
1083
|
console.warn(
|
|
1084
1084
|
`The 'scale' parameter of the 'isInGrayscale' function is invalid! Expected a number, but received ${scale}`,
|
|
1085
1085
|
);
|
|
1086
1086
|
return false;
|
|
1087
1087
|
}
|
|
1088
1088
|
const { venderId } = global.info.queryInfo || {};
|
|
1089
1089
|
const id = venderId;
|
|
1090
1090
|
if (!id && numScale !== 1) {
|
|
1091
1091
|
return false;
|
|
1092
1092
|
}
|
|
1093
1093
|
const useScale = Math.max(0, Math.min(1, numScale));
|
|
1094
1094
|
const isMatch = numScale === 1 || Math.floor(Number(id) % (1 / useScale)) === 0;
|
|
1095
1095
|
if (reportKey) {
|
|
1096
1096
|
sgmCustomReport({
|
|
1097
1097
|
code: getSgmCustomCode(`${SgmCustomCode.GRAYSCALE}_${reportKey}_invoke`),
|
|
1098
1098
|
msg: '灰度调用',
|
|
1099
1099
|
});
|
|
1100
1100
|
console.log(
|
|
1101
1101
|
`基于KEY[${reportKey}]的灰度调用1次~`,
|
|
1102
1102
|
getSgmCustomCode(`${SgmCustomCode.GRAYSCALE}_${reportKey}_invoke`),
|
|
1103
1103
|
);
|
|
1104
1104
|
if (isMatch) {
|
|
1105
1105
|
sgmCustomReport({
|
|
1106
1106
|
code: getSgmCustomCode(`${SgmCustomCode.GRAYSCALE}_${reportKey}_hit`),
|
|
1107
1107
|
msg: '灰度命中',
|
|
1108
1108
|
});
|
|
1109
1109
|
console.log(
|
|
1110
1110
|
`基于KEY[${reportKey}]的命中1次灰度!`,
|
|
1111
1111
|
getSgmCustomCode(`${SgmCustomCode.GRAYSCALE}_${reportKey}_hit`),
|
|
1112
1112
|
);
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
1115
1115
|
return isMatch;
|
|
1116
1116
|
isJdApp,
|
|
1117
1117
|
isWxApp,
|
|
1118
1118
|
isIosDevice,
|
|
1119
1119
|
isAndroidDevice,
|
|
1120
1120
|
isHarmonyDevice,
|
|
1121
1121
|
isJdAndIosDevice,
|
|
1122
1122
|
isJdAndAndroidDevice,
|
|
1123
1123
|
isJdAndHarmonyDevice,
|
|
1124
1124
|
isNewHarmonyShop,
|
|
1125
1125
|
isJdAndroidX5Core,
|
|
1126
1126
|
isMin,
|
|
1127
1127
|
isWxMin,
|
|
1128
1128
|
isWxMinAndWxapp,
|
|
1129
1129
|
isJdMinAndHarmony,
|
|
1130
1130
|
isJdMin,
|
|
1131
1131
|
isH5,
|
|
1132
1132
|
isH5AndJdShopView,
|
|
1133
1133
|
isChartH5,
|
|
1134
1134
|
isH5AndJdShopViewNativeScroll,
|
|
1135
1135
|
isH5AndJdShopViewH5Scroll,
|
|
1136
1136
|
isH5AndJdShopH5CustomScrollView,
|
|
1137
1137
|
isH5AndJingGouMini,
|
|
1138
1138
|
isWxMiniH5View,
|
|
1139
1139
|
urlCookie,
|
|
1140
1140
|
sliceArrToChunkList,
|
|
1141
1141
|
dealAddress,
|
|
1142
1142
|
objectToUrlEncode,
|
|
1143
1143
|
parseQueryUrlString,
|
|
1144
1144
|
setLowSmallPicUrl,
|
|
1145
1145
|
setTaroStorage,
|
|
1146
1146
|
getTaroStorageKeyValue,
|
|
1147
1147
|
removeTaroStorageKey,
|
|
1148
1148
|
clearTaroStorageKey,
|
|
1149
1149
|
getAvifSupport,
|
|
1150
1150
|
getWebpSupport,
|
|
1151
1151
|
getQualityImage,
|
|
1152
1152
|
formatCountForUnit as countStringify,
|
|
1153
1153
|
getWxAppCookieStr,
|
|
1154
1154
|
getSystemInfos,
|
|
1155
1155
|
pxTransformFromData,
|
|
1156
1156
|
dealShopContentDataAndReport as dealShopContentData,
|
|
1157
1157
|
dateFormat,
|
|
1158
1158
|
throttle,
|
|
1159
1159
|
lodashThrottle,
|
|
1160
1160
|
debounce,
|
|
1161
1161
|
addHttps,
|
|
1162
1162
|
commonShowSuccessToast as showSuccessToast,
|
|
1163
1163
|
commonShowFailToast as showFailToast,
|
|
1164
1164
|
commonShowNormalToast as showNormalToast,
|
|
1165
1165
|
showShopLoading,
|
|
1166
1166
|
hideShopLoading,
|
|
1167
1167
|
stopNativeScrollEvent,
|
|
1168
1168
|
getAppChannelType,
|
|
1169
1169
|
formatTabActiveMenuType,
|
|
1170
1170
|
filterUrlQueryData,
|
|
1171
1171
|
sgmCustomReport,
|
|
1172
1172
|
draCustomReport,
|
|
1173
1173
|
remoteCustomReport,
|
|
1174
1174
|
draInterfaceCustomReport,
|
|
1175
1175
|
draBusinessCustomReport,
|
|
1176
1176
|
draBusinessCustomLogReport,
|
|
1177
1177
|
isMemberPage,
|
|
1178
1178
|
getFloorDataToDataDefines,
|
|
1179
1179
|
isOpenJdAppUrl,
|
|
1180
1180
|
jdOpenAppParams,
|
|
1181
1181
|
createJdOpenAppUrl,
|
|
1182
1182
|
isEmpty,
|
|
1183
1183
|
getJdAppReportPageSource,
|
|
1184
1184
|
isAppClassifyPage,
|
|
1185
1185
|
isAppHomeForMarketPage,
|
|
1186
1186
|
isImageOptimizeEnable,
|
|
1187
1187
|
isPc,
|
|
1188
1188
|
ipLoc_djd,
|
|
1189
1189
|
isTjScence,
|
|
1190
1190
|
isH5AdnJxMini,
|
|
1191
1191
|
isTjM,
|
|
1192
1192
|
isTjJxM,
|
|
1193
1193
|
isTJApp,
|
|
1194
1194
|
isH5AdnHaoWuJie,
|
|
1195
1195
|
tjChannel,
|
|
1196
1196
|
dealJdOpenAppData,
|
|
1197
1197
|
jdAppVersionCompare,
|
|
1198
1198
|
dealNativePixelToCssPixel,
|
|
1199
1199
|
isAppStowShop,
|
|
1200
1200
|
getSgmCustomCode,
|
|
1201
1201
|
handleSgmCodeTaroVersion,
|
|
1202
1202
|
isInGrayscale,
|
|
1203
1203
|
isIpadDevice,
|
|
1204
1204
|
getBorderStyle,
|
|
1205
1205
|
isSupportHybridHttpRequest,
|
|
1206
1206
|
isLanguageForEn,
|
|
1207
1207
|
sColor,
|
|
1208
1208
|
draInterfaceDSMCustomReport,
|
|
1209
1209
|
isTabletDevice,
|
|
1210
1210
|
taroToTransformRoutimePXNumber,
|
|
1211
1211
|
updateContainerWidth,
|
|
1212
1212
|
isInJdShopView,
|
|
1213
1213
|
isDongWebView,
|