@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
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 === 'jdlittle') return (/^jdltapp/i.test(ua)
|
|
21
20
|
);
|
|
22
21
|
if (name === 'mp') return navigator.userAgent.match(/micromessenger/i) && navigator.userAgent.match(/miniprogram/i) || window.__wxjs_environment === 'miniprogram';
|
|
23
22
|
if (name === 'jdb') return (/JDBmall/i.test(ua) && /shop\.m\.jd\.com\/shop\/bhome/i.test(window.location.href));
|
|
24
23
|
return false;
|
|
25
24
|
ua = ua || navigator.userAgent;
|
|
26
25
|
return (/android/i.test(ua) && !isIOS()
|
|
27
26
|
);
|
|
28
27
|
ua = ua || navigator.userAgent;
|
|
29
28
|
return (/ip(hone|od)|ipad/i.test(ua)
|
|
30
29
|
);
|
|
31
30
|
ua = ua || navigator.userAgent;
|
|
32
31
|
return (/ipad/i.test(ua) || /android/i.test(ua) && !/mobi|mini|fennec/i.test(ua)
|
|
33
32
|
);
|
|
34
33
|
ua = ua || navigator.userAgent;
|
|
35
34
|
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);
|
|
36
35
|
ua = ua || navigator.userAgent;
|
|
37
36
|
return !!ua.match(/iphone/i);
|
|
38
37
|
ua = ua || navigator.userAgent;
|
|
39
38
|
return !!ua.match(/ipad/i);
|
|
40
39
|
ua = ua || navigator.userAgent;
|
|
41
40
|
if (name === 'xview') return typeof window.XView !== 'undefined';
|
|
42
41
|
if (name === 'wk') return !!ua.match(/supportjdshwk/i) || window._is_jdsh_wkwebview == 1;
|
|
43
42
|
return false;
|
|
44
43
|
ua = ua || navigator.userAgent;
|
|
45
44
|
var re = /nettype\/([\S]*)/i;
|
|
46
45
|
if (isApp('jd', ua)) re = /network\/([^;]*)/i;
|
|
47
46
|
return re.test(ua) ? RegExp.$1.toLowerCase() : 'unknown';
|
|
48
47
|
ua = ua || navigator.userAgent;
|
|
49
48
|
if (!isApp('jd', ua)) return null;
|
|
50
49
|
return ua.split(';')[4];
|
|
51
50
|
ua = ua || navigator.userAgent;
|
|
52
51
|
if (appName === 'jd') return ua.split(';')[2] || null;
|
|
53
52
|
if (appName === 'wx') return (/micromessenger\/([\S]*)/i.test(ua) ? RegExp.$1 : null
|
|
54
53
|
);
|
|
55
54
|
if (appName === 'qq') return (/qq\/([\S]*)/i.test(ua) ? RegExp.$1 : null
|
|
56
55
|
);
|
|
57
56
|
return null;
|
|
58
57
|
ua = ua || navigator.userAgent;
|
|
59
58
|
var match = ua.match(/android\s([0-9\.]*)/i);
|
|
60
59
|
return match ? match[1] : 'unknown';
|
|
61
60
|
ua = ua || navigator.userAgent;
|
|
62
61
|
var match = ua.match(/OS ((\d+_?){2,3})\s/i);
|
|
63
62
|
return match ? match[1].replace(/_/g, '.') : 'unknown';
|
|
63
|
+
var splitOnFirst = function splitOnFirst(string, separator) {
|
|
64
64
|
return Object.prototype.toString.call(obj);
|
|
65
65
|
return typeof obj === 'function';
|
|
66
66
|
return '[object Object]' === getType(obj);
|
|
67
67
|
return '[object Array]' == getType(obj);
|
|
68
68
|
return '[object Undefined]' === getType(obj);
|
|
69
69
|
return '[object Null]' == getType(obj);
|
|
70
70
|
return typeof obj === 'string';
|
|
71
71
|
return typeof obj === 'boolean';
|
|
72
72
|
return '[object Number]' === getType(num);
|
|
73
73
|
ua = ua || navigator.userAgent;
|
|
74
74
|
if (name === 'wx') return (/micromessenger/i.test(ua)
|
|
75
75
|
);
|
|
76
76
|
if (name === 'qq') return (/qq\//i.test(ua)
|
|
77
77
|
);
|
|
78
78
|
if (name === 'weibo') return (/weibo/i.test(ua)
|
|
79
79
|
);
|
|
80
80
|
if (name === 'jd') return (/^jdapp/i.test(ua)
|
|
81
81
|
);
|
|
82
82
|
if (name === 'jdlittle') return (/^jdltapp/i.test(ua)
|
|
83
83
|
);
|
|
84
84
|
if (name === 'mp') return navigator.userAgent.match(/micromessenger/i) && navigator.userAgent.match(/miniprogram/i) || window.__wxjs_environment === 'miniprogram';
|
|
85
85
|
if (name === 'jdb') return (/JDBmall/i.test(ua) && /shop\.m\.jd\.com\/shop\/bhome/i.test(window.location.href));
|
|
86
86
|
if(name === 'jdjch') return (/jdjchshopapp/i.test(ua) || (/shop\.m\.jd\.com\/shop\/bhome/i.test(window.location.href)) && window.location.href.includes('channel')) ;
|
|
87
87
|
return false;
|
|
88
88
|
ua = ua || navigator.userAgent;
|
|
89
89
|
return (/android/i.test(ua) && !isIOS()
|
|
90
90
|
);
|
|
91
91
|
ua = ua || navigator.userAgent;
|
|
92
92
|
return (/ip(hone|od)|ipad/i.test(ua)
|
|
93
93
|
);
|
|
94
94
|
ua = ua || navigator.userAgent;
|
|
95
95
|
return (/ipad/i.test(ua) || /android/i.test(ua) && !/mobi|mini|fennec/i.test(ua)
|
|
96
96
|
);
|
|
97
97
|
ua = ua || navigator.userAgent;
|
|
98
98
|
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);
|
|
99
99
|
ua = ua || navigator.userAgent;
|
|
100
100
|
return !!ua.match(/iphone/i);
|
|
101
101
|
ua = ua || navigator.userAgent;
|
|
102
102
|
return !!ua.match(/ipad/i);
|
|
103
103
|
ua = ua || navigator.userAgent;
|
|
104
104
|
if (name === 'xview') return typeof window.XView !== 'undefined';
|
|
105
105
|
if (name === 'wk') return !!ua.match(/supportjdshwk/i) || window._is_jdsh_wkwebview == 1;
|
|
106
106
|
return false;
|
|
107
107
|
ua = ua || navigator.userAgent;
|
|
108
108
|
var re = /nettype\/([\S]*)/i;
|
|
109
109
|
if (isApp('jd', ua)) re = /network\/([^;]*)/i;
|
|
110
110
|
return re.test(ua) ? RegExp.$1.toLowerCase() : 'unknown';
|
|
111
111
|
ua = ua || navigator.userAgent;
|
|
112
112
|
if (!isApp('jd', ua)) return null;
|
|
113
113
|
return ua.split(';')[4];
|
|
114
114
|
ua = ua || navigator.userAgent;
|
|
115
115
|
if (appName === 'jd') return ua.split(';')[2] || null;
|
|
116
116
|
if (appName === 'wx') return (/micromessenger\/([\S]*)/i.test(ua) ? RegExp.$1 : null
|
|
117
117
|
);
|
|
118
118
|
if (appName === 'qq') return (/qq\/([\S]*)/i.test(ua) ? RegExp.$1 : null
|
|
119
119
|
);
|
|
120
120
|
return null;
|
|
121
121
|
ua = ua || navigator.userAgent;
|
|
122
122
|
var match = ua.match(/android\s([0-9\.]*)/i);
|
|
123
123
|
return match ? match[1] : 'unknown';
|
|
124
124
|
ua = ua || navigator.userAgent;
|
|
125
125
|
var match = ua.match(/OS ((\d+_?){2,3})\s/i);
|
|
126
126
|
return match ? match[1].replace(/_/g, '.') : 'unknown';
|
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
|
pin?: string
|
|
8
7
|
visitkey?: string
|
|
9
8
|
[key: string]: any
|
|
10
9
|
}
|
|
11
10
|
jdpin,
|
|
12
11
|
pinStatus,
|
|
13
12
|
visitkey,
|
|
14
13
|
unionid,
|
|
15
14
|
skey,
|
|
16
15
|
__jda,
|
|
17
16
|
__jdv,
|
|
18
17
|
__wga,
|
|
19
18
|
wxapp_type,
|
|
20
19
|
appType
|
|
21
20
|
} = cookie
|
|
22
21
|
const getUserCookieObj = {}
|
|
23
22
|
jdpin,
|
|
24
23
|
pinStatus,
|
|
25
24
|
visitkey,
|
|
26
25
|
unionid,
|
|
27
26
|
skey,
|
|
28
27
|
__jda,
|
|
29
28
|
__jdv,
|
|
30
29
|
__wga,
|
|
31
30
|
wid,
|
|
32
31
|
wq_skey,
|
|
33
32
|
wq_uin,
|
|
34
33
|
wq_auth_token,
|
|
35
34
|
wxapp_scene,
|
|
36
35
|
wq_unionid,
|
|
37
36
|
wxapp_openid,
|
|
38
37
|
wxapp_version,
|
|
39
38
|
wxapp_type,
|
|
40
39
|
appType
|
|
41
40
|
name = name === 'jdpin' ? 'pin' : name;
|
|
42
41
|
name === 'pin' && (ret.push(`pt_pin=${encodeURIComponent(value)}`))
|
|
43
42
|
ret.push(`${name}=${encodeURIComponent(value)}`)
|
|
44
43
|
getUserCookieObj[name] = value
|
|
45
44
|
}
|
|
46
45
|
wqCookie: getUserCookieObj
|
|
47
46
|
exceptionReportFn
|
|
48
47
|
const isIsvContainer = (containerId, floorListData, containerListData) => {
|
|
49
48
|
const objContainer = containerListData.find(item => item.containerId === containerId)
|
|
50
49
|
(itemUid) => {
|
|
51
50
|
const objectFloor = floorListData.find(floorItem => itemUid === floorItem.uid)
|
|
52
51
|
return RemoteLoadFloorList.includes(objectFloor?.floorExtInfo?.moduleFlag)
|
|
53
52
|
}
|
|
54
53
|
)?? false
|
|
55
54
|
isMemberPage,
|
|
56
55
|
sgmCustomReport
|
|
56
|
+
import Taro from '@tarojs/taro'
|
|
57
57
|
const getValue = `${obj[key]}`.replace(/undefined/,'').replace(/null/,'')
|
|
58
58
|
paramStr += `${index === 0 ? '' : '&'}${key}=${encodeURIComponent(getValue)}`
|
|
59
59
|
if(!imgUrl.includes('360buyimg.com')){
|
|
60
60
|
imgUrl = '//m.360buyimg.com/cms/' + imgUrl
|
|
61
61
|
}
|
|
62
62
|
if(quality != 100) imgUrl += /\.png/.test(imgUrl) ? '.dpg' : `!q${quality}`
|
|
63
63
|
pin?: string
|
|
64
64
|
visitkey?: string
|
|
65
65
|
[key: string]: any
|
|
66
66
|
}
|
|
67
67
|
jdpin,
|
|
68
68
|
pinStatus,
|
|
69
69
|
visitkey,
|
|
70
70
|
unionid,
|
|
71
71
|
skey,
|
|
72
72
|
__jda,
|
|
73
73
|
__jdv,
|
|
74
74
|
__wga,
|
|
75
75
|
wxapp_type,
|
|
76
76
|
appType
|
|
77
77
|
} = cookie
|
|
78
78
|
const getUserCookieObj = {}
|
|
79
79
|
jdpin,
|
|
80
80
|
pinStatus,
|
|
81
81
|
visitkey,
|
|
82
82
|
unionid,
|
|
83
83
|
skey,
|
|
84
84
|
__jda,
|
|
85
85
|
__jdv,
|
|
86
86
|
__wga,
|
|
87
87
|
wid,
|
|
88
88
|
wq_skey,
|
|
89
89
|
wq_uin,
|
|
90
90
|
wq_auth_token,
|
|
91
91
|
wxapp_scene,
|
|
92
92
|
wq_unionid,
|
|
93
93
|
wxapp_openid,
|
|
94
94
|
wxapp_version,
|
|
95
95
|
wxapp_type,
|
|
96
96
|
appType
|
|
97
97
|
name = name === 'jdpin' ? 'pin' : name;
|
|
98
98
|
name === 'pin' && (ret.push(`pt_pin=${encodeURIComponent(value)}`))
|
|
99
99
|
ret.push(`${name}=${encodeURIComponent(value)}`)
|
|
100
100
|
getUserCookieObj[name] = value
|
|
101
101
|
}
|
|
102
102
|
wqCookie: getUserCookieObj
|
|
103
103
|
exceptionReportFn
|
|
104
104
|
const isIsvContainer = (containerId, floorListData, containerListData) => {
|
|
105
105
|
const objContainer = containerListData.find(item => item.containerId === containerId)
|
|
106
106
|
(itemUid) => {
|
|
107
107
|
const objectFloor = floorListData.find(floorItem => itemUid === floorItem.uid)
|
|
108
108
|
return RemoteLoadFloorList.includes(objectFloor?.floorExtInfo?.moduleFlag)
|
|
109
109
|
}
|
|
110
110
|
)?? false
|
|
111
111
|
isChartH5,
|
|
112
112
|
isH5AndJdShopViewH5Scroll,
|
|
113
113
|
isMemberPage,
|
|
114
114
|
sgmCustomReport
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|