@conecli/cone-render 0.8.38-beta.0 → 0.8.38
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/common/index.jd.ts +1 -1
- package/dist/common/index.ts +1 -1
- package/dist/common/index.weapp.ts +1 -1
- package/dist/common/wxappApi.ts +1 -1
- package/dist/components/base/CommonFloorHead/index.tsx +1 -1
- package/dist/components/base/CustomScrollView/index.tsx +1 -1
- package/dist/components/base/InOrOutViewObserver/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/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/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.jd.ts +1 -1
- package/dist/open/api/index.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
- package/dist/common/jssdk.ts +0 -1
- package/dist/jumpEventReport/web.pc.ts +0 -1
- package/dist/wxapp/api/helper.js +0 -1
- package/dist/wxapp/components/launch-app/index.js +0 -1
- package/dist/wxapp/components/launch-app/index.json +0 -5
- 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 +0 -1
- package/dist/wxapp/components/subscribe-guider/index.js +0 -1
- package/dist/wxapp/components/subscribe-guider/index.json +0 -5
- package/dist/wxapp/components/subscribe-guider/index.wxml +0 -0
- package/dist/wxapp/components/subscribe-guider/index.wxss +0 -0
package/dist/open/api/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import * as device from './device'
|
|
2
1
|
device,
|
|
3
2
|
environment,
|
|
4
3
|
jump,
|
|
5
4
|
storage,
|
|
6
5
|
util,
|
|
7
6
|
moduleUtil,
|
|
8
7
|
track,
|
|
9
8
|
trackPromise,
|
|
10
9
|
global,
|
|
11
10
|
http,
|
|
12
11
|
fetchGateway,
|
|
13
12
|
fetchJsonp,
|
|
14
13
|
shopMember,
|
|
15
14
|
userToken,
|
|
16
15
|
TokenPlatform,
|
|
17
16
|
requestServer,
|
|
18
17
|
isvStorage,
|
|
18
|
+
import * as device from './device'
|
|
19
19
|
device,
|
|
20
20
|
environment,
|
|
21
21
|
jump,
|
|
22
22
|
storage,
|
|
23
23
|
util,
|
|
24
24
|
moduleUtil,
|
|
25
25
|
track,
|
|
26
26
|
trackPromise,
|
|
27
27
|
global,
|
|
28
28
|
http,
|
|
29
29
|
fetchGateway,
|
|
30
30
|
fetchJsonp,
|
|
31
31
|
shopMember,
|
|
32
32
|
userToken,
|
|
33
33
|
TokenPlatform,
|
|
34
34
|
requestServer,
|
|
35
35
|
isvStorage,
|
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, versionCompare,
|
|
62
62
|
CHANNEL_TYPE,
|
|
63
63
|
JDShopViewBusinessPathType,
|
|
64
64
|
JDShopViewBusinessPathList,
|
|
65
65
|
SECTION_HOME_TAB_NAME_TYPE,
|
|
66
66
|
parseQueryUrlString(window?.location?.href ?? ''),
|
|
67
67
|
try {
|
|
68
68
|
return JSON.parse(decodeURIComponent(getUrlQuery('cookie')))
|
|
69
69
|
} catch (e) {
|
|
70
70
|
return {}
|
|
71
71
|
}
|
|
72
72
|
isWxMiniH5View && urlCookie['wxapp_type'] == '1'
|
|
73
73
|
if (isJdApp) {
|
|
74
74
|
isIosDevice
|
|
75
75
|
? e && e.stopPropagation()
|
|
76
76
|
: androidDeviceStopNativeScrollEvent(state)
|
|
77
77
|
}
|
|
78
78
|
isJdApp &&
|
|
79
79
|
isAndroidDevice &&
|
|
80
80
|
window?.JdAndroid &&
|
|
81
81
|
window?.JdAndroid.requestEvent(state)
|
|
82
82
|
if (isH5AndJdShopView) {
|
|
83
83
|
return (
|
|
84
84
|
CHANNEL_TYPE[currentChannel] ||
|
|
85
85
|
CHANNEL_TYPE[JDShopViewBusinessPathType.HOME]
|
|
86
86
|
)
|
|
87
87
|
}
|
|
88
88
|
return null
|
|
89
89
|
isH5 && ['/app/home', '/app/classify', '/member/shopcard'].includes(urlPathname)
|
|
90
90
|
const getCustomObj = {
|
|
91
91
|
type: 1,
|
|
92
92
|
code: 'all',
|
|
93
93
|
cost1: 1,
|
|
94
94
|
...customObj
|
|
95
95
|
}
|
|
96
96
|
try {
|
|
97
97
|
window.__sgm__.custom(getCustomObj, '9HwAEg@fTtWBB3EnwA5VgLT')
|
|
98
98
|
} 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, 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
|
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,
|
|
182
181
|
isPc,
|
|
183
182
|
ipLoc_djd,
|
|
183
|
+
import Taro from '@tarojs/taro'
|
|
184
184
|
nativePageShowToast, ToastAndroidType,
|
|
185
185
|
ToastIosType,
|
|
186
186
|
getAppChannelType, isAndroidDevice, isH5AndJdShopView, isChartH5,
|
|
187
187
|
isH5AndJdShopViewNativeScroll, isIosDevice, isJdAndAndroidDevice, isJdAndIosDevice, isJdApp,
|
|
188
188
|
isWxApp, isWxMiniH5View, isH5AndJingGouMini, urlCookie,
|
|
189
189
|
sgmCustomReport, isMemberPage, isH5AndJdShopViewH5Scroll
|
|
190
190
|
addHttps,
|
|
191
191
|
clearTaroStorageKey,
|
|
192
192
|
countStringify,
|
|
193
193
|
dateFormat,
|
|
194
194
|
dealAddress,
|
|
195
195
|
dealShopContentData as originDealShopContentData,
|
|
196
196
|
debounce,
|
|
197
197
|
filterUrlQueryData,
|
|
198
198
|
formatTabActiveMenuType,
|
|
199
199
|
getQualityImage,
|
|
200
200
|
getTaroStorageKeyValue,
|
|
201
201
|
getWxAppCookieStr,
|
|
202
202
|
isH5,
|
|
203
203
|
isJdMin,
|
|
204
204
|
isWxMin,
|
|
205
205
|
isWxMinAndWxapp,
|
|
206
206
|
lodashThrottle,
|
|
207
207
|
objectToUrlEncode,
|
|
208
208
|
parseQueryUrlString,
|
|
209
209
|
removeTaroStorageKey,
|
|
210
210
|
setLowSmallPicUrl,
|
|
211
211
|
setTaroStorage,
|
|
212
212
|
showFailToast,
|
|
213
213
|
showNormalToast,
|
|
214
214
|
showSuccessToast,
|
|
215
215
|
sliceArrToChunkList,
|
|
216
216
|
throttle,
|
|
217
217
|
windowWidth: window.innerWidth,
|
|
218
218
|
containerWidth: buildType === BUILD_TYPE.CLASSIFY ? window.innerWidth - 100 : window.innerWidth,
|
|
219
219
|
screenWidth: window.innerWidth,
|
|
220
220
|
platform: '',
|
|
221
221
|
model: '',
|
|
222
222
|
system: '',
|
|
223
223
|
getSystemInfo.windowWidth = getSystemInfo.screenWidth
|
|
224
224
|
const params = Object.assign(
|
|
225
225
|
{},
|
|
226
226
|
{
|
|
227
227
|
title: '',
|
|
228
228
|
duration: 1500,
|
|
229
229
|
},
|
|
230
230
|
options,
|
|
231
231
|
)
|
|
232
232
|
params.duration = params.duration / 1000
|
|
233
233
|
if (isJdApp && isH5AndJdShopView) {
|
|
234
234
|
const showSuccessType = isIosDevice
|
|
235
235
|
? ToastIosType.SUCCESS
|
|
236
236
|
: ToastAndroidType.SUCCESS
|
|
237
237
|
const duration = isAndroidDevice ? 0 : params.duration
|
|
238
238
|
nativePageShowToast(options.title, showSuccessType, duration)
|
|
239
239
|
console.log('执行原生toast success')
|
|
240
240
|
} else {
|
|
241
241
|
showSuccessToast(options)
|
|
242
242
|
}
|
|
243
243
|
const params = Object.assign(
|
|
244
244
|
{},
|
|
245
245
|
{
|
|
246
246
|
title: '',
|
|
247
247
|
duration: 1500,
|
|
248
248
|
},
|
|
249
249
|
options,
|
|
250
250
|
)
|
|
251
251
|
params.duration = params.duration / 1000
|
|
252
252
|
console.log(`isJdApp${isJdApp}`)
|
|
253
253
|
if (isJdApp && isH5AndJdShopView) {
|
|
254
254
|
const showSuccessType = isIosDevice
|
|
255
255
|
? ToastIosType.FAIL
|
|
256
256
|
: ToastAndroidType.FAIL
|
|
257
257
|
const duration = isAndroidDevice ? 0 : params.duration
|
|
258
258
|
nativePageShowToast(options.title, showSuccessType, duration)
|
|
259
259
|
console.log('执行原生toast fail')
|
|
260
260
|
} else {
|
|
261
261
|
console.log('执行H5 toast fail')
|
|
262
262
|
showFailToast(options)
|
|
263
263
|
}
|
|
264
264
|
const params = Object.assign(
|
|
265
265
|
{},
|
|
266
266
|
{
|
|
267
267
|
title: '',
|
|
268
268
|
duration: 1500,
|
|
269
269
|
},
|
|
270
270
|
options,
|
|
271
271
|
)
|
|
272
272
|
params.duration = params.duration / 1000
|
|
273
273
|
if (isJdApp) {
|
|
274
274
|
const showSuccessType = isIosDevice
|
|
275
275
|
? ToastIosType.NORMAL
|
|
276
276
|
: ToastAndroidType.NORMAL
|
|
277
277
|
const duration = isAndroidDevice ? 0 : params.duration
|
|
278
278
|
nativePageShowToast(options.title, showSuccessType, duration)
|
|
279
279
|
} else {
|
|
280
280
|
showNormalToast(options)
|
|
281
281
|
}
|
|
282
282
|
const createLoadingEle = document.createElement('div')
|
|
283
283
|
createLoadingEle.id = 'J_shopLoading'
|
|
284
284
|
createLoadingEle.className = `d-shop-loading flexible-center-box ${customClassName}`
|
|
285
285
|
createLoadingEle.innerHTML = `<div class='d-loading-content'>
|
|
286
286
|
<span class='d-shop-loading-icon'></span>
|
|
287
287
|
<p class='d-shop-text'>${text}</p>
|
|
288
288
|
</div>`
|
|
289
289
|
const getEle = document.body ? document.body : document.getElementsByTagName('body')[0]
|
|
290
290
|
console.log('获取getEle及append及appendChild方法', getEle, getEle?.append, getEle?.appendChild)
|
|
291
291
|
getEle.appendChild(createLoadingEle)
|
|
292
292
|
const getEle = document.getElementById('J_shopLoading')
|
|
293
293
|
getEle && getEle.remove()
|
|
294
294
|
num,
|
|
295
295
|
widthSize = 375,
|
|
296
296
|
layoutWidth = getSystemInfo.windowWidth,
|
|
297
297
|
const getNum = Number(num)
|
|
298
298
|
return Math.round((getNum / widthSize) * layoutWidth)
|
|
299
299
|
const systemInfo: UtilsInterFace.taroGetSystemInfoSyncRes = getSystemInfo
|
|
300
300
|
if (!systemInfo.system && window) {
|
|
301
301
|
systemInfo.system = window.navigator.userAgent
|
|
302
302
|
systemInfo.isChrome = !!systemInfo?.system.match(/chrome/i)
|
|
303
303
|
}
|
|
304
304
|
const isIOS = !!systemInfo?.system.match(/ios/i)
|
|
305
305
|
const isAndroid = !!systemInfo?.system.match(/android/i)
|
|
306
306
|
systemInfo.navBarHeight = 0
|
|
307
307
|
systemInfo.statusBarHeight = 0
|
|
308
308
|
systemInfo.capsulePosition = null
|
|
309
309
|
systemInfo.isIOS = isIOS
|
|
310
310
|
systemInfo.isAndroid = isAndroid
|
|
311
311
|
return systemInfo
|
|
312
312
|
return originDealShopContentData(pageData, sgmCustomReport, isvdev)
|
|
313
313
|
isJdApp,
|
|
314
314
|
isWxApp,
|
|
315
315
|
isIosDevice,
|
|
316
316
|
isAndroidDevice,
|
|
317
317
|
isJdAndIosDevice,
|
|
318
318
|
isJdAndAndroidDevice,
|
|
319
319
|
isWxMin,
|
|
320
320
|
isWxMinAndWxapp,
|
|
321
321
|
isJdMin,
|
|
322
322
|
isH5,
|
|
323
323
|
isH5AndJdShopView,
|
|
324
324
|
isChartH5,
|
|
325
325
|
isH5AndJdShopViewNativeScroll,
|
|
326
326
|
isH5AndJdShopViewH5Scroll,
|
|
327
327
|
isH5AndJingGouMini,
|
|
328
328
|
isWxMiniH5View,
|
|
329
329
|
urlCookie,
|
|
330
330
|
sliceArrToChunkList,
|
|
331
331
|
dealAddress,
|
|
332
332
|
objectToUrlEncode,
|
|
333
333
|
parseQueryUrlString,
|
|
334
334
|
setLowSmallPicUrl,
|
|
335
335
|
setTaroStorage,
|
|
336
336
|
getTaroStorageKeyValue,
|
|
337
337
|
removeTaroStorageKey,
|
|
338
338
|
clearTaroStorageKey,
|
|
339
339
|
getQualityImage,
|
|
340
340
|
countStringify,
|
|
341
341
|
getWxAppCookieStr,
|
|
342
342
|
getSystemInfos,
|
|
343
343
|
pxTransformFromData,
|
|
344
344
|
dealShopContentDataAndReport as dealShopContentData,
|
|
345
345
|
dateFormat,
|
|
346
346
|
throttle,
|
|
347
347
|
lodashThrottle,
|
|
348
348
|
debounce,
|
|
349
349
|
addHttps,
|
|
350
350
|
commonShowSuccessToast as showSuccessToast,
|
|
351
351
|
commonShowFailToast as showFailToast,
|
|
352
352
|
commonShowNormalToast as showNormalToast,
|
|
353
353
|
showShopLoading,
|
|
354
354
|
hideShopLoading,
|
|
355
355
|
getAppChannelType,
|
|
356
356
|
formatTabActiveMenuType,
|
|
357
357
|
filterUrlQueryData,
|
|
358
358
|
sgmCustomReport,
|
|
359
359
|
isMemberPage,
|
|
360
360
|
memberFormatUtils,
|
|
361
361
|
getFloorDataToDataDefines
|
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
|
isChartH5,
|
|
8
7
|
isH5AndJdShopViewH5Scroll,
|
|
9
8
|
isH5AndJingGouMini,
|
|
10
9
|
urlCookie,
|
|
11
10
|
isMemberPage,
|
|
12
11
|
isPc,
|
|
13
12
|
ipLoc_djd,
|
|
13
|
+
import {
|
|
14
14
|
isChartH5,
|
|
15
15
|
isH5AndJdShopViewH5Scroll,
|
|
16
16
|
isMemberPage,
|
|
17
17
|
sgmCustomReport
|
|
18
18
|
isChartH5,
|
|
19
19
|
isH5AndJdShopViewH5Scroll,
|
|
20
20
|
isH5AndJingGouMini,
|
|
21
21
|
urlCookie,
|
|
22
22
|
isMemberPage,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
2
1
|
isChartH5,
|
|
3
2
|
isH5AndJdShopViewH5Scroll,
|
|
4
3
|
sgmCustomReport,
|
|
5
4
|
isMemberPage,
|
|
6
5
|
isAppClassifyPage
|
|
7
6
|
isH5AndJdShopViewH5Scroll,
|
|
8
7
|
isH5AndJingGouMini,
|
|
9
8
|
urlCookie,
|
|
10
9
|
isMemberPage,
|
|
11
10
|
isAppClassifyPage
|
|
11
|
+
import {
|
|
12
12
|
isChartH5,
|
|
13
13
|
isH5AndJdShopViewH5Scroll,
|
|
14
14
|
sgmCustomReport,
|
|
15
15
|
isMemberPage
|
|
16
16
|
isH5AndJdShopViewH5Scroll,
|
|
17
17
|
isH5AndJingGouMini,
|
|
18
18
|
urlCookie,
|
|
19
19
|
isMemberPage,
|
package/dist/utils/utils.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import Taro from '@tarojs/taro'
|
|
2
1
|
const getValue = `${obj[key]}`.replace(/undefined/,'').replace(/null/,'')
|
|
3
2
|
paramStr += `${index === 0 ? '' : '&'}${key}=${encodeURIComponent(getValue)}`
|
|
4
3
|
if(!imgUrl.includes('360buyimg.com')){
|
|
5
4
|
imgUrl = '//m.360buyimg.com/cms/' + imgUrl
|
|
6
5
|
}
|
|
7
6
|
if(quality != 100) imgUrl += /\.png/.test(imgUrl) ? '.dpg' : `!q${quality}`
|
|
8
7
|
pin?: string
|
|
9
8
|
visitkey?: string
|
|
10
9
|
[key: string]: any
|
|
11
10
|
}
|
|
12
11
|
jdpin,
|
|
13
12
|
pinStatus,
|
|
14
13
|
visitkey,
|
|
15
14
|
unionid,
|
|
16
15
|
skey,
|
|
17
16
|
__jda,
|
|
18
17
|
__jdv,
|
|
19
18
|
__wga,
|
|
20
19
|
wxapp_type,
|
|
21
20
|
appType
|
|
22
21
|
} = cookie
|
|
23
22
|
const getUserCookieObj = {}
|
|
24
23
|
jdpin,
|
|
25
24
|
pinStatus,
|
|
26
25
|
visitkey,
|
|
27
26
|
unionid,
|
|
28
27
|
skey,
|
|
29
28
|
__jda,
|
|
30
29
|
__jdv,
|
|
31
30
|
__wga,
|
|
32
31
|
wid,
|
|
33
32
|
wq_skey,
|
|
34
33
|
wq_uin,
|
|
35
34
|
wq_auth_token,
|
|
36
35
|
wxapp_scene,
|
|
37
36
|
wq_unionid,
|
|
38
37
|
wxapp_openid,
|
|
39
38
|
wxapp_version,
|
|
40
39
|
wxapp_type,
|
|
41
40
|
appType
|
|
42
41
|
name = name === 'jdpin' ? 'pin' : name;
|
|
43
42
|
name === 'pin' && (ret.push(`pt_pin=${encodeURIComponent(value)}`))
|
|
44
43
|
ret.push(`${name}=${encodeURIComponent(value)}`)
|
|
45
44
|
getUserCookieObj[name] = value
|
|
46
45
|
}
|
|
47
46
|
wqCookie: getUserCookieObj
|
|
48
47
|
exceptionReportFn
|
|
49
48
|
if(getFloorData?.floorExtInfo?.floorLoadWay === 2){
|
|
50
49
|
const getSysFloorToLoadTypeRes = isIsvFloorUseable(getFloorData, exceptionReportFn)
|
|
51
50
|
!getSysFloorToLoadTypeRes && (getFloorData.floorExtInfo.floorLoadWay = 1)
|
|
52
51
|
}
|
|
53
52
|
const isIsvContainer = (containerId, floorListData, containerListData) => {
|
|
54
53
|
const objContainer = containerListData.find(item => item.containerId === containerId)
|
|
55
54
|
(itemUid) => {
|
|
56
55
|
const objectFloor = floorListData.find(floorItem => itemUid === floorItem.uid)
|
|
57
56
|
return RemoteLoadFloorList.includes(objectFloor?.floorExtInfo?.moduleFlag)
|
|
58
57
|
}
|
|
59
58
|
)?? false
|
|
60
59
|
isChartH5,
|
|
61
60
|
isH5AndJdShopViewH5Scroll,
|
|
62
61
|
isMemberPage,
|
|
63
62
|
isPc,
|
|
64
63
|
ipLoc_djd,
|
|
64
|
+
import Taro from '@tarojs/taro'
|
|
65
65
|
const getValue = `${obj[key]}`.replace(/undefined/,'').replace(/null/,'')
|
|
66
66
|
paramStr += `${index === 0 ? '' : '&'}${key}=${encodeURIComponent(getValue)}`
|
|
67
67
|
if(!imgUrl.includes('360buyimg.com')){
|
|
68
68
|
imgUrl = '//m.360buyimg.com/cms/' + imgUrl
|
|
69
69
|
}
|
|
70
70
|
if(quality != 100) imgUrl += /\.png/.test(imgUrl) ? '.dpg' : `!q${quality}`
|
|
71
71
|
pin?: string
|
|
72
72
|
visitkey?: string
|
|
73
73
|
[key: string]: any
|
|
74
74
|
}
|
|
75
75
|
jdpin,
|
|
76
76
|
pinStatus,
|
|
77
77
|
visitkey,
|
|
78
78
|
unionid,
|
|
79
79
|
skey,
|
|
80
80
|
__jda,
|
|
81
81
|
__jdv,
|
|
82
82
|
__wga,
|
|
83
83
|
wxapp_type,
|
|
84
84
|
appType
|
|
85
85
|
} = cookie
|
|
86
86
|
const getUserCookieObj = {}
|
|
87
87
|
jdpin,
|
|
88
88
|
pinStatus,
|
|
89
89
|
visitkey,
|
|
90
90
|
unionid,
|
|
91
91
|
skey,
|
|
92
92
|
__jda,
|
|
93
93
|
__jdv,
|
|
94
94
|
__wga,
|
|
95
95
|
wid,
|
|
96
96
|
wq_skey,
|
|
97
97
|
wq_uin,
|
|
98
98
|
wq_auth_token,
|
|
99
99
|
wxapp_scene,
|
|
100
100
|
wq_unionid,
|
|
101
101
|
wxapp_openid,
|
|
102
102
|
wxapp_version,
|
|
103
103
|
wxapp_type,
|
|
104
104
|
appType
|
|
105
105
|
name = name === 'jdpin' ? 'pin' : name;
|
|
106
106
|
name === 'pin' && (ret.push(`pt_pin=${encodeURIComponent(value)}`))
|
|
107
107
|
ret.push(`${name}=${encodeURIComponent(value)}`)
|
|
108
108
|
getUserCookieObj[name] = value
|
|
109
109
|
}
|
|
110
110
|
wqCookie: getUserCookieObj
|
|
111
111
|
exceptionReportFn
|
|
112
112
|
const isIsvContainer = (containerId, floorListData, containerListData) => {
|
|
113
113
|
const objContainer = containerListData.find(item => item.containerId === containerId)
|
|
114
114
|
(itemUid) => {
|
|
115
115
|
const objectFloor = floorListData.find(floorItem => itemUid === floorItem.uid)
|
|
116
116
|
return RemoteLoadFloorList.includes(objectFloor?.floorExtInfo?.moduleFlag)
|
|
117
117
|
}
|
|
118
118
|
)?? false
|
|
119
119
|
isChartH5,
|
|
120
120
|
isH5AndJdShopViewH5Scroll,
|
|
121
121
|
isMemberPage,
|
|
122
122
|
sgmCustomReport
|
package/package.json
CHANGED
package/dist/common/jssdk.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import ready from '../utils/ready'
|
|
2
|
return new Promise((resolve, reject) => {
|
|
3
1
|
ready('jmfe', timeout)
|
|
4
2
|
.then(() => {
|
|
5
3
|
registerCode(JSSDK_APP_WEBVIEW_CODE)
|
|
6
4
|
resolve(window.jmfe)
|
|
7
5
|
})
|
|
8
6
|
.catch(() => {
|
|
9
7
|
console.log('window.jmfe不存在')
|
|
10
8
|
reject(null)
|
|
11
9
|
})
|
|
12
10
|
})
|
|
13
11
|
if (jmfe) {
|
|
14
12
|
console.log('registerCode:', code)
|
|
15
13
|
jmfe.registerCode(code)
|
|
16
14
|
} else {
|
|
17
15
|
console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js')
|
|
18
16
|
}
|