@conecli/cone-render 0.9.1-shop2.3 → 0.9.1-shop2.4
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/common/const.ts +1 -1
- 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/jssdk.ts +1 -0
- package/dist/common/pageType.ts +1 -0
- package/dist/common/token/index.h5.ts +1 -1
- package/dist/common/token/token.jd.ts +1 -1
- package/dist/components/base/CustomScrollView/index.tsx +1 -1
- package/dist/components/base/Exposure/index.h5.tsx +1 -1
- package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
- package/dist/components/base/ExposureSmart/index.tsx +1 -1
- package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
- package/dist/components/base/InViewRender/index.tsx +1 -1
- package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
- package/dist/components/base/LazyLoadImage/const.ts +1 -1
- package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
- package/dist/components/base/MobileCommonHeader/index.module.scss +9 -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 +4 -0
- package/dist/components/base/NetworkDataError/index.tsx +1 -1
- package/dist/components/base/Price/Double/index.tsx +1 -1
- package/dist/components/base/Price/index.tsx +1 -1
- package/dist/components/decorate/DecorateFloorModule/index.module.scss +21 -2
- package/dist/components/decorate/DecorateFloorModule/index.tsx +1 -1
- package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
- package/dist/components/isv/Floor/index.tsx +1 -1
- package/dist/components/remoteFloorItem.tsx +1 -1
- package/dist/interface/common.ts +1 -1
- package/dist/interface/component.ts +1 -1
- package/dist/jumpEventReport/const.ts +1 -1
- package/dist/jumpEventReport/createReportFloorData.ts +1 -1
- package/dist/jumpEventReport/index.weapp.ts +1 -1
- package/dist/jumpEventReport/jdJumpJdApp.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 -1
- package/dist/jumpEventReport/web.wxapp.ts +1 -1
- package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
- package/dist/modules/ContainerFloorList/index.tsx +1 -1
- package/dist/open/api/environment.ts +1 -1
- package/dist/open/api/index.ts +1 -1
- package/dist/open/api/track.ts +1 -1
- package/dist/open/components/index.ts +1 -1
- package/dist/service/fetchGateway.ts +1 -1
- package/dist/service/http/const.ts +1 -1
- package/dist/service/requestServer.ts +1 -1
- 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/index.weapp.ts +1 -1
- package/dist/utils/utils.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import Taro from '@tarojs/taro'
|
|
2
1
|
console.log('PageScrollEnd fire')
|
|
3
2
|
Taro.eventCenter.trigger(TaroEventType.PAGE_SCROLL_END, options)
|
|
4
3
|
Taro.eventCenter.trigger(TaroEventType.PAGE_INIT_EXPOSURE, options)
|
|
4
|
+
import Taro from '@tarojs/taro'
|
|
5
5
|
console.log('PageScrollEnd fire')
|
|
6
6
|
Taro.eventCenter.trigger(TaroEventType.PAGE_SCROLL_END, options)
|
|
7
7
|
Taro.eventCenter.trigger(TaroEventType.PAGE_INIT_EXPOSURE, options)
|
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', '/app/newProduct', '/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,
|
|
62
62
|
versionCompare,
|
|
63
63
|
CHANNEL_TYPE,
|
|
64
64
|
JDShopViewBusinessPathType,
|
|
65
65
|
JDShopViewBusinessPathList,
|
|
66
66
|
SECTION_HOME_TAB_NAME_TYPE,
|
|
67
67
|
SECTION_HOME_TAB_TYPE,
|
|
68
68
|
parseQueryUrlString(window?.location?.href ?? ''),
|
|
69
69
|
try {
|
|
70
70
|
return JSON.parse(decodeURIComponent(getUrlQuery('cookie')))
|
|
71
71
|
} catch (e) {
|
|
72
72
|
return {}
|
|
73
73
|
}
|
|
74
74
|
isWxMiniH5View && urlCookie['wxapp_type'] == '1'
|
|
75
75
|
if (isJdApp) {
|
|
76
76
|
isIosDevice
|
|
77
77
|
? e && e.stopPropagation()
|
|
78
78
|
: androidDeviceStopNativeScrollEvent(state)
|
|
79
79
|
}
|
|
80
80
|
isJdApp &&
|
|
81
81
|
isAndroidDevice &&
|
|
82
82
|
window?.JdAndroid &&
|
|
83
83
|
window?.JdAndroid.requestEvent(state)
|
|
84
84
|
if (isH5AndJdShopView) {
|
|
85
85
|
return (
|
|
86
86
|
CHANNEL_TYPE[currentChannel] ||
|
|
87
87
|
CHANNEL_TYPE[JDShopViewBusinessPathType.HOME]
|
|
88
88
|
)
|
|
89
89
|
}
|
|
90
90
|
return null
|
|
91
91
|
isH5 && ['/app/home', '/app/classify', '/member/shopcard'].includes(urlPathname)
|
|
92
92
|
isH5 && isJdApp && !['/app/home'].includes(urlPathname)
|
|
93
93
|
return isJdApp ? versionCompare(nowVersion || jdAppVersionStr,compareVersion) >= 0 : -2
|
|
94
94
|
const getCustomObj = {
|
|
95
95
|
type: 1,
|
|
96
96
|
code: 'all',
|
|
97
97
|
cost1: 1,
|
|
98
98
|
...customObj
|
|
99
99
|
}
|
|
100
100
|
try {
|
|
101
101
|
window.__sgm__.custom(getCustomObj, '9HwAEg@fTtWBB3EnwA5VgLT')
|
|
102
102
|
} 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, isJdAndHarmonyDevice, isJdApp,
|
|
6
5
|
isWxApp, isWxMiniH5View, isH5AndJingGouMini, urlCookie,
|
|
7
6
|
sgmCustomReport, isMemberPage, isH5AndJdShopViewH5Scroll, isAppClassifyPage, isPc, ipLoc_djd
|
|
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
|
isJdAndHarmonyDevice,
|
|
139
138
|
isWxMin,
|
|
140
139
|
isWxMinAndWxapp,
|
|
141
140
|
isJdMin,
|
|
142
141
|
isH5,
|
|
143
142
|
isH5AndJdShopView,
|
|
144
143
|
isChartH5,
|
|
145
144
|
isH5AndJdShopViewNativeScroll,
|
|
146
145
|
isH5AndJdShopViewH5Scroll,
|
|
147
146
|
isH5AndJingGouMini,
|
|
148
147
|
isWxMiniH5View,
|
|
149
148
|
urlCookie,
|
|
150
149
|
sliceArrToChunkList,
|
|
151
150
|
dealAddress,
|
|
152
151
|
objectToUrlEncode,
|
|
153
152
|
parseQueryUrlString,
|
|
154
153
|
setLowSmallPicUrl,
|
|
155
154
|
setTaroStorage,
|
|
156
155
|
getTaroStorageKeyValue,
|
|
157
156
|
removeTaroStorageKey,
|
|
158
157
|
clearTaroStorageKey,
|
|
159
158
|
getQualityImage,
|
|
160
159
|
countStringify,
|
|
161
160
|
getWxAppCookieStr,
|
|
162
161
|
getSystemInfos,
|
|
163
162
|
pxTransformFromData,
|
|
164
163
|
dealShopContentDataAndReport as dealShopContentData,
|
|
165
164
|
dateFormat,
|
|
166
165
|
throttle,
|
|
167
166
|
lodashThrottle,
|
|
168
167
|
debounce,
|
|
169
168
|
addHttps,
|
|
170
169
|
commonShowSuccessToast as showSuccessToast,
|
|
171
170
|
commonShowFailToast as showFailToast,
|
|
172
171
|
commonShowNormalToast as showNormalToast,
|
|
173
172
|
showShopLoading,
|
|
174
173
|
hideShopLoading,
|
|
175
174
|
getAppChannelType,
|
|
176
175
|
formatTabActiveMenuType,
|
|
177
176
|
filterUrlQueryData,
|
|
178
177
|
sgmCustomReport,
|
|
179
178
|
isMemberPage,
|
|
180
179
|
memberFormatUtils,
|
|
181
180
|
getFloorDataToDataDefines,
|
|
182
181
|
isAppClassifyPage,
|
|
183
182
|
isPc,
|
|
184
183
|
ipLoc_djd,
|
|
184
|
+
import Taro from '@tarojs/taro'
|
|
185
185
|
nativePageShowToast, ToastAndroidType,
|
|
186
186
|
ToastIosType,
|
|
187
187
|
getAppChannelType,
|
|
188
188
|
isAndroidDevice,
|
|
189
189
|
isH5AndJdShopView,
|
|
190
190
|
isChartH5,
|
|
191
191
|
isH5AndJdShopViewNativeScroll,
|
|
192
192
|
isIosDevice,
|
|
193
193
|
isJdAndAndroidDevice,
|
|
194
194
|
isJdAndIosDevice,
|
|
195
195
|
isJdAndHarmonyDevice,
|
|
196
196
|
isJdApp,
|
|
197
197
|
isWxApp,
|
|
198
198
|
isWxMiniH5View,
|
|
199
199
|
isH5AndJingGouMini,
|
|
200
200
|
urlCookie,
|
|
201
201
|
sgmCustomReport,
|
|
202
202
|
isMemberPage,
|
|
203
203
|
isH5AndJdShopViewH5Scroll,
|
|
204
204
|
isH5AndJdShopH5CustomScrollView,
|
|
205
205
|
isAppClassifyPage,
|
|
206
206
|
isPc,
|
|
207
207
|
ipLoc_djd,
|
|
208
208
|
jdAppVersionCompare,
|
|
209
209
|
addHttps,
|
|
210
210
|
clearTaroStorageKey,
|
|
211
211
|
countStringify,
|
|
212
212
|
dateFormat,
|
|
213
213
|
dealAddress,
|
|
214
214
|
dealShopContentData as originDealShopContentData,
|
|
215
215
|
debounce,
|
|
216
216
|
filterUrlQueryData,
|
|
217
217
|
formatTabActiveMenuType,
|
|
218
218
|
getQualityImage,
|
|
219
219
|
getTaroStorageKeyValue,
|
|
220
220
|
getWxAppCookieStr,
|
|
221
221
|
isH5,
|
|
222
222
|
isJdMin,
|
|
223
223
|
isWxMin,
|
|
224
224
|
isWxMinAndWxapp,
|
|
225
225
|
lodashThrottle,
|
|
226
226
|
objectToUrlEncode,
|
|
227
227
|
parseQueryUrlString,
|
|
228
228
|
removeTaroStorageKey,
|
|
229
229
|
setLowSmallPicUrl,
|
|
230
230
|
setTaroStorage,
|
|
231
231
|
showFailToast,
|
|
232
232
|
showNormalToast,
|
|
233
233
|
showSuccessToast,
|
|
234
234
|
sliceArrToChunkList,
|
|
235
235
|
throttle,
|
|
236
236
|
dealJdOpenAppData,
|
|
237
237
|
num,
|
|
238
238
|
widthSize = 375,
|
|
239
239
|
layoutWidth,
|
|
240
240
|
const getNum = Number(num)
|
|
241
241
|
let _changeLayoutWidth = layoutWidth
|
|
242
242
|
if (!_changeLayoutWidth) {
|
|
243
243
|
_changeLayoutWidth = _ShopSystemInfo && _ShopSystemInfo?.windowWidth ? _ShopSystemInfo.windowWidth : Taro.getSystemInfoSync()?.windowWidth
|
|
244
244
|
}
|
|
245
245
|
return Math.round((getNum / widthSize) * _changeLayoutWidth)
|
|
246
246
|
const getRootFontSize = 40 * (systemInfo?.windowWidth ?? _ShopSystemInfo.windowWidth) / 750
|
|
247
247
|
const getRealRootFontSize = getRootFontSize > 40 ? 40 : getRootFontSize < 20 ? 20 : getRootFontSize
|
|
248
248
|
return (
|
|
249
249
|
Math.ceil(((parseInt(String(changeSize), 10) / 40) * 750) / designWidth * getRealRootFontSize)
|
|
250
250
|
)
|
|
251
251
|
console.log('获取系统宽度systemInfo?.windowWidth', systemInfo?.windowWidth, 'taroToTransformRoutimePXNumber(changeWidth)', taroToTransformRoutimePXNumber(changeWidth, 750, systemInfo))
|
|
252
252
|
return buildType === BUILD_TYPE.CLASSIFY && systemInfo?.windowWidth ? systemInfo?.windowWidth - taroToTransformRoutimePXNumber(changeWidth, 750, systemInfo) : systemInfo?.windowWidth ?? 0
|
|
253
253
|
const systemInfo = Taro.getSystemInfoSync()
|
|
254
254
|
if (params && params?.pageWidth && params?.pageHeight) {
|
|
255
255
|
systemInfo.windowWidth = params?.pageWidth
|
|
256
256
|
systemInfo.windowHeight = params?.pageHeight
|
|
257
257
|
}
|
|
258
258
|
systemInfo['containerWidth'] = getContainerWidth(buildType, systemInfo)
|
|
259
259
|
console.warn('====获取系统信息=====', systemInfo)
|
|
260
260
|
return systemInfo
|
|
261
261
|
const getSystemInfo = getSystemAndContainerWidthInfo(params) || {
|
|
262
262
|
windowWidth: window.innerWidth,
|
|
263
263
|
containerWidth: getContainerWidth(buildType, {
|
|
264
264
|
windowWidth: window.innerWidth,
|
|
265
265
|
}),
|
|
266
266
|
screenWidth: window.innerWidth,
|
|
267
267
|
platform: '',
|
|
268
268
|
model: '',
|
|
269
269
|
system: '',
|
|
270
270
|
}
|
|
271
271
|
if (isJdApp && isAndroidDevice && getSystemInfo.windowWidth <= 0) {
|
|
272
272
|
getSystemInfo.windowWidth = getSystemInfo.screenWidth
|
|
273
273
|
getSystemInfo['containerWidth'] = getContainerWidth(buildType, getSystemInfo)
|
|
274
274
|
}
|
|
275
275
|
return getSystemInfo
|
|
276
276
|
const params = Object.assign(
|
|
277
277
|
{},
|
|
278
278
|
{
|
|
279
279
|
title: '',
|
|
280
280
|
duration: 1500,
|
|
281
281
|
},
|
|
282
282
|
options,
|
|
283
283
|
)
|
|
284
284
|
params.duration = params.duration / 1000
|
|
285
285
|
if (isJdApp && isH5AndJdShopView) {
|
|
286
286
|
const showSuccessType = isIosDevice
|
|
287
287
|
? ToastIosType.SUCCESS
|
|
288
288
|
: ToastAndroidType.SUCCESS
|
|
289
289
|
const duration = isAndroidDevice ? 0 : params.duration
|
|
290
290
|
nativePageShowToast(options.title, showSuccessType, duration)
|
|
291
291
|
console.log('执行原生toast success')
|
|
292
292
|
} else {
|
|
293
293
|
showSuccessToast(options)
|
|
294
294
|
}
|
|
295
295
|
const params = Object.assign(
|
|
296
296
|
{},
|
|
297
297
|
{
|
|
298
298
|
title: '',
|
|
299
299
|
duration: 1500,
|
|
300
300
|
},
|
|
301
301
|
options,
|
|
302
302
|
)
|
|
303
303
|
params.duration = params.duration / 1000
|
|
304
304
|
console.log(`isJdApp${isJdApp}`)
|
|
305
305
|
if (isJdApp && isH5AndJdShopView) {
|
|
306
306
|
const showSuccessType = isIosDevice
|
|
307
307
|
? ToastIosType.FAIL
|
|
308
308
|
: ToastAndroidType.FAIL
|
|
309
309
|
const duration = isAndroidDevice ? 0 : params.duration
|
|
310
310
|
nativePageShowToast(options.title, showSuccessType, duration)
|
|
311
311
|
console.log('执行原生toast fail')
|
|
312
312
|
} else {
|
|
313
313
|
console.log('执行H5 toast fail')
|
|
314
314
|
showFailToast(options)
|
|
315
315
|
}
|
|
316
316
|
const params = Object.assign(
|
|
317
317
|
{},
|
|
318
318
|
{
|
|
319
319
|
title: '',
|
|
320
320
|
duration: 1500,
|
|
321
321
|
},
|
|
322
322
|
options,
|
|
323
323
|
)
|
|
324
324
|
params.duration = params.duration / 1000
|
|
325
325
|
if (isJdApp) {
|
|
326
326
|
const showSuccessType = isIosDevice
|
|
327
327
|
? ToastIosType.NORMAL
|
|
328
328
|
: ToastAndroidType.NORMAL
|
|
329
329
|
const duration = isAndroidDevice ? 0 : params.duration
|
|
330
330
|
nativePageShowToast(options.title, showSuccessType, duration)
|
|
331
331
|
} else {
|
|
332
332
|
showNormalToast(options)
|
|
333
333
|
}
|
|
334
334
|
const createLoadingEle = document.createElement('div')
|
|
335
335
|
createLoadingEle.id = 'J_shopLoading'
|
|
336
336
|
createLoadingEle.className = `d-shop-loading flexible-center-box ${customClassName}`
|
|
337
337
|
createLoadingEle.innerHTML = `<div class='d-loading-content'>
|
|
338
338
|
<span class='d-shop-loading-icon'></span>
|
|
339
339
|
<p class='d-shop-text'>${text}</p>
|
|
340
340
|
</div>`
|
|
341
341
|
const getEle = document.body ? document.body : document.getElementsByTagName('body')[0]
|
|
342
342
|
getEle.appendChild(createLoadingEle)
|
|
343
343
|
const getEle = document.getElementById('J_shopLoading')
|
|
344
344
|
getEle && getEle.remove()
|
|
345
345
|
const systemInfo: UtilsInterFace.taroGetSystemInfoSyncRes = getReviseSystemInfo(params)
|
|
346
346
|
if (!systemInfo.system && window) {
|
|
347
347
|
systemInfo.system = window.navigator.userAgent
|
|
348
348
|
systemInfo.isChrome = !!systemInfo?.system.match(/chrome/i)
|
|
349
349
|
}
|
|
350
350
|
const isIOS = !!systemInfo?.system.match(/ios/i)
|
|
351
351
|
const isAndroid = !!systemInfo?.system.match(/android/i)
|
|
352
352
|
systemInfo.navBarHeight = 0
|
|
353
353
|
systemInfo.statusBarHeight = 0
|
|
354
354
|
systemInfo.capsulePosition = null
|
|
355
355
|
systemInfo.isIOS = isIOS
|
|
356
356
|
systemInfo.isAndroid = isAndroid
|
|
357
357
|
_ShopSystemInfo = systemInfo
|
|
358
358
|
return systemInfo
|
|
359
359
|
return originDealShopContentData(pageData, sgmCustomReport, isvdev)
|
|
360
360
|
isJdApp,
|
|
361
361
|
isWxApp,
|
|
362
362
|
isIosDevice,
|
|
363
363
|
isAndroidDevice,
|
|
364
364
|
isJdAndIosDevice,
|
|
365
365
|
isJdAndAndroidDevice,
|
|
366
366
|
isJdAndHarmonyDevice,
|
|
367
367
|
isWxMin,
|
|
368
368
|
isWxMinAndWxapp,
|
|
369
369
|
isJdMin,
|
|
370
370
|
isH5,
|
|
371
371
|
isH5AndJdShopView,
|
|
372
372
|
isChartH5,
|
|
373
373
|
isH5AndJdShopViewNativeScroll,
|
|
374
374
|
isH5AndJdShopViewH5Scroll,
|
|
375
375
|
isH5AndJdShopH5CustomScrollView,
|
|
376
376
|
isH5AndJingGouMini,
|
|
377
377
|
isWxMiniH5View,
|
|
378
378
|
urlCookie,
|
|
379
379
|
sliceArrToChunkList,
|
|
380
380
|
dealAddress,
|
|
381
381
|
objectToUrlEncode,
|
|
382
382
|
parseQueryUrlString,
|
|
383
383
|
setLowSmallPicUrl,
|
|
384
384
|
setTaroStorage,
|
|
385
385
|
getTaroStorageKeyValue,
|
|
386
386
|
removeTaroStorageKey,
|
|
387
387
|
clearTaroStorageKey,
|
|
388
388
|
getQualityImage,
|
|
389
389
|
countStringify,
|
|
390
390
|
getWxAppCookieStr,
|
|
391
391
|
getSystemInfos,
|
|
392
392
|
pxTransformFromData,
|
|
393
393
|
dealShopContentDataAndReport as dealShopContentData,
|
|
394
394
|
dateFormat,
|
|
395
395
|
throttle,
|
|
396
396
|
lodashThrottle,
|
|
397
397
|
debounce,
|
|
398
398
|
addHttps,
|
|
399
399
|
commonShowSuccessToast as showSuccessToast,
|
|
400
400
|
commonShowFailToast as showFailToast,
|
|
401
401
|
commonShowNormalToast as showNormalToast,
|
|
402
402
|
showShopLoading,
|
|
403
403
|
hideShopLoading,
|
|
404
404
|
getAppChannelType,
|
|
405
405
|
formatTabActiveMenuType,
|
|
406
406
|
filterUrlQueryData,
|
|
407
407
|
sgmCustomReport,
|
|
408
408
|
isMemberPage,
|
|
409
409
|
memberFormatUtils,
|
|
410
410
|
getFloorDataToDataDefines,
|
|
411
411
|
isAppClassifyPage,
|
|
412
412
|
isPc,
|
|
413
413
|
ipLoc_djd,
|
|
414
414
|
jdAppVersionCompare,
|
|
415
415
|
dealJdOpenAppData,
|
package/dist/utils/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
2
1
|
isChartH5,
|
|
3
2
|
isH5AndJdShopViewH5Scroll,
|
|
4
3
|
isMemberPage,
|
|
5
4
|
isPc,
|
|
6
5
|
ipLoc_djd,
|
|
7
6
|
isJdAndHarmonyDevice,
|
|
8
7
|
isChartH5,
|
|
9
8
|
isH5AndJdShopViewH5Scroll,
|
|
10
9
|
isH5AndJingGouMini,
|
|
11
10
|
urlCookie,
|
|
12
11
|
isMemberPage,
|
|
13
12
|
isPc,
|
|
14
13
|
ipLoc_djd,
|
|
14
|
+
import {
|
|
15
15
|
isChartH5,
|
|
16
16
|
isH5AndJdShopViewH5Scroll,
|
|
17
17
|
isH5AndJdShopH5CustomScrollView,
|
|
18
18
|
isMemberPage,
|
|
19
19
|
isPc,
|
|
20
20
|
ipLoc_djd,
|
|
21
21
|
jdAppVersionCompare,
|
|
22
22
|
dealJdOpenAppData
|
|
23
23
|
isJdAndHarmonyDevice,
|
|
24
24
|
isChartH5,
|
|
25
25
|
isH5AndJdShopViewH5Scroll,
|
|
26
26
|
isH5AndJdShopH5CustomScrollView,
|
|
27
27
|
isH5AndJingGouMini,
|
|
28
28
|
urlCookie,
|
|
29
29
|
isMemberPage,
|
|
30
30
|
isPc,
|
|
31
31
|
ipLoc_djd,
|
|
32
32
|
jdAppVersionCompare,
|
|
33
33
|
dealJdOpenAppData
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
2
1
|
isChartH5,
|
|
3
2
|
isH5AndJdShopViewH5Scroll,
|
|
4
3
|
sgmCustomReport,
|
|
5
4
|
isMemberPage,
|
|
6
5
|
isAppClassifyPage
|
|
7
6
|
isJdAndHarmonyDevice,
|
|
8
7
|
isH5AndJdShopViewH5Scroll,
|
|
9
8
|
isH5AndJingGouMini,
|
|
10
9
|
urlCookie,
|
|
11
10
|
isMemberPage,
|
|
12
11
|
isAppClassifyPage
|
|
12
|
+
import {
|
|
13
13
|
isChartH5,
|
|
14
14
|
isH5AndJdShopViewH5Scroll,
|
|
15
15
|
isH5AndJdShopH5CustomScrollView,
|
|
16
16
|
sgmCustomReport,
|
|
17
17
|
isMemberPage,
|
|
18
18
|
isAppClassifyPage,
|
|
19
19
|
jdAppVersionCompare,
|
|
20
20
|
dealJdOpenAppData
|
|
21
21
|
isJdAndHarmonyDevice,
|
|
22
22
|
isH5AndJdShopViewH5Scroll,
|
|
23
23
|
isH5AndJdShopH5CustomScrollView,
|
|
24
24
|
isH5AndJingGouMini,
|
|
25
25
|
urlCookie,
|
|
26
26
|
isMemberPage,
|
|
27
27
|
isAppClassifyPage,
|
|
28
28
|
jdAppVersionCompare,
|
|
29
29
|
dealJdOpenAppData
|