@conecli/cone-render 0.8.20-shop.21 → 0.8.20-shop.211
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 +7 -1
- package/dist/api/index.ts +1 -1
- package/dist/assets/icon_blue_info.svg +1 -0
- package/dist/common/const.ts +1 -1
- package/dist/common/environmentType.ts +1 -0
- package/dist/common/index.h5.ts +1 -1
- package/dist/common/index.jd.ts +1 -1
- package/dist/common/index.ts +1 -1
- package/dist/common/index.weapp.ts +1 -1
- package/dist/common/jdplayerSdk.ts +1 -0
- package/dist/common/jssdk.ts +1 -0
- package/dist/common/pageType.ts +1 -0
- package/dist/common/sgmCustomCode.ts +1 -0
- package/dist/common/token/index.h5.ts +1 -1
- package/dist/common/token/token.jd.ts +1 -1
- package/dist/common/token/token.ts +1 -1
- package/dist/common/wxappApi.jd.ts +1 -0
- package/dist/common/wxappApi.ts +1 -1
- package/dist/components/ErrorBoundary.tsx +1 -1
- package/dist/components/base/CommonFloorHead/index.module.scss +126 -111
- package/dist/components/base/CommonFloorHead/index.tsx +1 -1
- package/dist/components/base/CountDown/index.module.scss +49 -44
- package/dist/components/base/CountDown/index.tsx +1 -1
- package/dist/components/base/CustomScrollView/index.jd.tsx +1 -0
- package/dist/components/base/CustomScrollView/index.module.scss +7 -0
- package/dist/components/base/CustomScrollView/index.tsx +1 -1
- package/dist/components/base/CustomVideo/common.ts +1 -0
- package/dist/components/base/CustomVideo/index.module.scss +1 -1
- package/dist/components/base/CustomVideo/index.tsx +1 -1
- package/dist/components/base/Dialog/index.module.scss +16 -0
- package/dist/components/base/Dialog/index.tsx +1 -1
- package/dist/components/base/Exposure/index.h5.tsx +1 -1
- package/dist/components/base/ExposureSmart/const.ts +1 -0
- package/dist/components/base/ExposureSmart/index.h5.module.scss +30 -6
- package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
- package/dist/components/base/ExposureSmart/index.module.scss +20 -9
- package/dist/components/base/ExposureSmart/index.tsx +1 -1
- package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
- package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
- package/dist/components/base/InViewRender/index.tsx +1 -1
- package/dist/components/base/InViewRender/index.weapp.tsx +1 -1
- package/dist/components/base/ItemViewExposureSmart/index.module.scss +8 -0
- package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -0
- package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
- package/dist/components/base/LazyLayoutLoad/index.weapp.tsx +1 -1
- package/dist/components/base/LazyLoadImage/const.ts +1 -1
- package/dist/components/base/LazyLoadImage/index.h5.module.scss +24 -20
- package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
- package/dist/components/base/MobileCommonHeader/index.module.scss +17 -0
- package/dist/components/base/MobileCommonHeader/index.tsx +1 -0
- package/dist/components/base/NetworkDataError/const.ts +1 -1
- package/dist/components/base/NetworkDataError/index.module.scss +125 -69
- package/dist/components/base/NetworkDataError/index.tsx +1 -1
- package/dist/components/base/Price/Base/index.module.scss +12 -0
- package/dist/components/base/Price/Base/index.tsx +1 -1
- package/dist/components/base/Price/Double/index.module.scss +32 -0
- package/dist/components/base/Price/Double/index.tsx +1 -1
- package/dist/components/base/Price/index.tsx +1 -1
- package/dist/components/base/Skeleton/index.tsx +1 -1
- package/dist/components/debug/DebugLayout/index.module.scss +67 -0
- package/dist/components/debug/DebugLayout/index.tsx +1 -0
- package/dist/components/debug/DebugLayout/utils.ts +1 -0
- package/dist/components/decorate/DecorateFloorModule/index.module.scss +32 -2
- package/dist/components/decorate/DecorateFloorModule/index.tsx +1 -1
- package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
- package/dist/components/decorate/PlaceHolder/index.tsx +1 -1
- package/dist/components/floorItem.jd.tsx +1 -1
- package/dist/components/floorItem.tsx +1 -1
- package/dist/components/floorItem.weapp.tsx +1 -1
- package/dist/components/isv/Floor/index.tsx +1 -1
- package/dist/components/remoteFloorItem.tsx +1 -0
- package/dist/interface/common.ts +1 -1
- package/dist/interface/component.ts +1 -1
- package/dist/interface/jumpEventReport.ts +1 -1
- package/dist/interface/service.ts +1 -1
- package/dist/interface/utils.ts +1 -1
- package/dist/jumpEventReport/base.ts +1 -1
- package/dist/jumpEventReport/const.ts +1 -1
- package/dist/jumpEventReport/createReportFloorData.ts +1 -1
- package/dist/jumpEventReport/index.h5.ts +1 -1
- package/dist/jumpEventReport/index.jd.ts +1 -1
- package/dist/jumpEventReport/index.ts +1 -1
- package/dist/jumpEventReport/index.weapp.ts +1 -1
- package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
- package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
- package/dist/jumpEventReport/logEventConfig.ts +1 -1
- package/dist/jumpEventReport/web/report.ts +1 -1
- package/dist/jumpEventReport/web.base.ts +1 -1
- package/dist/jumpEventReport/web.jd.ts +1 -1
- package/dist/jumpEventReport/web.jdb.ts +1 -1
- package/dist/jumpEventReport/web.jdjch.ts +1 -0
- package/dist/jumpEventReport/web.jxwxapp.ts +1 -0
- package/dist/jumpEventReport/web.pc.ts +1 -0
- package/dist/jumpEventReport/web.tjapp.ts +1 -0
- package/dist/jumpEventReport/web.tjm.ts +1 -0
- package/dist/jumpEventReport/web.wxapp.ts +1 -1
- package/dist/language/en_US.json +178 -0
- package/dist/language/zh_CN.json +178 -0
- package/dist/language/zh_HK.json +178 -0
- package/dist/libs/taroAppReport.js +2 -2
- package/dist/modules/ContainerFloorList/index.h5.module.scss +66 -27
- package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
- package/dist/modules/ContainerFloorList/index.tsx +1 -1
- package/dist/open/api/device.ts +1 -1
- package/dist/open/api/environment.ts +1 -1
- package/dist/open/api/index.ts +1 -1
- package/dist/open/api/jump/business.ts +1 -0
- package/dist/open/api/jump/index.ts +1 -0
- package/dist/open/api/jump/minPath.ts +1 -0
- package/dist/open/api/jump/side.ts +1 -0
- package/dist/open/api/jump/webUrl.ts +1 -0
- package/dist/open/api/jump copy.ts +1 -0
- package/dist/open/api/request.ts +1 -1
- package/dist/open/api/shopMember.ts +1 -1
- package/dist/open/api/track.ts +1 -1
- package/dist/open/api/util.ts +1 -1
- package/dist/open/components/index.ts +1 -1
- package/dist/sass/app.h5.scss +289 -212
- package/dist/sass/base.scss +195 -137
- package/dist/service/bMallConst.ts +1 -1
- package/dist/service/fetchGateway.ts +1 -1
- package/dist/service/fetchGateway.weapp.ts +1 -0
- package/dist/service/http/colorSign.ts +1 -1
- package/dist/service/http/const.ts +1 -1
- package/dist/service/http/h5Http.ts +1 -0
- package/dist/service/http/index.h5.ts +1 -0
- package/dist/service/requestServer.h5.ts +1 -0
- package/dist/service/requestServer.ts +1 -1
- package/dist/service/requestServer.weapp.ts +1 -0
- package/dist/utils/connectNativeJsBridge.ts +1 -1
- package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
- package/dist/utils/draExceptionAndProfile.ts +1 -1
- package/dist/utils/h5Utils.ts +1 -1
- package/dist/utils/index.h5.ts +1 -1
- package/dist/utils/index.ts +1 -1
- package/dist/utils/index.weapp.ts +1 -1
- package/dist/utils/intersectionObserver.ts +1 -1
- package/dist/utils/jm-common.js +1 -1
- package/dist/utils/jumpExtMapUtil.h5.ts +1 -0
- package/dist/utils/jumpExtMapUtil.ts +1 -0
- package/dist/utils/sColor.js +1 -0
- package/dist/utils/sgmCodeUtils.ts +1 -0
- package/dist/utils/taroRenderUtil.ts +1 -0
- package/dist/utils/utils.ts +1 -1
- package/dist/wxapp/api/helper.js +1 -0
- package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
- package/dist/wxapp/common/user_info.js +1 -1
- package/dist/wxapp/components/launch-app/index.js +1 -0
- package/dist/wxapp/components/launch-app/index.json +5 -0
- package/dist/wxapp/components/launch-app/index.wxml +0 -0
- package/dist/wxapp/components/launch-app/index.wxss +0 -0
- package/dist/wxapp/components/subscribe-guider/helper.js +1 -0
- package/dist/wxapp/components/subscribe-guider/index.js +1 -0
- package/dist/wxapp/components/subscribe-guider/index.json +5 -0
- package/dist/wxapp/components/subscribe-guider/index.wxml +0 -0
- package/dist/wxapp/components/subscribe-guider/index.wxss +0 -0
- package/package.json +148 -115
- package/dist/components/base/Skeleton/old.tsx +0 -1
- package/dist/customHooks/useDocumentVisibilitychange.ts +0 -1
- package/dist/open/api/jump.ts +0 -1
- package/dist/utils/memberFormatUtils.js +0 -1
- /package/dist/service/{bMallConst.wxapp.ts → bMallConst.weapp.ts} +0 -0
- /package/dist/service/http/{colorSign.wxapp.ts → colorSign.weapp.ts} +0 -0
package/dist/utils/utils.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import Taro from '@tarojs/taro'
|
|
2
1
|
if(!imgUrl.includes('360buyimg.com')){
|
|
3
2
|
imgUrl = '//m.360buyimg.com/cms/' + imgUrl
|
|
4
3
|
}
|
|
5
4
|
pin?: string
|
|
6
5
|
visitkey?: string
|
|
7
6
|
[key: string]: any
|
|
8
7
|
}
|
|
9
8
|
jdpin,
|
|
10
9
|
pinStatus,
|
|
11
10
|
visitkey,
|
|
12
11
|
unionid,
|
|
13
12
|
skey,
|
|
14
13
|
__jda,
|
|
15
14
|
__jdv,
|
|
16
15
|
__wga,
|
|
17
16
|
wxapp_type
|
|
18
17
|
} = cookie
|
|
19
18
|
const getUserCookieObj = {}
|
|
20
19
|
jdpin,
|
|
21
20
|
pinStatus,
|
|
22
21
|
visitkey,
|
|
23
22
|
unionid,
|
|
24
23
|
skey,
|
|
25
24
|
__jda,
|
|
26
25
|
__jdv,
|
|
27
26
|
__wga,
|
|
28
27
|
wid,
|
|
29
28
|
wq_skey,
|
|
30
29
|
wq_uin,
|
|
31
30
|
wq_auth_token,
|
|
32
31
|
wxapp_scene,
|
|
33
32
|
wq_unionid,
|
|
34
33
|
wxapp_openid,
|
|
35
34
|
wxapp_version,
|
|
36
35
|
wxapp_type
|
|
37
36
|
name = name === 'jdpin' ? 'pin' : name;
|
|
38
37
|
name === 'pin' && (ret.push(`pt_pin=${encodeURIComponent(value)}`))
|
|
39
38
|
ret.push(`${name}=${encodeURIComponent(value)}`)
|
|
40
39
|
getUserCookieObj[name] = value
|
|
41
40
|
}
|
|
42
41
|
wqCookie: getUserCookieObj
|
|
43
42
|
exceptionReportFn
|
|
44
43
|
exceptionReportFn(
|
|
45
44
|
`店铺首页isv h5楼层隐藏不显示。原因:modularPackResult数据不完备。页面类型-buildType: ${buildType}。楼层顺序-floorIdx: ${floorData?.floorIdx}`,
|
|
46
45
|
)
|
|
47
46
|
const isIsvContainer = (containerId, floorListData, containerListData) => {
|
|
48
47
|
const objContainer = containerListData.find(item => item.containerId === containerId)
|
|
49
48
|
(itemUid) => {
|
|
50
49
|
const objectFloor = floorListData.find(floorItem => itemUid === floorItem.uid)
|
|
51
50
|
return RemoteLoadFloorList.includes(objectFloor?.floorExtInfo?.moduleFlag)
|
|
52
51
|
}
|
|
53
52
|
)?? false
|
|
54
53
|
isMemberPage,
|
|
55
54
|
sgmCustomReport
|
|
55
|
+
import Taro from '@tarojs/taro';
|
|
56
56
|
SHOP_MENU_ID_TYPE,
|
|
57
57
|
SHOP_MENU_ID_QUERY_NAME,
|
|
58
58
|
SECTION_HOME_TAB_TYPE,
|
|
59
59
|
SECTION_HOME_TAB_NAME_TYPE,
|
|
60
60
|
SECTION_HOME_TAB_QUERY_TYPE,
|
|
61
61
|
SECTION_HOME_CUSTOM_TAB_TYPE_ARRAY,
|
|
62
62
|
CHANNEL_TYPE,
|
|
63
63
|
JDShopViewBusinessPathType,
|
|
64
64
|
FloorModuleType,
|
|
65
65
|
RemoteLoadFloorList,
|
|
66
66
|
FLOOR_KIND,
|
|
67
67
|
getBundleUrl,
|
|
68
68
|
getBundleFileName,
|
|
69
69
|
formatPackResult,
|
|
70
70
|
getTaroVersion,
|
|
71
71
|
/ipad/i.test(system) || (/android/i.test(system) && !/mobi|mini|fennec/i.test(system));
|
|
72
72
|
key: string,
|
|
73
73
|
value: string | object,
|
|
74
74
|
successBack?: any,
|
|
75
75
|
failBack?: any,
|
|
76
76
|
try {
|
|
77
77
|
if (isH5 && window && !window.localStorage) {
|
|
78
78
|
console.log(`setTaroStorage key:${key} window.localStorage不存在:`);
|
|
79
79
|
return Promise.resolve(null);
|
|
80
80
|
}
|
|
81
81
|
return Taro.setStorage({
|
|
82
82
|
key: key,
|
|
83
83
|
data: value,
|
|
84
84
|
success: successBack,
|
|
85
85
|
fail: failBack,
|
|
86
86
|
}).catch((e) => {
|
|
87
87
|
console.log(`setTaroStorage key:${key} 报错:`, e);
|
|
88
88
|
return null;
|
|
89
89
|
});
|
|
90
90
|
} catch (e) {
|
|
91
91
|
console.log(`setTaroStorage key:${key} 报错:`, e);
|
|
92
92
|
return Promise.resolve(null);
|
|
93
93
|
}
|
|
94
94
|
try {
|
|
95
95
|
if (isH5 && window && !window.localStorage) {
|
|
96
96
|
console.log(`getTaroStorageKeyValue key:${key} window.localStorage不存在:`);
|
|
97
97
|
return Promise.resolve(null);
|
|
98
98
|
}
|
|
99
99
|
return Taro.getStorageSync(key);
|
|
100
100
|
} catch (e) {
|
|
101
101
|
console.log(`getTaroStorageKeyValue key:${key} 报错:`, e);
|
|
102
102
|
return null;
|
|
103
103
|
}
|
|
104
104
|
try {
|
|
105
105
|
if (isH5 && window && !window.localStorage) {
|
|
106
106
|
console.log(`removeTaroStorageKey key:${key} window.localStorage不存在:`);
|
|
107
107
|
return Promise.resolve(null);
|
|
108
108
|
}
|
|
109
109
|
return Taro.removeStorage({
|
|
110
110
|
key: key,
|
|
111
111
|
}).catch((e) => {
|
|
112
112
|
console.log(`removeTaroStorageKey key:${key} 报错:`, e);
|
|
113
113
|
});
|
|
114
114
|
} catch (e) {
|
|
115
115
|
console.log(`removeTaroStorageKey key:${key} 报错:`, e);
|
|
116
116
|
}
|
|
117
117
|
try {
|
|
118
118
|
if (isH5 && window && !window.localStorage) {
|
|
119
119
|
console.log(`clearTaroStorageKey window.localStorage不存在`);
|
|
120
120
|
return Promise.resolve(null);
|
|
121
121
|
}
|
|
122
122
|
return Taro.clearStorage().catch((e) => {
|
|
123
123
|
console.log('clearTaroStorageKey报错:', e);
|
|
124
124
|
});
|
|
125
125
|
} catch (e) {
|
|
126
126
|
console.log('clearTaroStorageKey报错:', e);
|
|
127
127
|
}
|
|
128
128
|
let hasChecked = false;
|
|
129
129
|
if (isH5) {
|
|
130
130
|
const avifCache = getTaroStorageKeyValue(KEY_AVIF);
|
|
131
131
|
if (avifCache === null || avifCache === '' || forceUpdate) {
|
|
132
132
|
hasChecked = true;
|
|
133
133
|
const img = new Image();
|
|
134
134
|
img.onload = function () {
|
|
135
135
|
if (img.height > 0 && img.width > 0) {
|
|
136
136
|
setTaroStorage(KEY_AVIF, '1');
|
|
137
137
|
} else {
|
|
138
138
|
setTaroStorage(KEY_AVIF, '0');
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
141
|
img.onerror = () => {
|
|
142
142
|
setTaroStorage(KEY_AVIF, '0');
|
|
143
143
|
};
|
|
144
144
|
img.src =
|
|
145
145
|
'data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=';
|
|
146
146
|
}
|
|
147
147
|
const webpCache = getTaroStorageKeyValue(KEY_WEBP);
|
|
148
148
|
if (webpCache === null || webpCache === '' || forceUpdate) {
|
|
149
149
|
hasChecked = true;
|
|
150
150
|
const img = new Image();
|
|
151
151
|
img.onload = function () {
|
|
152
152
|
if (img.height > 0 && img.width > 0) {
|
|
153
153
|
setTaroStorage(KEY_WEBP, '1');
|
|
154
154
|
} else {
|
|
155
155
|
setTaroStorage(KEY_WEBP, '0');
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
158
|
img.onerror = () => {
|
|
159
159
|
setTaroStorage(KEY_WEBP, '0');
|
|
160
160
|
};
|
|
161
161
|
img.src =
|
|
162
162
|
'data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAUAmJaQAA3AA/vz0AAA=';
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
return hasChecked;
|
|
166
166
|
const hasChecked = imageFormatSupport(false);
|
|
167
167
|
if (!hasChecked) {
|
|
168
168
|
setTimeout(imageFormatSupport, 5000);
|
|
169
169
|
}
|
|
170
170
|
const resultList: Array<any> = [],
|
|
171
171
|
arrLen = arr.length;
|
|
172
172
|
if (arrLen) {
|
|
173
173
|
if (arrLen > size) {
|
|
174
174
|
for (let i = 0; i < arrLen; i = i + size) {
|
|
175
175
|
resultList.push(arr.slice(i, i + size));
|
|
176
176
|
}
|
|
177
177
|
} else {
|
|
178
178
|
resultList.push(arr);
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
return resultList;
|
|
182
182
|
let _address = ids;
|
|
183
183
|
const _areaAreaSplit = ids.split('.');
|
|
184
184
|
const _areaAreaSplit2 = ids.split('_');
|
|
185
185
|
_address = _areaAreaSplit.length === 2 ? _areaAreaSplit[0] : _address;
|
|
186
186
|
_address = _areaAreaSplit2.length === 3 ? `${_areaAreaSplit2}_0` : _address;
|
|
187
187
|
return _address;
|
|
188
188
|
let paramStr = '';
|
|
189
189
|
obj &&
|
|
190
190
|
Object.keys(obj).forEach((key, index) => {
|
|
191
191
|
const getValue = `${obj[key]}`.replace(/undefined/, '').replace(/null/, '');
|
|
192
192
|
paramStr += `${index === 0 ? '' : '&'}${key}=${encodeURIComponent(getValue)}`;
|
|
193
193
|
});
|
|
194
194
|
return paramStr;
|
|
195
195
|
const result = {};
|
|
196
196
|
if (
|
|
197
197
|
!urlOrQueryStr ||
|
|
198
198
|
('string' !== typeof urlOrQueryStr && String !== urlOrQueryStr.constructor)
|
|
199
199
|
) {
|
|
200
200
|
return result;
|
|
201
201
|
}
|
|
202
202
|
if (urlOrQueryStr.indexOf('?') > -1) {
|
|
203
203
|
const queryStr = urlOrQueryStr.split('?');
|
|
204
204
|
const queryItemList = queryStr && queryStr.length > 1 ? queryStr[1].split('&') : [];
|
|
205
205
|
const queryItemListLen = queryItemList.length;
|
|
206
206
|
queryItemListLen > 0 &&
|
|
207
207
|
queryItemList.forEach((item) => {
|
|
208
208
|
const thisItemList = item.split('=');
|
|
209
209
|
result[thisItemList[0]] = thisItemList[1];
|
|
210
210
|
});
|
|
211
211
|
} else {
|
|
212
212
|
const queryItemList =
|
|
213
213
|
urlOrQueryStr.indexOf('&') > -1 ? urlOrQueryStr.split('&') : [urlOrQueryStr];
|
|
214
214
|
const queryItemListLen = queryItemList.length;
|
|
215
215
|
queryItemListLen > 0 &&
|
|
216
216
|
queryItemList.forEach((item) => {
|
|
217
217
|
const thisItemList = item.split('=');
|
|
218
218
|
result[thisItemList[0]] = thisItemList[1];
|
|
219
219
|
});
|
|
220
220
|
}
|
|
221
221
|
return result;
|
|
222
222
|
url: string,
|
|
223
223
|
size?: {
|
|
224
224
|
w: number;
|
|
225
225
|
h: number;
|
|
226
226
|
},
|
|
227
227
|
quality?: number,
|
|
228
228
|
if (url && size) {
|
|
229
229
|
const _w = Math.floor(size.w);
|
|
230
230
|
const _h = Math.floor(size.h);
|
|
231
231
|
if (url.match(/gif$/i)) {
|
|
232
232
|
return url;
|
|
233
233
|
} else {
|
|
234
234
|
if (_w > 0 && _h > 0) {
|
|
235
235
|
url = url.replace('jfs/', `s${_w}x${_h}_jfs/`);
|
|
236
236
|
}
|
|
237
237
|
url += quality != null ? `!q${quality}.dpg` : '.dpg';
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
return url;
|
|
241
241
|
if (url.match(/\.(jpg|png|dpg)$/i)) {
|
|
242
242
|
const { width, height, quality } = jfsImgInfo;
|
|
243
243
|
if (typeof width === 'number' || typeof height === 'number') {
|
|
244
244
|
url = url.replace('/jfs/', `/s${Math.floor(width || 0)}x${Math.floor(height || 0)}_jfs/`);
|
|
245
245
|
}
|
|
246
246
|
if (typeof quality === 'number' && quality > 0 && quality < 100 && url.match(/\.jpg$/i)) {
|
|
247
247
|
url += `!q${quality}.dpg`;
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
return addHttps(url);
|
|
251
251
|
if (imgUrl) {
|
|
252
252
|
if (
|
|
253
253
|
!imgUrl.match(
|
|
254
254
|
/(storage\.360buyimg\.com)|(jdcloud-oss\.com)|(imgcps\.jd\.com)|((\w+)\.300hu\.com)|(thirdwx\.qlogo\.cn)|(!q)|gif|dpg$/i,
|
|
255
255
|
)
|
|
256
256
|
) {
|
|
257
257
|
if (!imgUrl.includes('360buyimg.com')) {
|
|
258
258
|
imgUrl = '//m.360buyimg.com/cms/' + imgUrl;
|
|
259
259
|
}
|
|
260
260
|
if (quality != 100) imgUrl += /\.png/.test(imgUrl) ? '.dpg' : `!q${quality}`;
|
|
261
261
|
}
|
|
262
262
|
imgUrl = imgUrl.match(/^\/\//) ? `https:${imgUrl}` : imgUrl;
|
|
263
263
|
}
|
|
264
264
|
return imgUrl;
|
|
265
265
|
const result = value % step;
|
|
266
266
|
return result === 0 ? value : Math.ceil(value / step) * step;
|
|
267
267
|
const MAX = 3.5;
|
|
268
268
|
return Math.min(window?.devicePixelRatio ?? 2, MAX);
|
|
269
269
|
isSkuImage: boolean;
|
|
270
270
|
size: number;
|
|
271
271
|
imgUrl: string,
|
|
272
272
|
options: QualityOptions,
|
|
273
273
|
isIgnoreOptimizeFromServer: boolean = false,
|
|
274
274
|
if (!imgUrl) {
|
|
275
275
|
console.error('The input parameter imageUrl for the getQualityImage() cannot be empty!');
|
|
276
276
|
return imgUrl;
|
|
277
277
|
}
|
|
278
278
|
if (isIgnoreOptimizeFromServer) {
|
|
279
279
|
imgUrl = imgUrl.replace(/\.(jpe?g|png).*/, '.$1');
|
|
280
280
|
}
|
|
281
281
|
if (!/^((https?):)?\/\//.test(imgUrl)) {
|
|
282
282
|
imgUrl = '//m.360buyimg.com/cms/' + imgUrl;
|
|
283
283
|
}
|
|
284
284
|
const imgServerRegExp = /(img|m)\d{0,2}\.360buyimg\.com\/.*\.(jpe?g|png)/i;
|
|
285
285
|
if (!imgServerRegExp.test(imgUrl)) {
|
|
286
286
|
return imgUrl;
|
|
287
287
|
}
|
|
288
288
|
imgUrl = /^\/\//.test(imgUrl) ? `https:${imgUrl}` : imgUrl;
|
|
289
289
|
const { isSkuImage, size } = options || {};
|
|
290
290
|
const needReduceSize = isSkuImage && size;
|
|
291
291
|
if (needReduceSize) {
|
|
292
292
|
const devicePixelRatio = getDevicePixelRatio();
|
|
293
293
|
const useWidth = getValueByStep(size * devicePixelRatio, 40);
|
|
294
294
|
imgUrl = imgUrl.replace(/\/[^\/]*jfs\//, `/s${useWidth}x${useWidth}_jfs/`);
|
|
295
295
|
}
|
|
296
296
|
const needCompress = !global?.info?.pageInfo?.isVipShop;
|
|
297
297
|
const result = imgUrl.match(/\/\w+\.(jpe?g|png)$/);
|
|
298
298
|
if (needCompress && result) {
|
|
299
299
|
if (getAvifSupport() === '1') {
|
|
300
300
|
imgUrl += '.avif';
|
|
301
301
|
} else if (getWebpSupport() === '1') {
|
|
302
302
|
imgUrl += '.webp';
|
|
303
303
|
} else if (/jpe?g/.test(result[1])) {
|
|
304
304
|
imgUrl += '!q80';
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
if (needReduceSize) {
|
|
308
308
|
imgUrl += '!z2';
|
|
309
309
|
}
|
|
310
310
|
return imgUrl;
|
|
311
311
|
if (imgUrl) {
|
|
312
312
|
if (
|
|
313
313
|
!imgUrl.match(
|
|
314
314
|
/(storage\.360buyimg\.com)|(jdcloud-oss\.com)|((\w+)\.300hu\.com)|(thirdwx\.qlogo\.cn)|(!q)|gif|dpg$/i,
|
|
315
315
|
)
|
|
316
316
|
) {
|
|
317
317
|
if (!imgUrl.includes('360buyimg.com')) {
|
|
318
318
|
imgUrl = '//m.360buyimg.com/cms/' + imgUrl;
|
|
319
319
|
}
|
|
320
320
|
if (quality != 100) imgUrl += /\.png/.test(imgUrl) ? '.dpg' : `!q${quality}`;
|
|
321
321
|
}
|
|
322
322
|
imgUrl = imgUrl.match(/^\/\//) ? `https:${imgUrl}` : imgUrl;
|
|
323
323
|
}
|
|
324
324
|
return imgUrl;
|
|
325
325
|
return getTaroStorageKeyValue(KEY_AVIF) || '0';
|
|
326
326
|
return getTaroStorageKeyValue(KEY_WEBP) || '0';
|
|
327
327
|
count: number,
|
|
328
328
|
fixedNum = 1,
|
|
329
329
|
unit = '万',
|
|
330
330
|
maxNum = 10000,
|
|
331
331
|
count = Number(count);
|
|
332
332
|
const getMaxNum = count > 100000000 ? 100000000 : maxNum;
|
|
333
333
|
const getUnit = count > 100000000 ? '亿' : unit;
|
|
334
334
|
if (count >= getMaxNum) {
|
|
335
335
|
return (count / getMaxNum).toFixed(fixedNum) + getUnit;
|
|
336
336
|
}
|
|
337
337
|
return count;
|
|
338
338
|
const systemInfo: UtilsInterFace.taroGetSystemInfoSyncRes = getSystemInfo || {
|
|
339
339
|
platform: '',
|
|
340
340
|
model: '',
|
|
341
341
|
system: '',
|
|
342
342
|
};
|
|
343
343
|
const isIOS = !!systemInfo.system.match(/ios/i);
|
|
344
344
|
const isAndroid = !!systemInfo.system.match(/android/i);
|
|
345
345
|
if (!systemInfo.statusBarHeight) {
|
|
346
346
|
systemInfo.statusBarHeight = screenHeight - windowHeight - 20;
|
|
347
347
|
systemInfo.navBarExtendHeight = 0;
|
|
348
348
|
} else {
|
|
349
349
|
if (isIOS) {
|
|
350
350
|
systemInfo.navBarExtendHeight = 4;
|
|
351
351
|
} else {
|
|
352
352
|
systemInfo.navBarExtendHeight = 0;
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
let rect = Taro.getMenuButtonBoundingClientRect ? Taro.getMenuButtonBoundingClientRect() : null;
|
|
356
356
|
if (!rect || !rect.width || !rect.top || !rect.left || !rect.height) {
|
|
357
357
|
let gap = 0;
|
|
358
358
|
let width = 96;
|
|
359
359
|
if (systemInfo.platform === 'android') {
|
|
360
360
|
gap = 8;
|
|
361
361
|
width = 96;
|
|
362
362
|
} else if (systemInfo.platform === 'devtools') {
|
|
363
363
|
if (isIOS) {
|
|
364
364
|
gap = 5.5;
|
|
365
365
|
} else {
|
|
366
366
|
gap = 7.5;
|
|
367
367
|
}
|
|
368
368
|
} else {
|
|
369
369
|
gap = 4;
|
|
370
370
|
width = 88;
|
|
371
371
|
}
|
|
372
372
|
rect = {
|
|
373
373
|
bottom: systemInfo.statusBarHeight + gap + 32,
|
|
374
374
|
height: 32,
|
|
375
375
|
left: systemInfo.windowWidth - width - 10,
|
|
376
376
|
right: systemInfo.windowWidth - 10,
|
|
377
377
|
top: systemInfo.statusBarHeight + gap,
|
|
378
378
|
width,
|
|
379
379
|
};
|
|
380
380
|
}
|
|
381
381
|
const gap = rect.top - systemInfo.statusBarHeight;
|
|
382
382
|
systemInfo.navBarTopToStatusBar = gap;
|
|
383
383
|
systemInfo.navBarHeight = 2 * gap + rect.height;
|
|
384
384
|
systemInfo.capsulePosition = rect;
|
|
385
385
|
systemInfo.isIOS = isIOS;
|
|
386
386
|
systemInfo.isAndroid = isAndroid;
|
|
387
387
|
return systemInfo;
|
|
388
388
|
if (str.match(/^\/\//)) {
|
|
389
389
|
str = 'https:' + str;
|
|
390
390
|
}
|
|
391
391
|
return str;
|
|
392
392
|
dateTimeOrdate: Date | string | number | null,
|
|
393
393
|
format = 'yyyy-MM-dd HH:mm:ss',
|
|
394
394
|
noPadStart = {
|
|
395
395
|
M: '0',
|
|
396
396
|
d: '0',
|
|
397
397
|
H: '0',
|
|
398
398
|
m: '0',
|
|
399
399
|
s: '0',
|
|
400
400
|
},
|
|
401
401
|
let dateResult = '';
|
|
402
402
|
const padStarts = Object.assign(
|
|
403
403
|
{
|
|
404
404
|
M: '0',
|
|
405
405
|
d: '0',
|
|
406
406
|
H: '0',
|
|
407
407
|
m: '0',
|
|
408
408
|
s: '0',
|
|
409
409
|
},
|
|
410
410
|
noPadStart,
|
|
411
411
|
);
|
|
412
412
|
if (dateTimeOrdate) {
|
|
413
413
|
let changeDateTimeOrdate = dateTimeOrdate;
|
|
414
414
|
const getChangeDateTimeToNumber = Number(changeDateTimeOrdate);
|
|
415
415
|
if (getChangeDateTimeToNumber) {
|
|
416
416
|
changeDateTimeOrdate = getChangeDateTimeToNumber;
|
|
417
417
|
} else {
|
|
418
418
|
changeDateTimeOrdate = `${changeDateTimeOrdate}`.replace(/-/g, '/').replace(/\./g, '/');
|
|
419
419
|
}
|
|
420
420
|
const nowDate =
|
|
421
421
|
dateTimeOrdate instanceof Date ? dateTimeOrdate : new Date(changeDateTimeOrdate);
|
|
422
422
|
const dateMap = {
|
|
423
423
|
y: `${nowDate.getFullYear()}`,
|
|
424
424
|
M: `${nowDate.getMonth() + 1}`.padStart(2, padStarts['M']),
|
|
425
425
|
d: `${nowDate.getDate()}`.padStart(2, padStarts['d']),
|
|
426
426
|
H: `${nowDate.getHours()}`.padStart(2, padStarts['H']),
|
|
427
427
|
m: `${nowDate.getMinutes()}`.padStart(2, padStarts['m']),
|
|
428
428
|
s: `${nowDate.getSeconds()}`.padStart(2, padStarts['s']),
|
|
429
429
|
};
|
|
430
430
|
const regDate = new RegExp('y+|M+|d+|H+|m+|s+', 'g');
|
|
431
431
|
const regYear = new RegExp('y');
|
|
432
432
|
dateResult = format.replace(regDate, (v) => {
|
|
433
433
|
let changeValue = v;
|
|
434
434
|
if (regYear.test(changeValue)) {
|
|
435
435
|
const thisYear = dateMap.y;
|
|
436
436
|
const subValueLen = 4 - changeValue.length;
|
|
437
437
|
changeValue = thisYear.substr(subValueLen);
|
|
438
438
|
} else {
|
|
439
439
|
const dateKey = v.substr(0, 1);
|
|
440
440
|
changeValue = dateMap[dateKey];
|
|
441
441
|
}
|
|
442
442
|
return changeValue;
|
|
443
443
|
});
|
|
444
444
|
}
|
|
445
445
|
return dateResult;
|
|
446
446
|
let timer: any = null;
|
|
447
447
|
let startTime = Date.now();
|
|
448
448
|
return function () {
|
|
449
449
|
const curTime = Date.now();
|
|
450
450
|
const remaining = delay - (curTime - startTime);
|
|
451
451
|
const context = this;
|
|
452
452
|
const args = arguments;
|
|
453
453
|
clearTimeout(timer);
|
|
454
454
|
if (remaining <= 0) {
|
|
455
455
|
func.apply(context, args);
|
|
456
456
|
startTime = Date.now();
|
|
457
457
|
} else {
|
|
458
458
|
timer = setTimeout(func, remaining);
|
|
459
459
|
}
|
|
460
460
|
};
|
|
461
461
|
let context, args, result;
|
|
462
462
|
let timeout = null;
|
|
463
463
|
let previous = 0;
|
|
464
464
|
if (!options) options = {};
|
|
465
465
|
const later = function () {
|
|
466
466
|
previous = options.leading === false ? 0 : Date.now();
|
|
467
467
|
timeout = null;
|
|
468
468
|
result = func.apply(context, args);
|
|
469
469
|
if (!timeout) context = args = null;
|
|
470
470
|
};
|
|
471
471
|
return function () {
|
|
472
472
|
const now = Date.now();
|
|
473
473
|
if (!previous && options.leading === false) previous = now;
|
|
474
474
|
const remaining = wait - (now - previous);
|
|
475
475
|
context = this;
|
|
476
476
|
args = arguments;
|
|
477
477
|
if (remaining <= 0 || remaining > wait) {
|
|
478
478
|
if (timeout) {
|
|
479
479
|
clearTimeout(timeout);
|
|
480
480
|
timeout = null;
|
|
481
481
|
}
|
|
482
482
|
previous = now;
|
|
483
483
|
result = func.apply(context, args);
|
|
484
484
|
if (!timeout) context = args = null;
|
|
485
485
|
} else if (!timeout && options.trailing !== false) {
|
|
486
486
|
timeout = setTimeout(later, remaining);
|
|
487
487
|
}
|
|
488
488
|
return result;
|
|
489
489
|
};
|
|
490
490
|
let timer: any = null;
|
|
491
491
|
return function () {
|
|
492
492
|
const context: any = this;
|
|
493
493
|
const args = arguments;
|
|
494
494
|
timer && clearTimeout(timer);
|
|
495
495
|
timer = setTimeout(function () {
|
|
496
496
|
fn.apply(context, args);
|
|
497
497
|
}, delay);
|
|
498
498
|
};
|
|
499
499
|
if (txt) {
|
|
500
500
|
txt = txt.trim();
|
|
501
501
|
const reg = new RegExp(/[\d-]+/);
|
|
502
502
|
const res = reg.exec(txt);
|
|
503
503
|
if (res && res.length > 0) {
|
|
504
504
|
let tel = res[0];
|
|
505
505
|
if (tel && delSeparator) {
|
|
506
506
|
tel = tel.replace(/-/g, '');
|
|
507
507
|
}
|
|
508
508
|
return tel;
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
return '';
|
|
512
512
|
if (rgb) {
|
|
513
513
|
const reg = /^(rgb|RGB)/;
|
|
514
514
|
const color = rgb;
|
|
515
515
|
if (reg.test(color)) {
|
|
516
516
|
let strHex = '#';
|
|
517
517
|
const colorArr = color.replace(/(?:\(|\)|rgb|RGB)*/g, '').split(',');
|
|
518
518
|
for (let i = 0; i < colorArr.length; i++) {
|
|
519
519
|
let hex = Number(colorArr[i]).toString(16);
|
|
520
520
|
if (hex === '0') {
|
|
521
521
|
hex += hex;
|
|
522
522
|
}
|
|
523
523
|
strHex += hex;
|
|
524
524
|
}
|
|
525
525
|
return strHex;
|
|
526
526
|
} else {
|
|
527
527
|
return String(color);
|
|
528
528
|
}
|
|
529
529
|
} else {
|
|
530
530
|
return '';
|
|
531
531
|
}
|
|
532
532
|
if (hex) {
|
|
533
533
|
const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
|
|
534
534
|
let color = hex.toLowerCase();
|
|
535
535
|
if (reg.test(color)) {
|
|
536
536
|
if (color.length === 4) {
|
|
537
537
|
let colorNew = '#';
|
|
538
538
|
for (let i = 1; i < 4; i += 1) {
|
|
539
539
|
colorNew += color.slice(i, i + 1).concat(color.slice(i, i + 1));
|
|
540
540
|
}
|
|
541
541
|
color = colorNew;
|
|
542
542
|
}
|
|
543
543
|
const colorChange: number[] = [];
|
|
544
544
|
for (let i = 1; i < 7; i += 2) {
|
|
545
545
|
colorChange.push(parseInt('0x' + color.slice(i, i + 2)));
|
|
546
546
|
}
|
|
547
547
|
if (returnList) {
|
|
548
548
|
return colorChange;
|
|
549
549
|
} else {
|
|
550
550
|
return 'RGB(' + colorChange.join(',') + ')';
|
|
551
551
|
}
|
|
552
552
|
} else {
|
|
553
553
|
return color;
|
|
554
554
|
}
|
|
555
555
|
} else {
|
|
556
556
|
return '';
|
|
557
557
|
}
|
|
558
558
|
const c = m - n + 1;
|
|
559
559
|
const res = Math.floor(Math.random() * c + n);
|
|
560
560
|
if (filterNum && filterNum == res) {
|
|
561
561
|
console.log('随机数二次开始', res, filterNum);
|
|
562
562
|
return getRandom(n, m, filterNum);
|
|
563
563
|
} else {
|
|
564
564
|
return res;
|
|
565
565
|
}
|
|
566
566
|
wqCookieStr: string;
|
|
567
567
|
wqCookie: {
|
|
568
568
|
pin?: string;
|
|
569
569
|
visitkey?: string;
|
|
570
570
|
[key: string]: any;
|
|
571
571
|
};
|
|
572
572
|
|
|
573
573
|
const {
|
|
574
574
|
jdpin,
|
|
575
575
|
pinStatus,
|
|
576
576
|
visitkey,
|
|
577
577
|
unionid,
|
|
578
578
|
skey,
|
|
579
579
|
__jda,
|
|
580
580
|
__jdv,
|
|
581
581
|
__wga,
|
|
582
582
|
wid,
|
|
583
583
|
wq_skey,
|
|
584
584
|
wq_uin,
|
|
585
585
|
wq_auth_token,
|
|
586
586
|
wxapp_scene,
|
|
587
587
|
wq_unionid,
|
|
588
588
|
wxapp_openid,
|
|
589
589
|
wxapp_version,
|
|
590
590
|
wxapp_type,
|
|
591
591
|
appType,
|
|
592
592
|
lbs_addr,
|
|
593
593
|
} = cookie;
|
|
594
594
|
const ret: string[] = [];
|
|
595
595
|
const getUserCookieObj = {};
|
|
596
596
|
const createUseCookieArr = [
|
|
597
597
|
jdpin,
|
|
598
598
|
pinStatus,
|
|
599
599
|
visitkey,
|
|
600
600
|
unionid,
|
|
601
601
|
skey,
|
|
602
602
|
__jda,
|
|
603
603
|
__jdv,
|
|
604
604
|
__wga,
|
|
605
605
|
wid,
|
|
606
606
|
wq_skey,
|
|
607
607
|
wq_uin,
|
|
608
608
|
wq_auth_token,
|
|
609
609
|
wxapp_scene,
|
|
610
610
|
wq_unionid,
|
|
611
611
|
wxapp_openid,
|
|
612
612
|
wxapp_version,
|
|
613
613
|
wxapp_type,
|
|
614
614
|
appType,
|
|
615
615
|
lbs_addr,
|
|
616
616
|
];
|
|
617
617
|
|
|
618
618
|
createUseCookieArr.forEach((keyItem) => {
|
|
619
619
|
if (keyItem && keyItem['name']) {
|
|
620
620
|
let { name, value } = keyItem;
|
|
621
621
|
name = name === 'jdpin' ? 'pin' : name;
|
|
622
622
|
name === 'pin' && ret.push(`pt_pin=${encodeURIComponent(value)}`);
|
|
623
623
|
ret.push(`${name}=${encodeURIComponent(value)}`);
|
|
624
624
|
getUserCookieObj[name] = value;
|
|
625
625
|
}
|
|
626
626
|
});
|
|
627
627
|
return {
|
|
628
628
|
wqCookieStr: ret.join(';'),
|
|
629
629
|
wqCookie: getUserCookieObj,
|
|
630
630
|
};
|
|
631
631
|
const getLayoutWidth = layoutWidth || global.info?.sysInfo?.windowWidth || windowWidth;
|
|
632
632
|
const getNum = Number(num);
|
|
633
633
|
return Math.round((getNum / widthSize) * getLayoutWidth);
|
|
634
634
|
let checkState = false;
|
|
635
635
|
const couponFloorModuleType = floorData?.floorExtInfo?.moduleFlag;
|
|
636
636
|
if (couponFloorModuleType === FloorModuleType.COUPON) {
|
|
637
637
|
try {
|
|
638
638
|
const dataDefines = getFloorDataToDataDefines(floorData);
|
|
639
639
|
const couponDataDefine = dataDefines
|
|
640
640
|
? dataDefines.filter((item) => {
|
|
641
641
|
return item.type === 'coupon';
|
|
642
642
|
})
|
|
643
643
|
: [],
|
|
644
644
|
couponList = couponDataDefine[0]?.nodeText?.data ? couponDataDefine[0]?.nodeText?.data : [],
|
|
645
645
|
couponLength = couponList.length,
|
|
646
646
|
numShowPerLine = couponDataDefine[0]?.nodeText?.numShowPerLine
|
|
647
647
|
? couponDataDefine[0]?.nodeText?.numShowPerLine
|
|
648
648
|
: 0;
|
|
649
649
|
if (numShowPerLine === 0 && couponLength > 3) {
|
|
650
650
|
checkState = true;
|
|
651
651
|
}
|
|
652
652
|
} catch (e) {
|
|
653
653
|
checkState = false;
|
|
654
654
|
}
|
|
655
655
|
return checkState;
|
|
656
656
|
}
|
|
657
657
|
const {
|
|
658
658
|
containers = [],
|
|
659
659
|
floors = [],
|
|
660
660
|
clearFirstContaierMarginTop = false,
|
|
661
661
|
} = pageData;
|
|
662
662
|
console.log('dealShopContentData:', pageData, 'isvdev:', isvdev);
|
|
663
663
|
const getThisTimeKey = Date.now();
|
|
664
664
|
let shopContentContainerListData = containers?.filter(
|
|
665
665
|
(item) => (!isvdev && item.typeCode !== 'mShopHeader') || isvdev,
|
|
666
666
|
);
|
|
667
667
|
const shopContentFloorListData = floors?.filter(
|
|
668
668
|
({ floorPosition }) =>
|
|
669
669
|
(!isvdev && floorPosition !== 'header' && floorPosition !== 'footer') || isvdev,
|
|
670
670
|
);
|
|
671
671
|
const unableIsvContainerListData = getUnableIsvContainerListData(
|
|
672
672
|
shopContentFloorListData,
|
|
673
673
|
shopContentContainerListData,
|
|
674
674
|
exceptionReportFn,
|
|
675
675
|
);
|
|
676
676
|
shopContentContainerListData.forEach((item, index) => {
|
|
677
677
|
item.key = `${getThisTimeKey + index}`;
|
|
678
678
|
item.floors = [];
|
|
679
679
|
item.includeUids &&
|
|
680
680
|
item.includeUids.forEach((floorUid) => {
|
|
681
681
|
const getFloorData = shopContentFloorListData.find(
|
|
682
682
|
(floorItem) => floorItem.uid === floorUid,
|
|
683
683
|
);
|
|
684
684
|
if (getFloorData) {
|
|
685
685
|
const changeFloorData = {
|
|
686
686
|
containerId: item.containerId,
|
|
687
687
|
containerIndex: index,
|
|
688
688
|
...getFloorData,
|
|
689
689
|
};
|
|
690
690
|
const getCheckMoreCouponState = checkCouponAndChangeContainerSetData(getFloorData);
|
|
691
691
|
if (getCheckMoreCouponState) {
|
|
692
692
|
item.marginLeft && (item.marginLeft = 0);
|
|
693
693
|
item.marginRight && (item.marginRight = 0);
|
|
694
694
|
item.borderRadius && (item.borderRadius = 0);
|
|
695
695
|
}
|
|
696
696
|
if (getFloorData?.floorExtInfo?.floorLoadWay === 2) {
|
|
697
697
|
const getSysFloorToLoadTypeRes = isIsvFloorUseable(getFloorData, exceptionReportFn);
|
|
698
698
|
!getSysFloorToLoadTypeRes && (getFloorData.floorExtInfo.floorLoadWay = 1);
|
|
699
699
|
}
|
|
700
700
|
item.floors.push(changeFloorData);
|
|
701
701
|
}
|
|
702
702
|
});
|
|
703
703
|
if (
|
|
704
704
|
((!isvdev && index === 0) || (isvdev && index === 1)) &&
|
|
705
705
|
item?.containerPosition == 'content' &&
|
|
706
706
|
item?.marginBottom > 0 &&
|
|
707
707
|
!clearFirstContaierMarginTop
|
|
708
708
|
) {
|
|
709
709
|
item.marginTop = item.marginBottom;
|
|
710
710
|
}
|
|
711
711
|
});
|
|
712
712
|
shopContentContainerListData = shopContentContainerListData.filter(
|
|
713
713
|
(item) =>
|
|
714
714
|
item.floors.length > 0 &&
|
|
715
715
|
unableIsvContainerListData.every(
|
|
716
716
|
(containerItem) => containerItem.containerId != item.containerId,
|
|
717
717
|
),
|
|
718
718
|
);
|
|
719
719
|
console.log(
|
|
720
720
|
'dealShopContentData isWxMinAndWxapp:',
|
|
721
721
|
isWxMinAndWxapp,
|
|
722
722
|
'weappJumpToH5:',
|
|
723
723
|
pageData?.homeExtInfo?.weappJumpToH5,
|
|
724
724
|
);
|
|
725
725
|
if (isProd && isWxMinAndWxapp) {
|
|
726
726
|
shopContentContainerListData = shopContentContainerListData.filter(
|
|
727
727
|
(item) =>
|
|
728
728
|
item.floors.length > 0 &&
|
|
729
729
|
!isIsvContainer(item.containerId, shopContentFloorListData, shopContentContainerListData),
|
|
730
730
|
);
|
|
731
731
|
}
|
|
732
732
|
shopContentContainerListData = [].concat(shopContentContainerListData);
|
|
733
733
|
return {
|
|
734
734
|
shopContentContainerListData,
|
|
735
735
|
shopContentFloorListData,
|
|
736
736
|
};
|
|
737
737
|
const changeOpts = {
|
|
738
738
|
title: '',
|
|
739
739
|
icon: 'success',
|
|
740
740
|
duration: 1500,
|
|
741
741
|
mask: true,
|
|
742
742
|
...options,
|
|
743
743
|
};
|
|
744
744
|
if (changeOpts.title.length > 7) {
|
|
745
745
|
showNormalToast(options);
|
|
746
746
|
} else {
|
|
747
747
|
Taro.showToast(changeOpts as any);
|
|
748
748
|
}
|
|
749
749
|
const changeOpts = {
|
|
750
750
|
title: '',
|
|
751
751
|
icon: 'error',
|
|
752
752
|
duration: 1500,
|
|
753
753
|
mask: true,
|
|
754
754
|
...options,
|
|
755
755
|
};
|
|
756
756
|
if (changeOpts.title.length > 7) {
|
|
757
757
|
showNormalToast(options);
|
|
758
758
|
} else {
|
|
759
759
|
Taro.showToast(changeOpts as any);
|
|
760
760
|
}
|
|
761
761
|
Taro.showToast({
|
|
762
762
|
title: '',
|
|
763
763
|
icon: 'none',
|
|
764
764
|
duration: 1500,
|
|
765
765
|
mask: true,
|
|
766
766
|
...options,
|
|
767
767
|
});
|
|
768
768
|
return Taro.showLoading({
|
|
769
769
|
title: text,
|
|
770
770
|
});
|
|
771
771
|
return new Promise(() => {
|
|
772
772
|
Taro.nextTick(() => {
|
|
773
773
|
setTimeout(() => {
|
|
774
774
|
Taro.hideLoading(options);
|
|
775
775
|
}, 300);
|
|
776
776
|
});
|
|
777
777
|
});
|
|
778
778
|
return CHANNEL_TYPE[JDShopViewBusinessPathType.HOME];
|
|
779
779
|
const {
|
|
780
780
|
tabActive = SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_WELL_CHOSEN],
|
|
781
781
|
sceneId,
|
|
782
782
|
currentTabType,
|
|
783
783
|
} = query;
|
|
784
784
|
let changeTabActive = tabActive;
|
|
785
785
|
if (sceneId) {
|
|
786
786
|
if (isH5) {
|
|
787
787
|
if (sceneId == '1002') {
|
|
788
788
|
changeTabActive = SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_PRODUCT];
|
|
789
789
|
}
|
|
790
790
|
else if (sceneId == '1003') {
|
|
791
791
|
changeTabActive = SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_ACTIVITY];
|
|
792
792
|
}
|
|
793
793
|
} else if (isWxMinAndWxapp) {
|
|
794
794
|
if (sceneId == '1001' || sceneId == '1002') {
|
|
795
795
|
changeTabActive = SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_PRODUCT];
|
|
796
796
|
}
|
|
797
797
|
else if (sceneId == '1003') {
|
|
798
798
|
changeTabActive = SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_PROMOTION];
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
802
|
if (SECTION_HOME_TAB_QUERY_TYPE[changeTabActive]) {
|
|
803
803
|
if (
|
|
804
804
|
!isNaN(currentTabType) &&
|
|
805
805
|
SECTION_HOME_CUSTOM_TAB_TYPE_ARRAY.indexOf(currentTabType) !== -1
|
|
806
806
|
) {
|
|
807
807
|
return {
|
|
808
808
|
menuType: SHOP_MENU_ID_TYPE.HOME,
|
|
809
809
|
tabActiveType: currentTabType,
|
|
810
810
|
queryMenuTabActiveStr: `${SHOP_MENU_ID_TYPE.HOME}@${currentTabType}`,
|
|
811
811
|
};
|
|
812
812
|
}
|
|
813
813
|
return {
|
|
814
814
|
menuType: SHOP_MENU_ID_TYPE.HOME,
|
|
815
815
|
tabActiveType: SECTION_HOME_TAB_QUERY_TYPE[changeTabActive],
|
|
816
816
|
queryMenuTabActiveStr: `${SHOP_MENU_ID_TYPE.HOME}@${SECTION_HOME_TAB_QUERY_TYPE[changeTabActive]}`,
|
|
817
817
|
};
|
|
818
818
|
} else if (SHOP_MENU_ID_QUERY_NAME[changeTabActive]) {
|
|
819
819
|
return {
|
|
820
820
|
menuType: SHOP_MENU_ID_QUERY_NAME[changeTabActive],
|
|
821
821
|
tabActiveType: 0,
|
|
822
822
|
queryMenuTabActiveStr: `${SHOP_MENU_ID_QUERY_NAME[changeTabActive]}@0`,
|
|
823
823
|
};
|
|
824
824
|
} else {
|
|
825
825
|
const defaultMenuType = {
|
|
826
826
|
menuType: SHOP_MENU_ID_TYPE.HOME,
|
|
827
827
|
tabActiveType: SECTION_HOME_TAB_TYPE.HOME_WELL_CHOSEN,
|
|
828
828
|
queryMenuTabActiveStr: `${SHOP_MENU_ID_TYPE.HOME}@${SECTION_HOME_TAB_TYPE.HOME_WELL_CHOSEN}`,
|
|
829
829
|
};
|
|
830
830
|
const isCustomTab = tabActive.indexOf(SECTION_HOME_TAB_NAME_TYPE.HOME_CUSTOM) !== -1;
|
|
831
831
|
if (isCustomTab) {
|
|
832
832
|
const customTabType = Number(tabActive.split('-')[2]);
|
|
833
833
|
if (
|
|
834
834
|
!isNaN(customTabType) &&
|
|
835
835
|
SECTION_HOME_CUSTOM_TAB_TYPE_ARRAY.indexOf(customTabType) !== -1
|
|
836
836
|
) {
|
|
837
837
|
return {
|
|
838
838
|
menuType: SHOP_MENU_ID_TYPE.HOME,
|
|
839
839
|
tabActiveType: customTabType,
|
|
840
840
|
queryMenuTabActiveStr: `${SHOP_MENU_ID_TYPE.HOME}@${customTabType}`,
|
|
841
841
|
};
|
|
842
842
|
} else {
|
|
843
843
|
return defaultMenuType;
|
|
844
844
|
}
|
|
845
845
|
} else {
|
|
846
846
|
if (
|
|
847
847
|
!isNaN(currentTabType) &&
|
|
848
848
|
SECTION_HOME_CUSTOM_TAB_TYPE_ARRAY.indexOf(currentTabType) !== -1
|
|
849
849
|
) {
|
|
850
850
|
return {
|
|
851
851
|
menuType: SHOP_MENU_ID_TYPE.HOME,
|
|
852
852
|
tabActiveType: currentTabType,
|
|
853
853
|
queryMenuTabActiveStr: `${SHOP_MENU_ID_TYPE.HOME}@${currentTabType}`,
|
|
854
854
|
};
|
|
855
855
|
}
|
|
856
856
|
return defaultMenuType;
|
|
857
857
|
}
|
|
858
858
|
}
|
|
859
859
|
const deleteKeyList = [
|
|
860
860
|
'$taroTimestamp',
|
|
861
861
|
'cookie',
|
|
862
862
|
'wdref',
|
|
863
863
|
'navStart',
|
|
864
864
|
'originOpts',
|
|
865
865
|
'originParams',
|
|
866
866
|
'originUrl',
|
|
867
867
|
'referer',
|
|
868
868
|
'stamp',
|
|
869
869
|
'hybrid',
|
|
870
870
|
'sr',
|
|
871
871
|
'navh',
|
|
872
872
|
'stath',
|
|
873
873
|
];
|
|
874
874
|
let changeQueryData: any = { ...queryData };
|
|
875
875
|
const qrCodeScene = changeQueryData?.scene ? changeQueryData?.scene : false;
|
|
876
876
|
const sceneQuery =
|
|
877
877
|
qrCodeScene && typeof qrCodeScene === 'string'
|
|
878
878
|
? parseQueryUrlString(decodeURIComponent(qrCodeScene))
|
|
879
879
|
: {};
|
|
880
880
|
changeQueryData = { ...changeQueryData, ...sceneQuery };
|
|
881
881
|
deleteKeyList.forEach((key) => {
|
|
882
882
|
changeQueryData[key] && delete changeQueryData[key];
|
|
883
883
|
});
|
|
884
884
|
Object.keys(changeQueryData).forEach((key) => {
|
|
885
885
|
if (changeQueryData[key] && Array.isArray(changeQueryData[key])) {
|
|
886
886
|
changeQueryData[key] = changeQueryData[key][0] || '';
|
|
887
887
|
}
|
|
888
888
|
});
|
|
889
889
|
changeQueryData['shopid'] &&
|
|
890
890
|
(changeQueryData['shopId'] = changeQueryData['shopid']) &&
|
|
891
891
|
delete changeQueryData['shopid'];
|
|
892
892
|
changeQueryData['venderid'] &&
|
|
893
893
|
(changeQueryData['venderId'] = changeQueryData['venderid']) &&
|
|
894
894
|
delete changeQueryData['venderid'];
|
|
895
895
|
changeQueryData['vendorId'] &&
|
|
896
896
|
(changeQueryData['venderId'] = changeQueryData['vendorId']) &&
|
|
897
897
|
delete changeQueryData['vendorId'];
|
|
898
898
|
changeQueryData['shopId'] &&
|
|
899
899
|
changeQueryData['shopId'] === 'undefined' &&
|
|
900
900
|
delete changeQueryData['shopId'];
|
|
901
901
|
changeQueryData['venderId'] &&
|
|
902
902
|
changeQueryData['venderId'] === 'undefined' &&
|
|
903
903
|
delete changeQueryData['venderId'];
|
|
904
904
|
return changeQueryData;
|
|
905
905
|
let isUsable = false;
|
|
906
906
|
const modularPackResult = floorData?.floorExtInfo?.modularPackResult;
|
|
907
907
|
const modularPackResultObj = formatPackResult(modularPackResult);
|
|
908
908
|
const bundleUrl = getBundleUrl(modularPackResultObj);
|
|
909
909
|
const bundleFileName = getBundleFileName(modularPackResultObj);
|
|
910
910
|
const taroVersion = getTaroVersion(modularPackResultObj);
|
|
911
911
|
if (bundleUrl && bundleFileName) {
|
|
912
912
|
isUsable = true;
|
|
913
913
|
}
|
|
914
914
|
if (!isUsable && typeof exceptionReportFn === 'function') {
|
|
915
915
|
exceptionReportFn({
|
|
916
916
|
code: `${NO_ENVIRONMENT_AND_PAGE_TYPE_FLAG}${
|
|
917
917
|
floorData?.floorExtInfo?.floorKind === FLOOR_KIND.PDC_SYSTEM_MODULE
|
|
918
918
|
? SgmCustomCode.SYSTEMPDCMODULE_DATA
|
|
919
919
|
: SgmCustomCode.REMOTEMODULE_DATA
|
|
920
920
|
}`,
|
|
921
921
|
msg: {
|
|
922
922
|
msg: `店铺h5楼层隐藏不显示。原因:模块数据不完备,楼层过滤。`,
|
|
923
923
|
floorIdx: floorData?.floorIdx,
|
|
924
924
|
uid: floorData?.uid,
|
|
925
925
|
shopId: floorData?.floorExtInfo?.shopId,
|
|
926
926
|
moduleId: floorData?.moduleId,
|
|
927
927
|
moduleDesignerType: floorData?.floorExtInfo?.moduleDesignerType,
|
|
928
928
|
floorLoadWay: floorData?.floorExtInfo?.floorLoadWay,
|
|
929
929
|
floorKind: floorData?.floorExtInfo?.floorKind,
|
|
930
930
|
middleTemplateId: floorData?.middleTemplateId,
|
|
931
931
|
modularPackResult: {
|
|
932
932
|
bundleUrl,
|
|
933
933
|
taroVersion,
|
|
934
934
|
},
|
|
935
935
|
},
|
|
936
936
|
});
|
|
937
937
|
}
|
|
938
938
|
return isUsable;
|
|
939
939
|
const objContainer = containerListData.find((item) => item.containerId === containerId);
|
|
940
940
|
return (
|
|
941
941
|
objContainer?.includeUids?.some((itemUid) => {
|
|
942
942
|
const objectFloor = floorListData.find((floorItem) => itemUid === floorItem.uid);
|
|
943
943
|
return RemoteLoadFloorList.includes(objectFloor?.floorExtInfo?.moduleFlag);
|
|
944
944
|
}) ?? false
|
|
945
945
|
);
|
|
946
946
|
const unableIsvFloorListData = floorListData.filter(
|
|
947
947
|
(floorItem) =>
|
|
948
948
|
RemoteLoadFloorList.includes(floorItem?.floorExtInfo?.moduleFlag) &&
|
|
949
949
|
!isIsvFloorUseable(floorItem, exceptionReportFn),
|
|
950
950
|
);
|
|
951
951
|
const unableIsvFloorUidList = unableIsvFloorListData.map((floorItem) => floorItem.uid);
|
|
952
952
|
const unableIsvContainerListData = containerListData.filter(
|
|
953
953
|
(item) =>
|
|
954
954
|
item.includeUids &&
|
|
955
955
|
item.includeUids.every((itemUid) => unableIsvFloorUidList.indexOf(itemUid) != -1),
|
|
956
956
|
);
|
|
957
957
|
return unableIsvContainerListData;
|
|
958
958
|
console.log('暂无对应渠道比较', compareVersion, nowVersion);
|
|
959
959
|
return -2;
|
|
960
960
|
return customObj;
|
|
961
961
|
return customObj;
|
|
962
962
|
return customObj;
|
|
963
963
|
return customObj;
|
|
964
964
|
return customObj;
|
|
965
965
|
return /openApp\.jdMobile:\/\/virtual\?params=/i.test(openAppUrl);
|
|
966
966
|
let getParams = false;
|
|
967
967
|
if (isOpenJdAppUrl(openAppUrl)) {
|
|
968
968
|
try {
|
|
969
969
|
getParams = openAppUrl.replace(/openApp\.jdMobile:\/\/virtual\?params=/i, '');
|
|
970
970
|
getParams = JSON.parse(String(getParams));
|
|
971
971
|
} catch (e) {
|
|
972
972
|
console.log(e);
|
|
973
973
|
}
|
|
974
974
|
}
|
|
975
975
|
return getParams;
|
|
976
976
|
const getLastParams = Object.assign({}, openParams);
|
|
977
977
|
return `openapp.jdmobile://virtual?params=${JSON.stringify(getLastParams)}`;
|
|
978
978
|
if (val === null || val === '' || typeof val === 'undefined') {
|
|
979
979
|
return true;
|
|
980
980
|
}
|
|
981
981
|
return false;
|
|
982
982
|
const {
|
|
983
983
|
moduleId = 'none',
|
|
984
984
|
entrance = 'none',
|
|
985
985
|
sourceType = 'none',
|
|
986
986
|
sourceValue = 'none',
|
|
987
987
|
} = params;
|
|
988
988
|
if (isIosDevice) {
|
|
989
989
|
return `${moduleId}#${entrance}`;
|
|
990
990
|
} else if (isAndroidDevice) {
|
|
991
991
|
return `${sourceType}#${sourceValue}`;
|
|
992
992
|
}
|
|
993
993
|
return 'none#none';
|
|
994
994
|
if (data && typeof data === 'object') {
|
|
995
995
|
let getOpenAppData = { ...data };
|
|
996
996
|
try {
|
|
997
997
|
const { sourceInfo, designerId, templateId, source } = getOpenAppData;
|
|
998
998
|
if (designerId && templateId) {
|
|
999
999
|
getOpenAppData = Object.assign({}, getOpenAppData, {
|
|
1000
1000
|
sourceInfo: {
|
|
1001
1001
|
entrance: '设计师预览',
|
|
1002
1002
|
},
|
|
1003
1003
|
});
|
|
1004
1004
|
} else if (sourceInfo) {
|
|
1005
1005
|
const { entrance } = sourceInfo;
|
|
1006
1006
|
getOpenAppData.sourceInfo.entrance = entrance && entrance.length > 0 ? entrance : '其他';
|
|
1007
1007
|
} else if (source && !sourceInfo) {
|
|
1008
1008
|
if (typeof source === 'object') {
|
|
1009
1009
|
const { sourceType, entrance, sourceValue, moduleId } = source;
|
|
1010
1010
|
getOpenAppData = Object.assign({}, getOpenAppData, {
|
|
1011
1011
|
sourceInfo: {
|
|
1012
1012
|
entrance: sourceType || entrance || '其他',
|
|
1013
1013
|
moduleId: sourceValue || moduleId || '-100',
|
|
1014
1014
|
},
|
|
1015
1015
|
});
|
|
1016
1016
|
if (sourceType === 'shop_from_product_detail' && sourceValue) {
|
|
1017
1017
|
getOpenAppData.sourceSku = sourceValue;
|
|
1018
1018
|
}
|
|
1019
1019
|
} else {
|
|
1020
1020
|
getOpenAppData = Object.assign({}, getOpenAppData, {
|
|
1021
1021
|
sourceInfo: {
|
|
1022
1022
|
entrance: source,
|
|
1023
1023
|
},
|
|
1024
1024
|
});
|
|
1025
1025
|
}
|
|
1026
1026
|
} else {
|
|
1027
1027
|
getOpenAppData = Object.assign({}, getOpenAppData, {
|
|
1028
1028
|
sourceInfo: {
|
|
1029
1029
|
entrance: '其他',
|
|
1030
1030
|
},
|
|
1031
1031
|
});
|
|
1032
1032
|
}
|
|
1033
1033
|
} catch (e) {
|
|
1034
1034
|
console.log(e);
|
|
1035
1035
|
}
|
|
1036
1036
|
return getOpenAppData;
|
|
1037
1037
|
}
|
|
1038
1038
|
return data;
|
|
1039
1039
|
return displayObj;
|
|
1040
1040
|
if (typeof input === 'string') {
|
|
1041
1041
|
try {
|
|
1042
1042
|
return JSON.parse(input);
|
|
1043
1043
|
} catch (e) {
|
|
1044
1044
|
console.error('JSON解析失败', e);
|
|
1045
1045
|
return {};
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
1048
|
return input || {};
|
|
1049
1049
|
return false;
|
|
1050
1050
|
const borderStyle: { [key: string]: any } = {};
|
|
1051
1051
|
if (item?.borderRadius) {
|
|
1052
1052
|
let borderTopRadius = 0;
|
|
1053
1053
|
let borderBottomRadius = 0;
|
|
1054
1054
|
if (index === 0) {
|
|
1055
1055
|
borderTopRadius = item.borderRadius;
|
|
1056
1056
|
borderBottomRadius = floorDataLen === 1 || item?.marginBottom !== 0 ? item.borderRadius : 0;
|
|
1057
1057
|
} else if (index === floorDataLen - 1) {
|
|
1058
1058
|
borderTopRadius = floorData[index - 1]?.marginBottom === 0 ? 0 : item.borderRadius;
|
|
1059
1059
|
borderBottomRadius = item.borderRadius;
|
|
1060
1060
|
} else {
|
|
1061
1061
|
borderTopRadius = floorData[index - 1]?.marginBottom === 0 ? 0 : item.borderRadius;
|
|
1062
1062
|
borderBottomRadius = item?.marginBottom === 0 ? 0 : item.borderRadius;
|
|
1063
1063
|
}
|
|
1064
1064
|
borderStyle.borderTopLeftRadius = item?.borderTopLeftRadius
|
|
1065
1065
|
? `${item?.borderTopLeftRadius}px`
|
|
1066
1066
|
: `${borderTopRadius}px`;
|
|
1067
1067
|
borderStyle.borderTopRightRadius = item?.borderTopRightRadius
|
|
1068
1068
|
? `${item?.borderTopRightRadius}px`
|
|
1069
1069
|
: `${borderTopRadius}px`;
|
|
1070
1070
|
borderStyle.borderBottomLeftRadius = `${borderBottomRadius}px`;
|
|
1071
1071
|
borderStyle.borderBottomRightRadius = `${borderBottomRadius}px`;
|
|
1072
1072
|
} else {
|
|
1073
1073
|
borderStyle.borderTopLeftRadius = borderStyle?.borderTopLeftRadius || '0px';
|
|
1074
1074
|
borderStyle.borderTopRightRadius = borderStyle?.borderTopRightRadius || '0px';
|
|
1075
1075
|
borderStyle.borderBottomRightRadius = borderStyle?.borderBottomRightRadius || '0px';
|
|
1076
1076
|
borderStyle.borderBottomLeftRadius = borderStyle?.borderBottomLeftRadius || '0px';
|
|
1077
1077
|
}
|
|
1078
1078
|
return borderStyle;
|
|
1079
1079
|
return customObj;
|
|
1080
1080
|
isJdApp,
|
|
1081
1081
|
isWxApp,
|
|
1082
1082
|
isIosDevice,
|
|
1083
1083
|
isAndroidDevice,
|
|
1084
1084
|
isJdAndIosDevice,
|
|
1085
1085
|
isJdAndAndroidDevice,
|
|
1086
1086
|
isWxMin,
|
|
1087
1087
|
isWxMinAndWxapp,
|
|
1088
1088
|
isJdMin,
|
|
1089
1089
|
isMin,
|
|
1090
1090
|
isJdMinAndHarmony,
|
|
1091
1091
|
isH5,
|
|
1092
1092
|
isH5AndJdShopView,
|
|
1093
1093
|
isImageOptimizeEnable,
|
|
1094
1094
|
isChartH5,
|
|
1095
1095
|
isH5AndJdShopViewNativeScroll,
|
|
1096
1096
|
isH5AndJdShopViewH5Scroll,
|
|
1097
1097
|
isH5AndJdShopH5CustomScrollView,
|
|
1098
1098
|
isWxMiniH5View,
|
|
1099
1099
|
sliceArrToChunkList,
|
|
1100
1100
|
dealAddress,
|
|
1101
1101
|
objectToUrlEncode,
|
|
1102
1102
|
parseQueryUrlString,
|
|
1103
1103
|
setLowSmallPicUrl,
|
|
1104
1104
|
getJfsImage,
|
|
1105
1105
|
getQualityImage,
|
|
1106
1106
|
countStringify,
|
|
1107
1107
|
setTaroStorage,
|
|
1108
1108
|
getTaroStorageKeyValue,
|
|
1109
1109
|
removeTaroStorageKey,
|
|
1110
1110
|
clearTaroStorageKey,
|
|
1111
1111
|
getSystemInfos,
|
|
1112
1112
|
addHttps,
|
|
1113
1113
|
dateFormat,
|
|
1114
1114
|
throttle,
|
|
1115
1115
|
lodashThrottle,
|
|
1116
1116
|
debounce,
|
|
1117
1117
|
getTelephone,
|
|
1118
1118
|
rgbToHex,
|
|
1119
1119
|
hexToRgb,
|
|
1120
1120
|
getRandom,
|
|
1121
1121
|
getWxAppCookieStr,
|
|
1122
1122
|
pxTransformFromData,
|
|
1123
1123
|
dealShopContentData,
|
|
1124
1124
|
showSuccessToast,
|
|
1125
1125
|
showFailToast,
|
|
1126
1126
|
showNormalToast,
|
|
1127
1127
|
showShopLoading,
|
|
1128
1128
|
hideShopLoading,
|
|
1129
1129
|
getAppChannelType,
|
|
1130
1130
|
formatTabActiveMenuType,
|
|
1131
1131
|
filterUrlQueryData,
|
|
1132
1132
|
getAvifSupport,
|
|
1133
1133
|
getWebpSupport,
|
|
1134
1134
|
isMemberPage,
|
|
1135
1135
|
sgmCustomReport,
|
|
1136
1136
|
draCustomReport,
|
|
1137
1137
|
remoteCustomReport,
|
|
1138
1138
|
draInterfaceCustomReport,
|
|
1139
1139
|
draBusinessCustomReport,
|
|
1140
1140
|
isOpenJdAppUrl,
|
|
1141
1141
|
jdOpenAppParams,
|
|
1142
1142
|
createJdOpenAppUrl,
|
|
1143
1143
|
dealJdOpenAppData,
|
|
1144
1144
|
isEmpty,
|
|
1145
1145
|
getJdAppReportPageSource,
|
|
1146
1146
|
isAppClassifyPage,
|
|
1147
1147
|
getQualityImageNew,
|
|
1148
1148
|
getQualityImageOld,
|
|
1149
1149
|
isPc,
|
|
1150
1150
|
ipLoc_djd,
|
|
1151
1151
|
jdAppVersionCompare,
|
|
1152
1152
|
dealNativePixelToCssPixel,
|
|
1153
1153
|
isAppStowShop,
|
|
1154
1154
|
isIpadDevice,
|
|
1155
1155
|
getBorderStyle,
|
|
1156
1156
|
isLanguageForEn,
|
|
1157
1157
|
sColor,
|
|
1158
1158
|
draInterfaceDSMCustomReport,
|
|
1159
1159
|
isTabletDevice,
|