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