@conecli/cone-render 0.9.1-shop2.8 → 0.10.1-beta.0
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/assets/icon_blue_info.svg +1 -0
- package/dist/common/const.ts +1 -1
- package/dist/common/environmentType.ts +1 -0
- package/dist/common/index.h5.ts +1 -1
- package/dist/common/index.jd.ts +1 -1
- package/dist/common/index.ts +1 -1
- package/dist/common/index.weapp.ts +1 -1
- package/dist/common/jdplayerSdk.ts +1 -0
- package/dist/common/sgmCustomCode.ts +1 -0
- package/dist/common/wxappApi.jd.ts +1 -0
- package/dist/components/ErrorBoundary.tsx +1 -1
- package/dist/components/base/CustomScrollView/index.jd.tsx +1 -0
- package/dist/components/base/CustomScrollView/index.module.scss +7 -0
- package/dist/components/base/CustomVideo/index.tsx +1 -1
- package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
- package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
- package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
- package/dist/components/base/NetworkDataError/index.tsx +1 -1
- package/dist/components/debug/DebugLayout/index.module.scss +67 -0
- package/dist/components/debug/DebugLayout/index.tsx +1 -0
- package/dist/components/debug/DebugLayout/utils.ts +1 -0
- package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
- package/dist/components/floorItem.jd.tsx +1 -1
- package/dist/components/floorItem.weapp.tsx +1 -1
- package/dist/components/isv/Floor/index.tsx +1 -1
- package/dist/components/remoteFloorItem.tsx +1 -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/interface/utils.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.jd.ts +1 -1
- package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
- package/dist/jumpEventReport/web.jxwxapp.ts +1 -0
- package/dist/jumpEventReport/web.tjapp.ts +1 -0
- package/dist/jumpEventReport/web.tjm.ts +1 -0
- 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/sass/app.h5.scss +5 -0
- package/dist/service/requestServer.ts +1 -1
- package/dist/utils/connectNativeJsBridge.ts +1 -1
- package/dist/utils/draExceptionAndProfile.ts +1 -1
- package/dist/utils/h5Utils.ts +1 -1
- package/dist/utils/index.h5.ts +1 -1
- package/dist/utils/index.ts +1 -1
- package/dist/utils/index.weapp.ts +1 -1
- package/dist/utils/jm-common.js +1 -1
- package/dist/utils/sgmCodeUtils.ts +1 -0
- package/dist/utils/utils.ts +1 -1
- package/package.json +42 -39
- package/dist/customHooks/useDocumentVisibilitychange.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import JdDraProfileAndException from
|
|
1
|
+
import JdDraProfileAndException from './jm-js-agent-jd-profile'
|
|
2
2
|
JdDraProfileAndException.jdProfiler.init({
|
|
3
3
|
flag: 149,
|
|
4
4
|
autoReport: true,
|
|
5
5
|
autoAddApiReport: true,
|
|
6
6
|
})
|
|
7
7
|
JdDraProfileAndException.JSAgent.init({
|
|
8
8
|
flag: 149,
|
|
9
9
|
rate: 1,
|
|
10
10
|
ignoreErrors: [],
|
|
11
11
|
ignoreUrls: [],
|
|
12
12
|
})
|
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
|
versionCompare,
|
|
14
13
|
CHANNEL_TYPE,
|
|
15
14
|
JDShopViewBusinessPathType,
|
|
16
15
|
JDShopViewBusinessPathList,
|
|
17
16
|
SECTION_HOME_TAB_NAME_TYPE,
|
|
18
17
|
SECTION_HOME_TAB_TYPE,
|
|
19
18
|
parseQueryUrlString(window?.location?.href ?? ''),
|
|
20
19
|
try {
|
|
21
20
|
return JSON.parse(decodeURIComponent(getUrlQuery('cookie')))
|
|
22
21
|
} catch (e) {
|
|
23
22
|
return {}
|
|
24
23
|
}
|
|
25
24
|
isWxMiniH5View && urlCookie['wxapp_type'] == '1'
|
|
26
25
|
if (isJdApp) {
|
|
27
26
|
isIosDevice
|
|
28
27
|
? e && e.stopPropagation()
|
|
29
28
|
: androidDeviceStopNativeScrollEvent(state)
|
|
30
29
|
}
|
|
31
30
|
isJdApp &&
|
|
32
31
|
isAndroidDevice &&
|
|
33
32
|
window?.JdAndroid &&
|
|
34
33
|
window?.JdAndroid.requestEvent(state)
|
|
35
34
|
if (isH5AndJdShopView) {
|
|
36
35
|
return (
|
|
37
36
|
CHANNEL_TYPE[currentChannel] ||
|
|
38
37
|
CHANNEL_TYPE[JDShopViewBusinessPathType.HOME]
|
|
39
38
|
)
|
|
40
39
|
}
|
|
41
40
|
return null
|
|
42
41
|
isH5 && isJdApp && ['/app/home', '/app/classify', '/member/shopcard','/favorite/list', '/favorite/home'].includes(urlPathname)
|
|
43
42
|
isH5 && isJdApp && !['/app/home'].includes(urlPathname)
|
|
44
43
|
return isJdApp ? versionCompare(nowVersion, compareVersion) : -2
|
|
45
44
|
const getCustomObj = {
|
|
46
45
|
type: 1,
|
|
47
46
|
code: 'all',
|
|
48
47
|
cost1: 1,
|
|
49
48
|
...customObj
|
|
50
49
|
}
|
|
51
50
|
try {
|
|
52
51
|
window.__sgm__.custom(getCustomObj, '9HwAEg@fTtWBB3EnwA5VgLT')
|
|
53
52
|
} catch (e) {}
|
|
54
53
|
if(isJdAndAndroidDevice && typeof displayObj === 'object'){
|
|
55
54
|
const deviceRatio = window?.devicePixelRatio
|
|
56
55
|
Object.keys(displayObj).forEach(key => {
|
|
57
56
|
if(key === 'nativeHeaderHeight'){
|
|
58
57
|
displayObj[key] = Math.ceil(displayObj[key] / (deviceRatio * deviceRatio) - 2)
|
|
59
58
|
}else {
|
|
60
59
|
displayObj[key] = Math.ceil(displayObj[key] / deviceRatio)
|
|
61
60
|
}
|
|
62
61
|
})
|
|
63
62
|
}
|
|
64
63
|
return displayObj
|
|
64
|
+
import {
|
|
65
65
|
isApp,
|
|
66
66
|
isIOS,
|
|
67
67
|
getAppVersion,
|
|
68
68
|
version,
|
|
69
69
|
getUUID,
|
|
70
70
|
getUrlQuery,
|
|
71
71
|
assign,
|
|
72
72
|
isString,
|
|
73
73
|
isObject,
|
|
74
74
|
serialize,
|
|
75
75
|
isAndroid,
|
|
76
76
|
versionCompare,
|
|
77
77
|
CHANNEL_TYPE,
|
|
78
78
|
JDShopViewBusinessPathType,
|
|
79
79
|
JDShopViewBusinessPathList,
|
|
80
80
|
SECTION_HOME_TAB_NAME_TYPE,
|
|
81
81
|
SECTION_HOME_TAB_TYPE,
|
|
82
82
|
parseQueryUrlObj,
|
|
83
83
|
if (window?.__sgm__) {
|
|
84
84
|
resolve(true)
|
|
85
85
|
} else {
|
|
86
86
|
if (isSgmReadyError) {
|
|
87
87
|
console.log("当前sgm初始化失败")
|
|
88
88
|
reject(false)
|
|
89
89
|
} else {
|
|
90
90
|
ready('__sgm__', 2000).then(() => {
|
|
91
91
|
isSgmReadyError = false
|
|
92
92
|
console.log("当前sgm初始化成功")
|
|
93
93
|
resolve(true)
|
|
94
94
|
}).catch(() => {
|
|
95
95
|
isSgmReadyError = true
|
|
96
96
|
console.log("当前sgm初始化失败")
|
|
97
97
|
reject(false)
|
|
98
98
|
})
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
try {
|
|
102
102
|
return JSON.parse(decodeURIComponent(getUrlQuery('cookie')))
|
|
103
103
|
} catch (e) {
|
|
104
104
|
return {}
|
|
105
105
|
}
|
|
106
106
|
isWxMiniH5View && urlCookie['wxapp_type'] == '1'
|
|
107
107
|
if (isH5AdnJxMini) {
|
|
108
108
|
return 'jxxcx'
|
|
109
109
|
} else if (isTJApp) {
|
|
110
110
|
return 'tjapp'
|
|
111
111
|
} else if (isTjM) {
|
|
112
112
|
return 'tjm'
|
|
113
113
|
} else if (isTjJxM) {
|
|
114
114
|
return 'jxh5'
|
|
115
115
|
}
|
|
116
116
|
return ''
|
|
117
117
|
if (isJdApp) {
|
|
118
118
|
isIosDevice
|
|
119
119
|
? e && e.stopPropagation()
|
|
120
120
|
: androidDeviceStopNativeScrollEvent(state)
|
|
121
121
|
}
|
|
122
122
|
isJdApp &&
|
|
123
123
|
isAndroidDevice &&
|
|
124
124
|
window?.JdAndroid &&
|
|
125
125
|
window?.JdAndroid.requestEvent(state)
|
|
126
126
|
if (isH5AndJdShopView) {
|
|
127
127
|
return (
|
|
128
128
|
CHANNEL_TYPE[currentChannel] ||
|
|
129
129
|
CHANNEL_TYPE[JDShopViewBusinessPathType.HOME]
|
|
130
130
|
)
|
|
131
131
|
}
|
|
132
132
|
return null
|
|
133
133
|
isH5 && isJdApp && ['/app/home', '/app/classify', '/member/shopcard','/favorite/list', '/favorite/home'].includes(urlPathname)
|
|
134
134
|
isH5 && isJdApp && !['/app/home'].includes(urlPathname)
|
|
135
135
|
return isJdApp ? versionCompare(nowVersion, compareVersion) : -2
|
|
136
136
|
getSgmReadyPromise().then(() => {
|
|
137
137
|
const getCustomObj = {
|
|
138
138
|
type: 1,
|
|
139
139
|
code: 'all',
|
|
140
140
|
cost1: 1,
|
|
141
141
|
...customObj
|
|
142
142
|
}
|
|
143
143
|
try {
|
|
144
144
|
window.__sgm__.custom(getCustomObj, '9HwAEg@fTtWBB3EnwA5VgLT')
|
|
145
145
|
} catch (e) {
|
|
146
146
|
console.log("当前sgm上报异常, 原始数据为",JSON.stringify(customObj))
|
|
147
147
|
}
|
|
148
148
|
}).catch(() => {
|
|
149
149
|
console.error("当前页面sgm加载异常,无法进行异常上报, 原始数据为",JSON.stringify(customObj))
|
|
150
150
|
})
|
|
151
151
|
if(isJdAndAndroidDevice && typeof displayObj === 'object'){
|
|
152
152
|
const deviceRatio = window?.devicePixelRatio
|
|
153
153
|
Object.keys(displayObj).forEach(key => {
|
|
154
154
|
if(key === 'nativeHeaderHeight'){
|
|
155
155
|
displayObj[key] = Math.ceil(displayObj[key] / (deviceRatio * deviceRatio) - 2)
|
|
156
156
|
}else {
|
|
157
157
|
displayObj[key] = Math.ceil(displayObj[key] / deviceRatio)
|
|
158
158
|
}
|
|
159
159
|
})
|
|
160
160
|
}
|
|
161
161
|
return displayObj
|