@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 {
|
|
2
1
|
isChartH5,
|
|
3
2
|
isH5AndJdShopViewH5Scroll,
|
|
4
3
|
isH5AndJdShopH5CustomScrollView,
|
|
5
4
|
sgmCustomReport,
|
|
6
5
|
isOpenJdAppUrl,
|
|
7
6
|
jdOpenAppParams,
|
|
8
7
|
createJdOpenAppUrl,
|
|
9
8
|
isEmpty,
|
|
10
9
|
getJdAppReportPageSource,
|
|
11
10
|
isMemberPage,
|
|
12
11
|
isAppClassifyPage,
|
|
13
12
|
dealJdOpenAppData,
|
|
14
13
|
jdAppVersionCompare,
|
|
15
14
|
dealNativePixelToCssPixel
|
|
16
15
|
isJdAndHarmonyDevice,
|
|
17
16
|
isJdAndroidX5Core,
|
|
18
17
|
isH5AndJdShopViewH5Scroll,
|
|
19
18
|
isH5AndJdShopH5CustomScrollView,
|
|
20
19
|
isH5AndJingGouMini,
|
|
21
20
|
urlCookie,
|
|
22
21
|
sgmCustomReport,
|
|
23
22
|
isOpenJdAppUrl,
|
|
24
23
|
jdOpenAppParams,
|
|
25
24
|
createJdOpenAppUrl,
|
|
26
25
|
isEmpty,
|
|
27
26
|
getJdAppReportPageSource,
|
|
28
27
|
isMemberPage,
|
|
29
28
|
isAppClassifyPage,
|
|
30
29
|
dealJdOpenAppData,
|
|
31
30
|
jdAppVersionCompare,
|
|
32
31
|
dealNativePixelToCssPixel
|
|
32
|
+
import {
|
|
33
33
|
isJdApp,
|
|
34
34
|
isWxApp,
|
|
35
35
|
isIosDevice,
|
|
36
36
|
isAndroidDevice,
|
|
37
37
|
isJdAndIosDevice,
|
|
38
38
|
isJdAndAndroidDevice,
|
|
39
39
|
isWxMin,
|
|
40
40
|
isWxMinAndWxapp,
|
|
41
41
|
isJdMin,
|
|
42
42
|
isH5,
|
|
43
43
|
isH5AndJdShopView,
|
|
44
44
|
isChartH5,
|
|
45
45
|
isH5AndJdShopViewNativeScroll,
|
|
46
46
|
isH5AndJdShopViewH5Scroll,
|
|
47
47
|
isH5AndJdShopH5CustomScrollView,
|
|
48
48
|
isWxMiniH5View,
|
|
49
49
|
sliceArrToChunkList,
|
|
50
50
|
dealAddress,
|
|
51
51
|
objectToUrlEncode,
|
|
52
52
|
parseQueryUrlString,
|
|
53
53
|
setLowSmallPicUrl,
|
|
54
54
|
setTaroStorage,
|
|
55
55
|
getTaroStorageKeyValue,
|
|
56
56
|
removeTaroStorageKey,
|
|
57
57
|
clearTaroStorageKey,
|
|
58
58
|
getQualityImage,
|
|
59
59
|
countStringify,
|
|
60
60
|
getSystemInfos,
|
|
61
61
|
getWxAppCookieStr,
|
|
62
62
|
pxTransformFromData,
|
|
63
63
|
dealShopContentData,
|
|
64
64
|
dateFormat,
|
|
65
65
|
throttle,
|
|
66
66
|
lodashThrottle,
|
|
67
67
|
debounce,
|
|
68
68
|
addHttps,
|
|
69
69
|
showSuccessToast,
|
|
70
70
|
showFailToast,
|
|
71
71
|
showNormalToast,
|
|
72
72
|
showShopLoading,
|
|
73
73
|
hideShopLoading,
|
|
74
74
|
getAppChannelType,
|
|
75
75
|
formatTabActiveMenuType,
|
|
76
76
|
filterUrlQueryData,
|
|
77
77
|
sgmCustomReport,
|
|
78
78
|
isOpenJdAppUrl,
|
|
79
79
|
jdOpenAppParams,
|
|
80
80
|
createJdOpenAppUrl,
|
|
81
81
|
isEmpty,
|
|
82
82
|
getJdAppReportPageSource,
|
|
83
83
|
isMemberPage,
|
|
84
84
|
isAppClassifyPage,
|
|
85
85
|
dealJdOpenAppData,
|
|
86
86
|
jdAppVersionCompare,
|
|
87
87
|
dealNativePixelToCssPixel
|
|
88
88
|
isJdAndHarmonyDevice,
|
|
89
89
|
isJdAndroidX5Core,
|
|
90
90
|
isH5AndJdShopViewH5Scroll,
|
|
91
91
|
isH5AndJdShopH5CustomScrollView,
|
|
92
92
|
isH5AndJingGouMini,
|
|
93
93
|
urlCookie,
|
|
94
94
|
sgmCustomReport,
|
|
95
95
|
isOpenJdAppUrl,
|
|
96
96
|
jdOpenAppParams,
|
|
97
97
|
createJdOpenAppUrl,
|
|
98
98
|
isEmpty,
|
|
99
99
|
getJdAppReportPageSource,
|
|
100
100
|
isMemberPage,
|
|
101
101
|
isAppClassifyPage,
|
|
102
102
|
isH5AdnJxMini,
|
|
103
103
|
isPc,
|
|
104
104
|
dealJdOpenAppData,
|
|
105
105
|
jdAppVersionCompare,
|
|
106
106
|
dealNativePixelToCssPixel,
|
|
107
107
|
getSgmCustomCode
|
package/dist/utils/jm-common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var splitOnFirst = function splitOnFirst(string, separator) {
|
|
2
1
|
return Object.prototype.toString.call(obj);
|
|
3
2
|
return typeof obj === 'function';
|
|
4
3
|
return '[object Object]' === getType(obj);
|
|
5
4
|
return '[object Array]' == getType(obj);
|
|
6
5
|
return '[object Undefined]' === getType(obj);
|
|
7
6
|
return '[object Null]' == getType(obj);
|
|
8
7
|
return typeof obj === 'string';
|
|
9
8
|
return typeof obj === 'boolean';
|
|
10
9
|
return '[object Number]' === getType(num);
|
|
11
10
|
ua = ua || navigator.userAgent;
|
|
12
11
|
if (name === 'wx') return (/micromessenger/i.test(ua)
|
|
13
12
|
);
|
|
14
13
|
if (name === 'qq') return (/qq\//i.test(ua)
|
|
15
14
|
);
|
|
16
15
|
if (name === 'weibo') return (/weibo/i.test(ua)
|
|
17
16
|
);
|
|
18
17
|
if (name === 'jd') return (/^jdapp/i.test(ua)
|
|
19
18
|
);
|
|
20
19
|
if (name === 'jdharmony') return (/^jdapp;harmony/i.test(ua)
|
|
21
20
|
);
|
|
22
21
|
if (name === 'jdlittle') return (/^jdltapp/i.test(ua)
|
|
23
22
|
);
|
|
24
23
|
if (name === 'mp') return navigator.userAgent.match(/micromessenger/i) && navigator.userAgent.match(/miniprogram/i) || window.__wxjs_environment === 'miniprogram';
|
|
25
24
|
if (name === 'jdb') return (/JDBmall/i.test(ua) && /shop\.m\.jd\.com\/shop\/bhome/i.test(window.location.href));
|
|
26
25
|
if(name === 'jdjch') return (/jdjchshopapp/i.test(ua) || (/shop\.m\.jd\.com\/shop\/bhome/i.test(window.location.href)) && window.location.href.includes('channel')) ;
|
|
27
26
|
return false;
|
|
28
27
|
ua = ua || navigator.userAgent;
|
|
29
28
|
return (/android/i.test(ua) && !isIOS()
|
|
30
29
|
);
|
|
31
30
|
ua = ua || navigator.userAgent;
|
|
32
31
|
return (/ip(hone|od)|ipad/i.test(ua)
|
|
33
32
|
);
|
|
34
33
|
ua = ua || navigator.userAgent;
|
|
35
34
|
return (/ipad/i.test(ua) || /android/i.test(ua) && !/mobi|mini|fennec/i.test(ua)
|
|
36
35
|
);
|
|
37
36
|
ua = ua || navigator.userAgent;
|
|
38
37
|
return !!ua.match(/ip(hone|od)|android.+mobile|windows (ce|phone)|blackberry|bb10|symbian|webos|firefox.+fennec|opera m(ob|in)i|polaris|iemobile|lgtelecom|nokia|sonyericsson|dolfin|uzard|natebrowser|ktf;|skt;/i);
|
|
39
38
|
ua = ua || navigator.userAgent;
|
|
40
39
|
return !!ua.match(/iphone/i);
|
|
41
40
|
ua = ua || navigator.userAgent;
|
|
42
41
|
return !!ua.match(/ipad/i);
|
|
43
42
|
ua = ua || navigator.userAgent;
|
|
44
43
|
if (name === 'xview') return typeof window.XView !== 'undefined';
|
|
45
44
|
if (name === 'wk') return !!ua.match(/supportjdshwk/i) || window._is_jdsh_wkwebview == 1;
|
|
46
45
|
return false;
|
|
47
46
|
ua = ua || navigator.userAgent;
|
|
48
47
|
var re = /nettype\/([\S]*)/i;
|
|
49
48
|
if (isApp('jd', ua)) re = /network\/([^;]*)/i;
|
|
50
49
|
return re.test(ua) ? RegExp.$1.toLowerCase() : 'unknown';
|
|
51
50
|
ua = ua || navigator.userAgent;
|
|
52
51
|
if (!isApp('jd', ua)) return null;
|
|
53
52
|
return ua.split(';')[4];
|
|
54
53
|
ua = ua || navigator.userAgent;
|
|
55
54
|
if (appName === 'jd') return ua.split(';')[2] || null;
|
|
56
55
|
if (appName === 'wx') return (/micromessenger\/([\S]*)/i.test(ua) ? RegExp.$1 : null
|
|
57
56
|
);
|
|
58
57
|
if (appName === 'qq') return (/qq\/([\S]*)/i.test(ua) ? RegExp.$1 : null
|
|
59
58
|
);
|
|
60
59
|
return null;
|
|
61
60
|
ua = ua || navigator.userAgent;
|
|
62
61
|
var match = ua.match(/android\s([0-9\.]*)/i);
|
|
63
62
|
return match ? match[1] : 'unknown';
|
|
64
63
|
ua = ua || navigator.userAgent;
|
|
65
64
|
var match = ua.match(/OS ((\d+_?){2,3})\s/i);
|
|
66
65
|
return match ? match[1].replace(/_/g, '.') : 'unknown';
|
|
66
|
+
var splitOnFirst = function splitOnFirst(string, separator) {
|
|
67
67
|
return Object.prototype.toString.call(obj);
|
|
68
68
|
return typeof obj === 'function';
|
|
69
69
|
return '[object Object]' === getType(obj);
|
|
70
70
|
return '[object Array]' == getType(obj);
|
|
71
71
|
return '[object Undefined]' === getType(obj);
|
|
72
72
|
return '[object Null]' == getType(obj);
|
|
73
73
|
return typeof obj === 'string';
|
|
74
74
|
return typeof obj === 'boolean';
|
|
75
75
|
return '[object Number]' === getType(num);
|
|
76
76
|
ua = ua || navigator.userAgent;
|
|
77
77
|
if (name === 'wx') return (/micromessenger/i.test(ua)
|
|
78
78
|
);
|
|
79
79
|
if (name === 'qq') return (/qq\//i.test(ua)
|
|
80
80
|
);
|
|
81
81
|
if (name === 'weibo') return (/weibo/i.test(ua)
|
|
82
82
|
);
|
|
83
83
|
if (name === 'jd') return (/^jdapp/i.test(ua)
|
|
84
84
|
);
|
|
85
85
|
if (name === 'jdharmony') return (/^jdapp;harmony/i.test(ua)
|
|
86
86
|
);
|
|
87
87
|
if (name === 'jdlittle') return (/^jdltapp/i.test(ua)
|
|
88
88
|
);
|
|
89
89
|
if (name === 'mp') return navigator.userAgent.match(/micromessenger/i) && navigator.userAgent.match(/miniprogram/i) || window.__wxjs_environment === 'miniprogram';
|
|
90
90
|
if (name === 'jdb') return (/JDBmall/i.test(ua) && /shop\.m\.jd\.com\/shop\/bhome/i.test(window.location.href));
|
|
91
91
|
if(name === 'jdjch') return (/jdjchshopapp/i.test(ua) || (/shop\.m\.jd\.com\/shop\/bhome/i.test(window.location.href)) && window.location.href.includes('channel')) ;
|
|
92
92
|
if(name == 'tjapp') return /jdltapp;/.test(ua);
|
|
93
93
|
return false;
|
|
94
94
|
ua = ua || navigator.userAgent;
|
|
95
95
|
return (/android/i.test(ua) && !isIOS()
|
|
96
96
|
);
|
|
97
97
|
ua = ua || navigator.userAgent;
|
|
98
98
|
return (/ip(hone|od)|ipad/i.test(ua)
|
|
99
99
|
);
|
|
100
100
|
ua = ua || navigator.userAgent;
|
|
101
101
|
return (/ipad/i.test(ua) || /android/i.test(ua) && !/mobi|mini|fennec/i.test(ua)
|
|
102
102
|
);
|
|
103
103
|
ua = ua || navigator.userAgent;
|
|
104
104
|
return !!ua.match(/ip(hone|od)|android.+mobile|windows (ce|phone)|blackberry|bb10|symbian|webos|firefox.+fennec|opera m(ob|in)i|polaris|iemobile|lgtelecom|nokia|sonyericsson|dolfin|uzard|natebrowser|ktf;|skt;/i);
|
|
105
105
|
ua = ua || navigator.userAgent;
|
|
106
106
|
return !!ua.match(/iphone/i);
|
|
107
107
|
ua = ua || navigator.userAgent;
|
|
108
108
|
return !!ua.match(/ipad/i);
|
|
109
109
|
ua = ua || navigator.userAgent;
|
|
110
110
|
if (name === 'xview') return typeof window.XView !== 'undefined';
|
|
111
111
|
if (name === 'wk') return !!ua.match(/supportjdshwk/i) || window._is_jdsh_wkwebview == 1;
|
|
112
112
|
return false;
|
|
113
113
|
ua = ua || navigator.userAgent;
|
|
114
114
|
var re = /nettype\/([\S]*)/i;
|
|
115
115
|
if (isApp('jd', ua)) re = /network\/([^;]*)/i;
|
|
116
116
|
return re.test(ua) ? RegExp.$1.toLowerCase() : 'unknown';
|
|
117
117
|
ua = ua || navigator.userAgent;
|
|
118
118
|
if (!isApp('jd', ua)) return null;
|
|
119
119
|
return ua.split(';')[4];
|
|
120
120
|
ua = ua || navigator.userAgent;
|
|
121
121
|
if (appName === 'jd') return ua.split(';')[2] || null;
|
|
122
122
|
if (appName === 'wx') return (/micromessenger\/([\S]*)/i.test(ua) ? RegExp.$1 : null
|
|
123
123
|
);
|
|
124
124
|
if (appName === 'qq') return (/qq\/([\S]*)/i.test(ua) ? RegExp.$1 : null
|
|
125
125
|
);
|
|
126
126
|
return null;
|
|
127
127
|
ua = ua || navigator.userAgent;
|
|
128
128
|
var match = ua.match(/android\s([0-9\.]*)/i);
|
|
129
129
|
return match ? match[1] : 'unknown';
|
|
130
130
|
ua = ua || navigator.userAgent;
|
|
131
131
|
var match = ua.match(/OS ((\d+_?){2,3})\s/i);
|
|
132
132
|
return match ? match[1].replace(/_/g, '.') : 'unknown';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { getPageType } from "../common/pageType"
|
|
2
|
return str.replace(/-([a-z])/g, (match) => {
|
|
1
3
|
return match[1].toUpperCase();
|
|
2
4
|
});
|
|
3
5
|
let finalSgmCustomCode = sgmCustomCode
|
|
4
6
|
const pageType = getPageType()
|
|
5
7
|
if (pageType !== '') {
|
|
6
8
|
const sgmPageType = underlineToCamelCase(pageType)
|
|
7
9
|
finalSgmCustomCode = `${sgmPageType}_${finalSgmCustomCode}`
|
|
8
10
|
}
|
|
9
11
|
const environmentType = getEnvironmentType()
|
|
10
12
|
finalSgmCustomCode = `${environmentType}_${finalSgmCustomCode}`
|
|
11
13
|
console.log('sgm上报自定义编码', finalSgmCustomCode)
|
|
12
14
|
return finalSgmCustomCode
|