@conecli/cone-render 0.9.1-shop2.0 → 0.9.1-shop2.2
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/api/index.ts +1 -1
- package/dist/common/const.ts +1 -1
- package/dist/common/index.h5.ts +1 -1
- package/dist/components/base/CommonFloorHead/index.tsx +1 -1
- package/dist/components/floorItem.tsx +1 -1
- package/dist/components/isv/Floor/index.tsx +1 -1
- package/dist/components/remoteFloorItem.tsx +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/jumpEventReport/base.ts +1 -1
- package/dist/jumpEventReport/index.h5.ts +1 -1
- package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
- package/dist/jumpEventReport/web.base.ts +1 -1
- package/dist/jumpEventReport/web.pc.ts +1 -0
- package/dist/utils/connectNativeJsBridge.ts +1 -1
- package/dist/utils/connectNativeJsBridge.weapp.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/taroRenderUtil.ts +1 -1
- package/dist/utils/utils.ts +1 -1
- package/package.json +1 -1
package/dist/utils/h5Utils.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
2
1
|
isApp,
|
|
3
2
|
isIOS,
|
|
4
3
|
getAppVersion,
|
|
5
4
|
version,
|
|
6
5
|
getUUID,
|
|
7
6
|
getUrlQuery,
|
|
8
7
|
assign,
|
|
9
8
|
isString,
|
|
10
9
|
isObject,
|
|
11
10
|
serialize,
|
|
12
11
|
isAndroid, versionCompare,
|
|
13
12
|
CHANNEL_TYPE,
|
|
14
13
|
JDShopViewBusinessPathType,
|
|
15
14
|
JDShopViewBusinessPathList,
|
|
16
15
|
SECTION_HOME_TAB_NAME_TYPE,
|
|
17
16
|
SECTION_HOME_TAB_TYPE,
|
|
18
17
|
parseQueryUrlString(window?.location?.href ?? ''),
|
|
19
18
|
try {
|
|
20
19
|
return JSON.parse(decodeURIComponent(getUrlQuery('cookie')))
|
|
21
20
|
} catch (e) {
|
|
22
21
|
return {}
|
|
23
22
|
}
|
|
24
23
|
isWxMiniH5View && urlCookie['wxapp_type'] == '1'
|
|
25
24
|
if (isJdApp) {
|
|
26
25
|
isIosDevice
|
|
27
26
|
? e && e.stopPropagation()
|
|
28
27
|
: androidDeviceStopNativeScrollEvent(state)
|
|
29
28
|
}
|
|
30
29
|
isJdApp &&
|
|
31
30
|
isAndroidDevice &&
|
|
32
31
|
window?.JdAndroid &&
|
|
33
32
|
window?.JdAndroid.requestEvent(state)
|
|
34
33
|
if (isH5AndJdShopView) {
|
|
35
34
|
return (
|
|
36
35
|
CHANNEL_TYPE[currentChannel] ||
|
|
37
36
|
CHANNEL_TYPE[JDShopViewBusinessPathType.HOME]
|
|
38
37
|
)
|
|
39
38
|
}
|
|
40
39
|
return null
|
|
41
40
|
isH5 && ['/app/home', '/app/classify', '/member/shopcard'].includes(urlPathname)
|
|
42
41
|
const getCustomObj = {
|
|
43
42
|
type: 1,
|
|
44
43
|
code: 'all',
|
|
45
44
|
cost1: 1,
|
|
46
45
|
...customObj
|
|
47
46
|
}
|
|
48
47
|
try {
|
|
49
48
|
window.__sgm__.custom(getCustomObj, '9HwAEg@fTtWBB3EnwA5VgLT')
|
|
50
49
|
} catch (e) {}
|
|
50
|
+
import {
|
|
51
51
|
isApp,
|
|
52
52
|
isIOS,
|
|
53
53
|
getAppVersion,
|
|
54
54
|
version,
|
|
55
55
|
getUUID,
|
|
56
56
|
getUrlQuery,
|
|
57
57
|
assign,
|
|
58
58
|
isString,
|
|
59
59
|
isObject,
|
|
60
60
|
serialize,
|
|
61
61
|
isAndroid, versionCompare,
|
|
62
62
|
CHANNEL_TYPE,
|
|
63
63
|
JDShopViewBusinessPathType,
|
|
64
64
|
JDShopViewBusinessPathList,
|
|
65
65
|
SECTION_HOME_TAB_NAME_TYPE,
|
|
66
66
|
SECTION_HOME_TAB_TYPE,
|
|
67
67
|
parseQueryUrlString(window?.location?.href ?? ''),
|
|
68
68
|
try {
|
|
69
69
|
return JSON.parse(decodeURIComponent(getUrlQuery('cookie')))
|
|
70
70
|
} catch (e) {
|
|
71
71
|
return {}
|
|
72
72
|
}
|
|
73
73
|
isWxMiniH5View && urlCookie['wxapp_type'] == '1'
|
|
74
74
|
if (isJdApp) {
|
|
75
75
|
isIosDevice
|
|
76
76
|
? e && e.stopPropagation()
|
|
77
77
|
: androidDeviceStopNativeScrollEvent(state)
|
|
78
78
|
}
|
|
79
79
|
isJdApp &&
|
|
80
80
|
isAndroidDevice &&
|
|
81
81
|
window?.JdAndroid &&
|
|
82
82
|
window?.JdAndroid.requestEvent(state)
|
|
83
83
|
if (isH5AndJdShopView) {
|
|
84
84
|
return (
|
|
85
85
|
CHANNEL_TYPE[currentChannel] ||
|
|
86
86
|
CHANNEL_TYPE[JDShopViewBusinessPathType.HOME]
|
|
87
87
|
)
|
|
88
88
|
}
|
|
89
89
|
return null
|
|
90
90
|
isH5 && ['/app/home', '/app/classify', '/app/newProduct', '/member/shopcard'].includes(urlPathname)
|
|
91
91
|
const getCustomObj = {
|
|
92
92
|
type: 1,
|
|
93
93
|
code: 'all',
|
|
94
94
|
cost1: 1,
|
|
95
95
|
...customObj
|
|
96
96
|
}
|
|
97
97
|
try {
|
|
98
98
|
window.__sgm__.custom(getCustomObj, '9HwAEg@fTtWBB3EnwA5VgLT')
|
|
99
99
|
} catch (e) {}
|
package/dist/utils/index.h5.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import Taro from '@tarojs/taro'
|
|
2
1
|
nativePageShowToast, ToastAndroidType,
|
|
3
2
|
ToastIosType,
|
|
4
3
|
getAppChannelType, isAndroidDevice, isH5AndJdShopView, isChartH5,
|
|
5
4
|
isH5AndJdShopViewNativeScroll, isIosDevice, isJdAndAndroidDevice, isJdAndIosDevice, isJdApp,
|
|
6
5
|
isWxApp, isWxMiniH5View, isH5AndJingGouMini, urlCookie,
|
|
7
6
|
sgmCustomReport, isMemberPage, isH5AndJdShopViewH5Scroll, isAppClassifyPage
|
|
8
7
|
addHttps,
|
|
9
8
|
clearTaroStorageKey,
|
|
10
9
|
countStringify,
|
|
11
10
|
dateFormat,
|
|
12
11
|
dealAddress,
|
|
13
12
|
dealShopContentData as originDealShopContentData,
|
|
14
13
|
debounce,
|
|
15
14
|
filterUrlQueryData,
|
|
16
15
|
formatTabActiveMenuType,
|
|
17
16
|
getQualityImage,
|
|
18
17
|
getTaroStorageKeyValue,
|
|
19
18
|
getWxAppCookieStr,
|
|
20
19
|
isH5,
|
|
21
20
|
isJdMin,
|
|
22
21
|
isWxMin,
|
|
23
22
|
isWxMinAndWxapp,
|
|
24
23
|
lodashThrottle,
|
|
25
24
|
objectToUrlEncode,
|
|
26
25
|
parseQueryUrlString,
|
|
27
26
|
removeTaroStorageKey,
|
|
28
27
|
setLowSmallPicUrl,
|
|
29
28
|
setTaroStorage,
|
|
30
29
|
showFailToast,
|
|
31
30
|
showNormalToast,
|
|
32
31
|
showSuccessToast,
|
|
33
32
|
sliceArrToChunkList,
|
|
34
33
|
throttle,
|
|
35
34
|
windowWidth: window.innerWidth,
|
|
36
35
|
containerWidth: buildType === BUILD_TYPE.CLASSIFY ? window.innerWidth - 100 : window.innerWidth,
|
|
37
36
|
screenWidth: window.innerWidth,
|
|
38
37
|
platform: '',
|
|
39
38
|
model: '',
|
|
40
39
|
system: '',
|
|
41
40
|
getSystemInfo.windowWidth = getSystemInfo.screenWidth
|
|
42
41
|
getSystemInfo['containerWidth'] = buildType === BUILD_TYPE.CLASSIFY ? getSystemInfo.screenWidth - 100 : getSystemInfo.screenWidth
|
|
43
42
|
const params = Object.assign(
|
|
44
43
|
{},
|
|
45
44
|
{
|
|
46
45
|
title: '',
|
|
47
46
|
duration: 1500,
|
|
48
47
|
},
|
|
49
48
|
options,
|
|
50
49
|
)
|
|
51
50
|
params.duration = params.duration / 1000
|
|
52
51
|
if (isJdApp && isH5AndJdShopView) {
|
|
53
52
|
const showSuccessType = isIosDevice
|
|
54
53
|
? ToastIosType.SUCCESS
|
|
55
54
|
: ToastAndroidType.SUCCESS
|
|
56
55
|
const duration = isAndroidDevice ? 0 : params.duration
|
|
57
56
|
nativePageShowToast(options.title, showSuccessType, duration)
|
|
58
57
|
console.log('执行原生toast success')
|
|
59
58
|
} else {
|
|
60
59
|
showSuccessToast(options)
|
|
61
60
|
}
|
|
62
61
|
const params = Object.assign(
|
|
63
62
|
{},
|
|
64
63
|
{
|
|
65
64
|
title: '',
|
|
66
65
|
duration: 1500,
|
|
67
66
|
},
|
|
68
67
|
options,
|
|
69
68
|
)
|
|
70
69
|
params.duration = params.duration / 1000
|
|
71
70
|
console.log(`isJdApp${isJdApp}`)
|
|
72
71
|
if (isJdApp && isH5AndJdShopView) {
|
|
73
72
|
const showSuccessType = isIosDevice
|
|
74
73
|
? ToastIosType.FAIL
|
|
75
74
|
: ToastAndroidType.FAIL
|
|
76
75
|
const duration = isAndroidDevice ? 0 : params.duration
|
|
77
76
|
nativePageShowToast(options.title, showSuccessType, duration)
|
|
78
77
|
console.log('执行原生toast fail')
|
|
79
78
|
} else {
|
|
80
79
|
console.log('执行H5 toast fail')
|
|
81
80
|
showFailToast(options)
|
|
82
81
|
}
|
|
83
82
|
const params = Object.assign(
|
|
84
83
|
{},
|
|
85
84
|
{
|
|
86
85
|
title: '',
|
|
87
86
|
duration: 1500,
|
|
88
87
|
},
|
|
89
88
|
options,
|
|
90
89
|
)
|
|
91
90
|
params.duration = params.duration / 1000
|
|
92
91
|
if (isJdApp) {
|
|
93
92
|
const showSuccessType = isIosDevice
|
|
94
93
|
? ToastIosType.NORMAL
|
|
95
94
|
: ToastAndroidType.NORMAL
|
|
96
95
|
const duration = isAndroidDevice ? 0 : params.duration
|
|
97
96
|
nativePageShowToast(options.title, showSuccessType, duration)
|
|
98
97
|
} else {
|
|
99
98
|
showNormalToast(options)
|
|
100
99
|
}
|
|
101
100
|
const createLoadingEle = document.createElement('div')
|
|
102
101
|
createLoadingEle.id = 'J_shopLoading'
|
|
103
102
|
createLoadingEle.className = `d-shop-loading flexible-center-box ${customClassName}`
|
|
104
103
|
createLoadingEle.innerHTML = `<div class='d-loading-content'>
|
|
105
104
|
<span class='d-shop-loading-icon'></span>
|
|
106
105
|
<p class='d-shop-text'>${text}</p>
|
|
107
106
|
</div>`
|
|
108
107
|
const getEle = document.body ? document.body : document.getElementsByTagName('body')[0]
|
|
109
108
|
console.log('获取getEle及append及appendChild方法', getEle, getEle?.append, getEle?.appendChild)
|
|
110
109
|
getEle.appendChild(createLoadingEle)
|
|
111
110
|
const getEle = document.getElementById('J_shopLoading')
|
|
112
111
|
getEle && getEle.remove()
|
|
113
112
|
num,
|
|
114
113
|
widthSize = 375,
|
|
115
114
|
layoutWidth = getSystemInfo.windowWidth,
|
|
116
115
|
const getNum = Number(num)
|
|
117
116
|
return Math.round((getNum / widthSize) * layoutWidth)
|
|
118
117
|
const systemInfo: UtilsInterFace.taroGetSystemInfoSyncRes = getSystemInfo
|
|
119
118
|
if (!systemInfo.system && window) {
|
|
120
119
|
systemInfo.system = window.navigator.userAgent
|
|
121
120
|
systemInfo.isChrome = !!systemInfo?.system.match(/chrome/i)
|
|
122
121
|
}
|
|
123
122
|
const isIOS = !!systemInfo?.system.match(/ios/i)
|
|
124
123
|
const isAndroid = !!systemInfo?.system.match(/android/i)
|
|
125
124
|
systemInfo.navBarHeight = 0
|
|
126
125
|
systemInfo.statusBarHeight = 0
|
|
127
126
|
systemInfo.capsulePosition = null
|
|
128
127
|
systemInfo.isIOS = isIOS
|
|
129
128
|
systemInfo.isAndroid = isAndroid
|
|
130
129
|
return systemInfo
|
|
131
130
|
return originDealShopContentData(pageData, sgmCustomReport, isvdev)
|
|
132
131
|
isJdApp,
|
|
133
132
|
isWxApp,
|
|
134
133
|
isIosDevice,
|
|
135
134
|
isAndroidDevice,
|
|
136
135
|
isJdAndIosDevice,
|
|
137
136
|
isJdAndAndroidDevice,
|
|
138
137
|
isWxMin,
|
|
139
138
|
isWxMinAndWxapp,
|
|
140
139
|
isJdMin,
|
|
141
140
|
isH5,
|
|
142
141
|
isH5AndJdShopView,
|
|
143
142
|
isChartH5,
|
|
144
143
|
isH5AndJdShopViewNativeScroll,
|
|
145
144
|
isH5AndJdShopViewH5Scroll,
|
|
146
145
|
isH5AndJingGouMini,
|
|
147
146
|
isWxMiniH5View,
|
|
148
147
|
urlCookie,
|
|
149
148
|
sliceArrToChunkList,
|
|
150
149
|
dealAddress,
|
|
151
150
|
objectToUrlEncode,
|
|
152
151
|
parseQueryUrlString,
|
|
153
152
|
setLowSmallPicUrl,
|
|
154
153
|
setTaroStorage,
|
|
155
154
|
getTaroStorageKeyValue,
|
|
156
155
|
removeTaroStorageKey,
|
|
157
156
|
clearTaroStorageKey,
|
|
158
157
|
getQualityImage,
|
|
159
158
|
countStringify,
|
|
160
159
|
getWxAppCookieStr,
|
|
161
160
|
getSystemInfos,
|
|
162
161
|
pxTransformFromData,
|
|
163
162
|
dealShopContentDataAndReport as dealShopContentData,
|
|
164
163
|
dateFormat,
|
|
165
164
|
throttle,
|
|
166
165
|
lodashThrottle,
|
|
167
166
|
debounce,
|
|
168
167
|
addHttps,
|
|
169
168
|
commonShowSuccessToast as showSuccessToast,
|
|
170
169
|
commonShowFailToast as showFailToast,
|
|
171
170
|
commonShowNormalToast as showNormalToast,
|
|
172
171
|
showShopLoading,
|
|
173
172
|
hideShopLoading,
|
|
174
173
|
getAppChannelType,
|
|
175
174
|
formatTabActiveMenuType,
|
|
176
175
|
filterUrlQueryData,
|
|
177
176
|
sgmCustomReport,
|
|
178
177
|
isMemberPage,
|
|
179
178
|
memberFormatUtils,
|
|
180
179
|
getFloorDataToDataDefines,
|
|
181
180
|
isAppClassifyPage
|
|
181
|
+
import Taro from '@tarojs/taro'
|
|
182
182
|
nativePageShowToast, ToastAndroidType,
|
|
183
183
|
ToastIosType,
|
|
184
184
|
getAppChannelType, isAndroidDevice, isH5AndJdShopView, isChartH5,
|
|
185
185
|
isH5AndJdShopViewNativeScroll, isIosDevice, isJdAndAndroidDevice, isJdAndIosDevice, isJdApp,
|
|
186
186
|
isWxApp, isWxMiniH5View, isH5AndJingGouMini, urlCookie,
|
|
187
187
|
sgmCustomReport, isMemberPage, isH5AndJdShopViewH5Scroll, isAppClassifyPage, isPc, ipLoc_djd
|
|
188
188
|
addHttps,
|
|
189
189
|
clearTaroStorageKey,
|
|
190
190
|
countStringify,
|
|
191
191
|
dateFormat,
|
|
192
192
|
dealAddress,
|
|
193
193
|
dealShopContentData as originDealShopContentData,
|
|
194
194
|
debounce,
|
|
195
195
|
filterUrlQueryData,
|
|
196
196
|
formatTabActiveMenuType,
|
|
197
197
|
getQualityImage,
|
|
198
198
|
getTaroStorageKeyValue,
|
|
199
199
|
getWxAppCookieStr,
|
|
200
200
|
isH5,
|
|
201
201
|
isJdMin,
|
|
202
202
|
isWxMin,
|
|
203
203
|
isWxMinAndWxapp,
|
|
204
204
|
lodashThrottle,
|
|
205
205
|
objectToUrlEncode,
|
|
206
206
|
parseQueryUrlString,
|
|
207
207
|
removeTaroStorageKey,
|
|
208
208
|
setLowSmallPicUrl,
|
|
209
209
|
setTaroStorage,
|
|
210
210
|
showFailToast,
|
|
211
211
|
showNormalToast,
|
|
212
212
|
showSuccessToast,
|
|
213
213
|
sliceArrToChunkList,
|
|
214
214
|
throttle,
|
|
215
215
|
windowWidth: window.innerWidth,
|
|
216
216
|
containerWidth: buildType === BUILD_TYPE.CLASSIFY ? window.innerWidth - 100 : window.innerWidth,
|
|
217
217
|
screenWidth: window.innerWidth,
|
|
218
218
|
platform: '',
|
|
219
219
|
model: '',
|
|
220
220
|
system: '',
|
|
221
221
|
getSystemInfo.windowWidth = getSystemInfo.screenWidth
|
|
222
222
|
getSystemInfo['containerWidth'] = buildType === BUILD_TYPE.CLASSIFY ? getSystemInfo.screenWidth - 100 : getSystemInfo.screenWidth
|
|
223
223
|
const params = Object.assign(
|
|
224
224
|
{},
|
|
225
225
|
{
|
|
226
226
|
title: '',
|
|
227
227
|
duration: 1500,
|
|
228
228
|
},
|
|
229
229
|
options,
|
|
230
230
|
)
|
|
231
231
|
params.duration = params.duration / 1000
|
|
232
232
|
if (isJdApp && isH5AndJdShopView) {
|
|
233
233
|
const showSuccessType = isIosDevice
|
|
234
234
|
? ToastIosType.SUCCESS
|
|
235
235
|
: ToastAndroidType.SUCCESS
|
|
236
236
|
const duration = isAndroidDevice ? 0 : params.duration
|
|
237
237
|
nativePageShowToast(options.title, showSuccessType, duration)
|
|
238
238
|
console.log('执行原生toast success')
|
|
239
239
|
} else {
|
|
240
240
|
showSuccessToast(options)
|
|
241
241
|
}
|
|
242
242
|
const params = Object.assign(
|
|
243
243
|
{},
|
|
244
244
|
{
|
|
245
245
|
title: '',
|
|
246
246
|
duration: 1500,
|
|
247
247
|
},
|
|
248
248
|
options,
|
|
249
249
|
)
|
|
250
250
|
params.duration = params.duration / 1000
|
|
251
251
|
console.log(`isJdApp${isJdApp}`)
|
|
252
252
|
if (isJdApp && isH5AndJdShopView) {
|
|
253
253
|
const showSuccessType = isIosDevice
|
|
254
254
|
? ToastIosType.FAIL
|
|
255
255
|
: ToastAndroidType.FAIL
|
|
256
256
|
const duration = isAndroidDevice ? 0 : params.duration
|
|
257
257
|
nativePageShowToast(options.title, showSuccessType, duration)
|
|
258
258
|
console.log('执行原生toast fail')
|
|
259
259
|
} else {
|
|
260
260
|
console.log('执行H5 toast fail')
|
|
261
261
|
showFailToast(options)
|
|
262
262
|
}
|
|
263
263
|
const params = Object.assign(
|
|
264
264
|
{},
|
|
265
265
|
{
|
|
266
266
|
title: '',
|
|
267
267
|
duration: 1500,
|
|
268
268
|
},
|
|
269
269
|
options,
|
|
270
270
|
)
|
|
271
271
|
params.duration = params.duration / 1000
|
|
272
272
|
if (isJdApp) {
|
|
273
273
|
const showSuccessType = isIosDevice
|
|
274
274
|
? ToastIosType.NORMAL
|
|
275
275
|
: ToastAndroidType.NORMAL
|
|
276
276
|
const duration = isAndroidDevice ? 0 : params.duration
|
|
277
277
|
nativePageShowToast(options.title, showSuccessType, duration)
|
|
278
278
|
} else {
|
|
279
279
|
showNormalToast(options)
|
|
280
280
|
}
|
|
281
281
|
const createLoadingEle = document.createElement('div')
|
|
282
282
|
createLoadingEle.id = 'J_shopLoading'
|
|
283
283
|
createLoadingEle.className = `d-shop-loading flexible-center-box ${customClassName}`
|
|
284
284
|
createLoadingEle.innerHTML = `<div class='d-loading-content'>
|
|
285
285
|
<span class='d-shop-loading-icon'></span>
|
|
286
286
|
<p class='d-shop-text'>${text}</p>
|
|
287
287
|
</div>`
|
|
288
288
|
const getEle = document.body ? document.body : document.getElementsByTagName('body')[0]
|
|
289
289
|
console.log('获取getEle及append及appendChild方法', getEle, getEle?.append, getEle?.appendChild)
|
|
290
290
|
getEle.appendChild(createLoadingEle)
|
|
291
291
|
const getEle = document.getElementById('J_shopLoading')
|
|
292
292
|
getEle && getEle.remove()
|
|
293
293
|
num,
|
|
294
294
|
widthSize = 375,
|
|
295
295
|
layoutWidth = getSystemInfo.windowWidth,
|
|
296
296
|
const getNum = Number(num)
|
|
297
297
|
return Math.round((getNum / widthSize) * layoutWidth)
|
|
298
298
|
const systemInfo: UtilsInterFace.taroGetSystemInfoSyncRes = getSystemInfo
|
|
299
299
|
if (!systemInfo.system && window) {
|
|
300
300
|
systemInfo.system = window.navigator.userAgent
|
|
301
301
|
systemInfo.isChrome = !!systemInfo?.system.match(/chrome/i)
|
|
302
302
|
}
|
|
303
303
|
const isIOS = !!systemInfo?.system.match(/ios/i)
|
|
304
304
|
const isAndroid = !!systemInfo?.system.match(/android/i)
|
|
305
305
|
systemInfo.navBarHeight = 0
|
|
306
306
|
systemInfo.statusBarHeight = 0
|
|
307
307
|
systemInfo.capsulePosition = null
|
|
308
308
|
systemInfo.isIOS = isIOS
|
|
309
309
|
systemInfo.isAndroid = isAndroid
|
|
310
310
|
return systemInfo
|
|
311
311
|
return originDealShopContentData(pageData, sgmCustomReport, isvdev)
|
|
312
312
|
isJdApp,
|
|
313
313
|
isWxApp,
|
|
314
314
|
isIosDevice,
|
|
315
315
|
isAndroidDevice,
|
|
316
316
|
isJdAndIosDevice,
|
|
317
317
|
isJdAndAndroidDevice,
|
|
318
318
|
isWxMin,
|
|
319
319
|
isWxMinAndWxapp,
|
|
320
320
|
isJdMin,
|
|
321
321
|
isH5,
|
|
322
322
|
isH5AndJdShopView,
|
|
323
323
|
isChartH5,
|
|
324
324
|
isH5AndJdShopViewNativeScroll,
|
|
325
325
|
isH5AndJdShopViewH5Scroll,
|
|
326
326
|
isH5AndJingGouMini,
|
|
327
327
|
isWxMiniH5View,
|
|
328
328
|
urlCookie,
|
|
329
329
|
sliceArrToChunkList,
|
|
330
330
|
dealAddress,
|
|
331
331
|
objectToUrlEncode,
|
|
332
332
|
parseQueryUrlString,
|
|
333
333
|
setLowSmallPicUrl,
|
|
334
334
|
setTaroStorage,
|
|
335
335
|
getTaroStorageKeyValue,
|
|
336
336
|
removeTaroStorageKey,
|
|
337
337
|
clearTaroStorageKey,
|
|
338
338
|
getQualityImage,
|
|
339
339
|
countStringify,
|
|
340
340
|
getWxAppCookieStr,
|
|
341
341
|
getSystemInfos,
|
|
342
342
|
pxTransformFromData,
|
|
343
343
|
dealShopContentDataAndReport as dealShopContentData,
|
|
344
344
|
dateFormat,
|
|
345
345
|
throttle,
|
|
346
346
|
lodashThrottle,
|
|
347
347
|
debounce,
|
|
348
348
|
addHttps,
|
|
349
349
|
commonShowSuccessToast as showSuccessToast,
|
|
350
350
|
commonShowFailToast as showFailToast,
|
|
351
351
|
commonShowNormalToast as showNormalToast,
|
|
352
352
|
showShopLoading,
|
|
353
353
|
hideShopLoading,
|
|
354
354
|
getAppChannelType,
|
|
355
355
|
formatTabActiveMenuType,
|
|
356
356
|
filterUrlQueryData,
|
|
357
357
|
sgmCustomReport,
|
|
358
358
|
isMemberPage,
|
|
359
359
|
memberFormatUtils,
|
|
360
360
|
getFloorDataToDataDefines,
|
|
361
361
|
isAppClassifyPage,
|
|
362
362
|
isPc,
|
|
363
363
|
ipLoc_djd,
|
package/dist/utils/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
2
1
|
isChartH5,
|
|
3
2
|
isH5AndJdShopViewH5Scroll,
|
|
4
3
|
isMemberPage,
|
|
5
4
|
isChartH5,
|
|
6
5
|
isH5AndJdShopViewH5Scroll,
|
|
7
6
|
isH5AndJingGouMini,
|
|
8
7
|
urlCookie,
|
|
9
8
|
isMemberPage,
|
|
9
|
+
import {
|
|
10
10
|
isChartH5,
|
|
11
11
|
isH5AndJdShopViewH5Scroll,
|
|
12
12
|
isMemberPage,
|
|
13
13
|
isPc,
|
|
14
14
|
ipLoc_djd,
|
|
15
15
|
isChartH5,
|
|
16
16
|
isH5AndJdShopViewH5Scroll,
|
|
17
17
|
isH5AndJingGouMini,
|
|
18
18
|
urlCookie,
|
|
19
19
|
isMemberPage,
|
|
20
20
|
isPc,
|
|
21
21
|
ipLoc_djd,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export enum TaroRenderVersion {
|
|
2
1
|
VERSION_OLD = 0,
|
|
3
2
|
VERSION_NEW = 1,
|
|
4
3
|
let result = modularPackResult?.bundleUrl || ''
|
|
5
4
|
if (window?.taroRenderVersion === TaroRenderVersion.VERSION_NEW) {
|
|
6
5
|
result = modularPackResult?.bundleUrlV2 || ''
|
|
7
6
|
}
|
|
8
7
|
console.log(
|
|
9
8
|
'getBundleUrl taroRenderVersion:' +
|
|
10
9
|
window?.taroRenderVersion +
|
|
11
10
|
',bundleUrl:' +
|
|
12
11
|
result,
|
|
13
12
|
)
|
|
14
13
|
return result
|
|
15
14
|
let result = modularPackResult?.bundleFileName || ''
|
|
16
15
|
if (window?.taroRenderVersion === TaroRenderVersion.VERSION_NEW) {
|
|
17
16
|
result = modularPackResult?.bundleFileNameV2 || ''
|
|
18
17
|
}
|
|
19
18
|
console.log(
|
|
20
19
|
'getBundleUrl taroRenderVersion:' +
|
|
21
20
|
window?.taroRenderVersion +
|
|
22
21
|
',bundleFileName:' +
|
|
23
22
|
result,
|
|
24
23
|
)
|
|
25
24
|
return result
|
|
26
25
|
if (typeof modularPackResult === 'string') {
|
|
27
26
|
return JSON.parse(modularPackResult)
|
|
28
27
|
} else if (modularPackResult) {
|
|
29
28
|
return modularPackResult
|
|
30
29
|
} else {
|
|
31
30
|
return {}
|
|
32
31
|
}
|
|
32
|
+
export enum TaroRenderVersion {
|
|
33
33
|
VERSION_OLD = 0,
|
|
34
34
|
VERSION_NEW = 1,
|
|
35
35
|
let result = modularPackResult?.bundleUrl || ''
|
|
36
36
|
if (window?.taroRenderVersion === TaroRenderVersion.VERSION_NEW) {
|
|
37
37
|
result = modularPackResult?.bundleUrlV2 || ''
|
|
38
38
|
}
|
|
39
39
|
console.log(
|
|
40
40
|
'getBundleUrl taroRenderVersion:' +
|
|
41
41
|
window?.taroRenderVersion +
|
|
42
42
|
',bundleUrl:' +
|
|
43
43
|
result,
|
|
44
44
|
)
|
|
45
45
|
return result
|
|
46
46
|
let result = modularPackResult?.bundleFileName || ''
|
|
47
47
|
if (window?.taroRenderVersion === TaroRenderVersion.VERSION_NEW) {
|
|
48
48
|
result = modularPackResult?.bundleFileNameV2 || ''
|
|
49
49
|
}
|
|
50
50
|
console.log(
|
|
51
51
|
'getBundleUrl taroRenderVersion:' +
|
|
52
52
|
window?.taroRenderVersion +
|
|
53
53
|
',bundleFileName:' +
|
|
54
54
|
result,
|
|
55
55
|
)
|
|
56
56
|
return result
|
|
57
57
|
if (typeof modularPackResult === 'string') {
|
|
58
58
|
try {
|
|
59
59
|
return JSON.parse(modularPackResult)
|
|
60
60
|
} catch (e) {
|
|
61
61
|
console.error('JSON解析失败', e)
|
|
62
62
|
return {}
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
return modularPackResult || {}
|