@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { dateFormat, getRandom, JSONParse } from '../utils/utils'
|
|
2
|
const dateStr = dateFormat(new Date(), 'yyyyMMddHHmmss')
|
|
1
3
|
const randomStr = getRandom(100000, 999999)
|
|
2
4
|
const callbackName = `${prefix}_CallBack_${dateStr}_${randomStr}`
|
|
3
5
|
return callbackName
|
|
4
6
|
return new Promise((resolve, reject) => {
|
|
5
7
|
if (window.XWebView && window.XWebView.callNative) {
|
|
6
8
|
const callbackName = getCallBackName('hasBgAudio')
|
|
7
9
|
window[callbackName] = function(result: any) {
|
|
8
10
|
const parsedData = JSONParse(result)
|
|
9
11
|
if (parsedData && parsedData.hasOwnProperty('data')) {
|
|
10
12
|
resolve(parsedData.data)
|
|
11
13
|
} else {
|
|
12
14
|
console.log('hasBgAudio error result:', result)
|
|
13
15
|
reject({
|
|
14
16
|
code: -2,
|
|
15
17
|
message: 'hasBgAudio error: result is not available',
|
|
16
18
|
})
|
|
17
19
|
}
|
|
18
20
|
window[callbackName] = null
|
|
19
21
|
delete window[callbackName]
|
|
20
22
|
}
|
|
21
23
|
let jsonStr = {}
|
|
22
24
|
window.XWebView.callNative(
|
|
23
25
|
'JDPlayerJSPlugin',
|
|
24
26
|
'hasBgAudio',
|
|
25
27
|
JSON.stringify(jsonStr),
|
|
26
28
|
callbackName,
|
|
27
29
|
'',
|
|
28
30
|
)
|
|
29
31
|
} else {
|
|
30
32
|
reject({
|
|
31
33
|
code: -1,
|
|
32
34
|
message: 'hasBgAudio error: XWebView.callNative is not defined',
|
|
33
35
|
})
|
|
34
36
|
}
|
|
35
37
|
})
|
|
36
38
|
return new Promise((resolve, reject) => {
|
|
37
39
|
if (window.XWebView && window.XWebView.callNative) {
|
|
38
40
|
const callbackName = getCallBackName('pauseBgAudio')
|
|
39
41
|
window[callbackName] = function(result: any) {
|
|
40
42
|
const parsedData = JSONParse(result)
|
|
41
43
|
if (parsedData && parsedData.hasOwnProperty('data')) {
|
|
42
44
|
resolve(parsedData.data)
|
|
43
45
|
} else {
|
|
44
46
|
console.log('pauseBgAudio error result:', result)
|
|
45
47
|
reject({
|
|
46
48
|
code: -2,
|
|
47
49
|
message: 'pauseBgAudio error: result is not available',
|
|
48
50
|
})
|
|
49
51
|
}
|
|
50
52
|
window[callbackName] = null
|
|
51
53
|
delete window[callbackName]
|
|
52
54
|
}
|
|
53
55
|
let jsonStr = {}
|
|
54
56
|
window.XWebView.callNative(
|
|
55
57
|
'JDPlayerJSPlugin',
|
|
56
58
|
'pauseBgAudio',
|
|
57
59
|
JSON.stringify(jsonStr),
|
|
58
60
|
callbackName,
|
|
59
61
|
'',
|
|
60
62
|
)
|
|
61
63
|
} else {
|
|
62
64
|
reject({
|
|
63
65
|
code: -1,
|
|
64
66
|
message: 'pauseBgAudio error: XWebView.callNative is not defined',
|
|
65
67
|
})
|
|
66
68
|
}
|
|
67
69
|
})
|
|
68
70
|
return new Promise((resolve, reject) => {
|
|
69
71
|
if (window.XWebView && window.XWebView.callNative) {
|
|
70
72
|
const callbackName = getCallBackName('resumeBgAudio')
|
|
71
73
|
window[callbackName] = function(result: any) {
|
|
72
74
|
const parsedData = JSONParse(result)
|
|
73
75
|
if (parsedData && parsedData.hasOwnProperty('data')) {
|
|
74
76
|
resolve(parsedData.data)
|
|
75
77
|
} else {
|
|
76
78
|
console.log('resumeBgAudio error result:', result)
|
|
77
79
|
reject({
|
|
78
80
|
code: -2,
|
|
79
81
|
message: 'resumeBgAudio error: result is not available',
|
|
80
82
|
})
|
|
81
83
|
}
|
|
82
84
|
window[callbackName] = null
|
|
83
85
|
delete window[callbackName]
|
|
84
86
|
}
|
|
85
87
|
let jsonStr = {}
|
|
86
88
|
window.XWebView.callNative(
|
|
87
89
|
'JDPlayerJSPlugin',
|
|
88
90
|
'resumeBgAudio',
|
|
89
91
|
JSON.stringify(jsonStr),
|
|
90
92
|
callbackName,
|
|
91
93
|
'',
|
|
92
94
|
)
|
|
93
95
|
} else {
|
|
94
96
|
reject({
|
|
95
97
|
code: -1,
|
|
96
98
|
message: 'resumeBgAudio error: XWebView.callNative is not defined',
|
|
97
99
|
})
|
|
98
100
|
}
|
|
99
101
|
})
|
|
100
102
|
return new Promise((resolve, reject) => {
|
|
101
103
|
if (window.XWebView && window.XWebView.callNative) {
|
|
102
104
|
const callbackName = getCallBackName('getWifiVideoAutoPlay')
|
|
103
105
|
window[callbackName] = function(result: any) {
|
|
104
106
|
const parsedData = JSONParse(result)
|
|
105
107
|
if (parsedData && parsedData.hasOwnProperty('data')) {
|
|
106
108
|
resolve(parsedData.data)
|
|
107
109
|
} else {
|
|
108
110
|
console.log('getWifiVideoAutoPlay error result:', result)
|
|
109
111
|
reject({
|
|
110
112
|
code: -2,
|
|
111
113
|
message: 'getWifiVideoAutoPlay error: result is not available',
|
|
112
114
|
})
|
|
113
115
|
}
|
|
114
116
|
window[callbackName] = null
|
|
115
117
|
delete window[callbackName]
|
|
116
118
|
}
|
|
117
119
|
let jsonStr = {}
|
|
118
120
|
window.XWebView.callNative(
|
|
119
121
|
'JDPlayerJSPlugin',
|
|
120
122
|
'actionIsWifiVideoAutoPlay',
|
|
121
123
|
JSON.stringify(jsonStr),
|
|
122
124
|
callbackName,
|
|
123
125
|
'',
|
|
124
126
|
)
|
|
125
127
|
} else {
|
|
126
128
|
reject({
|
|
127
129
|
code: -1,
|
|
128
130
|
message:
|
|
129
131
|
'getWifiVideoAutoPlay error: XWebView.callNative is not defined',
|
|
130
132
|
})
|
|
131
133
|
}
|
|
132
134
|
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import * as WXAPP_LOGIN from '../wxapp/common/login/login.js'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
code: 'isvModuleError',
|
|
3
2
|
msg: opt,
|
|
4
3
|
})
|
|
5
4
|
if(this.props.customErrorIsvFloorModule){
|
|
6
5
|
return this.props.customErrorIsvFloorModule
|
|
7
6
|
}
|
|
7
|
+
import React from 'react'
|
|
8
8
|
const floorLoadWay = floorData?.floorExtInfo?.floorLoadWay
|
|
9
9
|
const isRemoteLoadFloor = floorLoadWay === 2
|
|
10
10
|
msg: `店铺h5楼层隐藏不显示。原因:模块js执行异常,楼层过滤。`,
|
|
11
11
|
floorIdx: floorData?.floorIdx,
|
|
12
12
|
moduleDesignerType: floorData?.floorExtInfo?.moduleDesignerType,
|
|
13
13
|
floorLoadWay,
|
|
14
14
|
floorKind: floorData?.floorExtInfo?.floorKind,
|
|
15
15
|
}
|
|
16
16
|
code: getSgmCustomCode(isRemoteLoadFloor ? SgmCustomCode.REMOTEMODULE_JS : SgmCustomCode.SYSTEMMODULE_JS),
|
|
17
17
|
msg: opt,
|
|
18
18
|
})
|
|
19
19
|
if(this.props.customErrorIsvFloorModule){
|
|
20
20
|
return this.props.customErrorIsvFloorModule
|
|
21
21
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
return (
|
|
1
3
|
<ScrollView
|
|
2
4
|
scrollX
|
|
3
5
|
enhanced
|
|
4
6
|
showScrollbar={false}
|
|
5
7
|
{...otherProps}
|
|
6
8
|
className={classNames(
|
|
7
9
|
className,
|
|
8
10
|
{
|
|
9
11
|
[customScrollViewStyle[
|
|
10
12
|
'd-custom-ios-mini-extend-border-radius'
|
|
11
13
|
]]:
|
|
12
14
|
isIosDevice &&
|
|
13
15
|
isJdMin &&
|
|
14
16
|
scrollX &&
|
|
15
17
|
style['borderRadius'],
|
|
16
18
|
},
|
|
17
19
|
{
|
|
18
20
|
[customScrollViewStyle[
|
|
19
21
|
'd-custom-ios-h5-extend-border-radius'
|
|
20
22
|
]]: isIosDevice,
|
|
21
23
|
},
|
|
22
24
|
{
|
|
23
25
|
[customScrollViewStyle['d-custom-mini-hide-scroll']]:
|
|
24
26
|
isJdMin,
|
|
25
27
|
},
|
|
26
28
|
)}
|
|
27
29
|
style={style}
|
|
28
30
|
>
|
|
29
31
|
{children}
|
|
30
32
|
</ScrollView>
|
|
31
33
|
)
|