@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
|
@@ -1 +1 @@
|
|
|
1
|
-
import { JdJumpJdApp } from './jdJumpJdApp'
|
|
2
1
|
routerInfo: {
|
|
3
2
|
params: {},
|
|
4
3
|
},
|
|
5
4
|
nativeEvent: null,
|
|
6
5
|
jumpConfig: {
|
|
7
6
|
venderId: null,
|
|
8
7
|
shopId: null,
|
|
9
8
|
sourceValue: '',
|
|
10
9
|
sourceType: 'App-H5',
|
|
11
10
|
activityType: 'shopx',
|
|
12
11
|
moduleId: 'none',
|
|
13
12
|
entrance: 'none',
|
|
14
13
|
},
|
|
15
14
|
logPageParamStr: '',
|
|
16
15
|
public logPageId: string
|
|
17
16
|
public jumpConfig: JumpEventReportInterFace.JumpH5ReportConfig
|
|
18
17
|
constructor(opt = {}) {
|
|
19
18
|
console.log('jdb加载==========')
|
|
20
19
|
super(opt)
|
|
21
20
|
this.getConfig(opt)
|
|
22
21
|
}
|
|
23
22
|
jdbOpenAppParams(openAppUrl): Object | boolean {
|
|
24
23
|
let getParams: boolean | Object = false
|
|
25
24
|
if (this.isOpenJdbAppUrl(openAppUrl)) {
|
|
26
25
|
try {
|
|
27
26
|
getParams = openAppUrl.replace(
|
|
28
27
|
/openApp\.jdbmall:\/\/virtual\?params=/i,
|
|
29
28
|
'',
|
|
30
29
|
)
|
|
31
30
|
getParams = JSON.parse(String(getParams))
|
|
32
31
|
} catch (e) {
|
|
33
32
|
console.log(e)
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
return getParams
|
|
37
36
|
}
|
|
38
37
|
isOpenJdbAppUrl(openAppUrl) {
|
|
39
38
|
return /openApp\.jdbmall:\/\/virtual\?params=/i.test(openAppUrl)
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
async jdJumpConfigUrl(detail, logEventInfo = {}) {
|
|
43
42
|
const { configDataType, configDataValue } = detail
|
|
44
43
|
switch (configDataType) {
|
|
45
44
|
case LinkConfigType.CONFIG_TYPE_SKU_LIST:
|
|
46
45
|
this.jdJumpToProduct(
|
|
47
46
|
{
|
|
48
47
|
...configDataValue,
|
|
49
48
|
skuId: configDataValue.skuIds,
|
|
50
49
|
skuUniformBizInfo: { buId: configDataValue.buId },
|
|
51
50
|
},
|
|
52
51
|
logEventInfo,
|
|
53
52
|
)
|
|
54
53
|
break
|
|
55
54
|
case LinkConfigType.CONFIG_TYPE_CUSTOM_LINK: {
|
|
56
55
|
const _url = configDataValue.linkUrl
|
|
57
56
|
if (this.isOpenJdbAppUrl(_url)) {
|
|
58
57
|
const getOpenAppParams = this.jdbOpenAppParams(_url)
|
|
59
58
|
console.log('jd web 获取自定义链接解析后的参数结果', getOpenAppParams)
|
|
60
59
|
if (getOpenAppParams) {
|
|
61
60
|
this.jdNavigateToNative(
|
|
62
61
|
Object.assign({}, getOpenAppParams, {
|
|
63
62
|
logEventInfo,
|
|
64
63
|
}),
|
|
65
64
|
)
|
|
66
65
|
}
|
|
67
66
|
}
|
|
68
67
|
break
|
|
69
68
|
}
|
|
70
69
|
default:
|
|
71
70
|
}
|
|
72
71
|
}
|
|
73
72
|
|
|
74
73
|
jdJumpToProduct(skuParams, logEventInfo) {
|
|
75
74
|
if (typeof skuParams !== 'object') {
|
|
76
75
|
console.error('万商app跳转商品详情参数需要对象,详情请查看文档')
|
|
77
76
|
return
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
let { skuId, bMallTag = '1', skuUniformBizInfo } = skuParams
|
|
81
80
|
skuId = skuId.toString().trim()
|
|
82
81
|
this.jdNavigateToNative({
|
|
83
82
|
category: 'jump',
|
|
84
83
|
des: 'skudetail',
|
|
85
84
|
param: {
|
|
86
85
|
skuId: skuId,
|
|
87
86
|
bMallTag: bMallTag,
|
|
88
87
|
skuUniformBizInfo,
|
|
89
88
|
},
|
|
90
89
|
logEventInfo,
|
|
91
90
|
})
|
|
92
91
|
}
|
|
93
92
|
|
|
94
93
|
jdNavigateToNative(
|
|
95
94
|
params: {},
|
|
96
95
|
url = OpenAppHost,
|
|
97
96
|
successBack?: Function | null,
|
|
98
97
|
failBack?: Function | null,
|
|
99
98
|
) {
|
|
100
99
|
console.log('jdb web', params)
|
|
101
100
|
const getResParams: JumpEventReportInterFace.JdMiniJumpParams =
|
|
102
101
|
Object.assign(
|
|
103
102
|
{},
|
|
104
103
|
{
|
|
105
104
|
param: {},
|
|
106
105
|
},
|
|
107
106
|
params,
|
|
108
107
|
)
|
|
109
108
|
const { logEventInfo, ...otherParams } = getResParams
|
|
110
109
|
console.log(
|
|
111
110
|
'jdb web 获取open协议参数 jdNavigateToNative params: ',
|
|
112
111
|
otherParams,
|
|
113
112
|
)
|
|
114
113
|
console.log('logEventInfo params: ', logEventInfo)
|
|
115
114
|
console.log('otherParams', otherParams)
|
|
116
115
|
const paramsStr = JSON.stringify(otherParams)
|
|
117
116
|
console.log('跳转web jdb open协议', `${url}?params=${paramsStr}`)
|
|
118
117
|
global.info.pageInfo.dataType === BUSINESS_TYPE.ONLINE &&
|
|
119
118
|
this.clickEventLog(logEventInfo || getResParams)
|
|
120
119
|
.then(() => {
|
|
121
120
|
if (typeof successBack == 'function') {
|
|
122
121
|
successBack(getResParams)
|
|
123
122
|
} else {
|
|
124
123
|
try {
|
|
125
124
|
const paramsStr = JSON.stringify(otherParams)
|
|
126
125
|
console.log(
|
|
127
126
|
'success: 跳转web jdb open协议',
|
|
128
127
|
`${url}?params=${paramsStr}`,
|
|
129
128
|
)
|
|
130
129
|
window.location.href = `${url}?params=${paramsStr}`
|
|
131
130
|
} catch (e) {
|
|
132
131
|
console.log('跳转异常', e)
|
|
133
132
|
}
|
|
134
133
|
}
|
|
135
134
|
})
|
|
136
135
|
.catch((e) => {
|
|
137
136
|
console.log('catch', e)
|
|
138
137
|
typeof failBack == 'function' && failBack(getResParams)
|
|
139
138
|
})
|
|
140
139
|
}
|
|
141
140
|
|
|
142
141
|
clickEventLog(
|
|
143
142
|
opts: JumpEventReportInterFace.OptEventLogParams = {},
|
|
144
143
|
reportKey = 'click',
|
|
145
144
|
) {
|
|
146
145
|
const { eventId, jsonParam, eventLevel = 3, ...otherParams } = opts
|
|
147
146
|
if (eventId && jsonParam) {
|
|
148
147
|
const { etModelInfo, logBaseInfo } = jsonParam
|
|
149
148
|
const webLogParams = {
|
|
150
149
|
eid: eventId,
|
|
151
150
|
elevel: eventLevel,
|
|
152
151
|
eparam:JSON.stringify(logBaseInfo || jsonParam),
|
|
153
152
|
jsonParam: JSON.stringify(logBaseInfo || jsonParam),
|
|
154
153
|
etModel: JSON.stringify(etModelInfo || {}),
|
|
155
154
|
pageId: this.logPageId,
|
|
156
155
|
pageParam: this.logPageParamStr,
|
|
157
156
|
...otherParams,
|
|
158
157
|
}
|
|
159
158
|
return /click|exposure/.test(reportKey)
|
|
160
159
|
? reportClick(webLogParams)
|
|
161
160
|
: reportToCart(opts)
|
|
162
161
|
} else {
|
|
163
162
|
console.log('暂无埋点参数eventId和eventParam')
|
|
164
163
|
return Promise.resolve(false)
|
|
165
164
|
}
|
|
166
165
|
}
|
|
167
166
|
getConfig(opt = {}) {
|
|
168
167
|
return Object.assign(this, {}, defaultConfig, opt)
|
|
169
168
|
}
|
|
169
|
+
import { JdJumpJdApp } from './jdJumpJdApp'
|
|
170
170
|
routerInfo: {
|
|
171
171
|
params: {},
|
|
172
172
|
},
|
|
173
173
|
nativeEvent: null,
|
|
174
174
|
jumpConfig: {
|
|
175
175
|
venderId: null,
|
|
176
176
|
shopId: null,
|
|
177
177
|
sourceValue: '',
|
|
178
178
|
sourceType: 'App-H5',
|
|
179
179
|
activityType: 'shopx',
|
|
180
180
|
moduleId: 'none',
|
|
181
181
|
entrance: 'none',
|
|
182
182
|
},
|
|
183
183
|
logPageParamStr: '',
|
|
184
184
|
public logPageId: string
|
|
185
185
|
public jumpConfig: JumpEventReportInterFace.JumpH5ReportConfig
|
|
186
186
|
constructor(opt = {}) {
|
|
187
187
|
console.log('jdb加载==========')
|
|
188
188
|
super(opt)
|
|
189
189
|
this.getConfig(opt)
|
|
190
190
|
}
|
|
191
191
|
jdbOpenAppParams(openAppUrl): Object | boolean {
|
|
192
192
|
let getParams: boolean | Object = false
|
|
193
193
|
if (this.isOpenJdbAppUrl(openAppUrl)) {
|
|
194
194
|
try {
|
|
195
195
|
getParams = openAppUrl.replace(
|
|
196
196
|
/openApp\.jdbmall:\/\/virtual\?params=/i,
|
|
197
197
|
'',
|
|
198
198
|
)
|
|
199
199
|
getParams = JSON.parse(String(getParams))
|
|
200
200
|
} catch (e) {
|
|
201
201
|
console.log(e)
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
return getParams
|
|
205
205
|
}
|
|
206
206
|
isOpenJdbAppUrl(openAppUrl) {
|
|
207
207
|
return /openApp\.jdbmall:\/\/virtual\?params=/i.test(openAppUrl)
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
async jdJumpConfigUrl(detail, logEventInfo = {}) {
|
|
211
211
|
const { configDataType, configDataValue } = detail
|
|
212
212
|
switch (configDataType) {
|
|
213
213
|
case LinkConfigType.CONFIG_TYPE_SKU_LIST:
|
|
214
214
|
this.jdJumpToProduct(
|
|
215
215
|
{
|
|
216
216
|
...configDataValue,
|
|
217
217
|
skuId: configDataValue.skuIds,
|
|
218
218
|
skuUniformBizInfo: { buId: configDataValue.buId },
|
|
219
219
|
},
|
|
220
220
|
logEventInfo,
|
|
221
221
|
)
|
|
222
222
|
break
|
|
223
223
|
case LinkConfigType.CONFIG_TYPE_CUSTOM_LINK: {
|
|
224
224
|
const _url = configDataValue.linkUrl
|
|
225
225
|
if (this.isOpenJdbAppUrl(_url)) {
|
|
226
226
|
const getOpenAppParams = this.jdbOpenAppParams(_url)
|
|
227
227
|
console.log('jd web 获取自定义链接解析后的参数结果', getOpenAppParams)
|
|
228
228
|
if (getOpenAppParams) {
|
|
229
229
|
this.jdNavigateToNative(
|
|
230
230
|
Object.assign({}, getOpenAppParams, {
|
|
231
231
|
logEventInfo,
|
|
232
232
|
}),
|
|
233
233
|
)
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
break
|
|
237
237
|
}
|
|
238
238
|
default:
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
jdJumpToProduct(skuParams, logEventInfo) {
|
|
243
243
|
if (typeof skuParams !== 'object') {
|
|
244
244
|
console.error('万商app跳转商品详情参数需要对象,详情请查看文档')
|
|
245
245
|
return
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
let { skuId, bMallTag = '1', skuUniformBizInfo } = skuParams
|
|
249
249
|
skuId = skuId.toString().trim()
|
|
250
250
|
this.jdNavigateToNative({
|
|
251
251
|
category: 'jump',
|
|
252
252
|
des: 'skudetail',
|
|
253
253
|
param: {
|
|
254
254
|
skuId: skuId,
|
|
255
255
|
bMallTag: bMallTag,
|
|
256
256
|
skuUniformBizInfo,
|
|
257
257
|
},
|
|
258
258
|
logEventInfo,
|
|
259
259
|
})
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
jdNavigateToNative(
|
|
263
263
|
params: {},
|
|
264
264
|
url = OpenAppHost,
|
|
265
265
|
successBack?: Function | null,
|
|
266
266
|
failBack?: Function | null,
|
|
267
267
|
) {
|
|
268
268
|
console.log('jdb web', params)
|
|
269
269
|
const getResParams: JumpEventReportInterFace.JdMiniJumpParams =
|
|
270
270
|
Object.assign(
|
|
271
271
|
{},
|
|
272
272
|
{
|
|
273
273
|
param: {},
|
|
274
274
|
},
|
|
275
275
|
params,
|
|
276
276
|
)
|
|
277
277
|
const { logEventInfo, ...otherParams } = getResParams
|
|
278
278
|
console.log(
|
|
279
279
|
'jdb web 获取open协议参数 jdNavigateToNative params: ',
|
|
280
280
|
otherParams,
|
|
281
281
|
)
|
|
282
282
|
console.log('logEventInfo params: ', logEventInfo)
|
|
283
283
|
console.log('otherParams', otherParams)
|
|
284
284
|
const paramsStr = JSON.stringify(otherParams)
|
|
285
285
|
console.log('跳转web jdb open协议', `${url}?params=${paramsStr}`)
|
|
286
286
|
global.info.pageInfo.dataType === BUSINESS_TYPE.ONLINE &&
|
|
287
287
|
this.clickEventLog(logEventInfo || getResParams)
|
|
288
288
|
.then(() => {
|
|
289
289
|
if (typeof successBack == 'function') {
|
|
290
290
|
successBack(getResParams)
|
|
291
291
|
} else {
|
|
292
292
|
try {
|
|
293
293
|
const paramsStr = JSON.stringify(otherParams)
|
|
294
294
|
console.log(
|
|
295
295
|
'success: 跳转web jdb open协议',
|
|
296
296
|
`${url}?params=${paramsStr}`,
|
|
297
297
|
)
|
|
298
298
|
window.location.href = `${url}?params=${paramsStr}`
|
|
299
299
|
} catch (e) {
|
|
300
300
|
console.log('跳转异常', e)
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
})
|
|
304
304
|
.catch((e) => {
|
|
305
305
|
console.log('catch', e)
|
|
306
306
|
typeof failBack == 'function' && failBack(getResParams)
|
|
307
307
|
})
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
clickEventLog(
|
|
311
311
|
opts: JumpEventReportInterFace.OptEventLogParams = {},
|
|
312
312
|
reportKey = 'click',
|
|
313
313
|
) {
|
|
314
314
|
const { eventId, jsonParam, eventLevel = 3, ...otherParams } = opts
|
|
315
315
|
if (eventId && jsonParam) {
|
|
316
316
|
const { etModelInfo, logBaseInfo } = jsonParam
|
|
317
317
|
const webLogParams = {
|
|
318
318
|
eid: eventId,
|
|
319
319
|
elevel: eventLevel,
|
|
320
320
|
eparam:JSON.stringify(logBaseInfo || jsonParam),
|
|
321
321
|
jsonParam: JSON.stringify(logBaseInfo || jsonParam),
|
|
322
322
|
etModel: JSON.stringify(etModelInfo || {}),
|
|
323
323
|
pageId: this.logPageId,
|
|
324
324
|
pageParam: this.logPageParamStr,
|
|
325
325
|
...otherParams,
|
|
326
326
|
}
|
|
327
327
|
return /click|exposure/.test(reportKey)
|
|
328
328
|
? reportClick(webLogParams)
|
|
329
329
|
: reportToCart(opts,webLogParams)
|
|
330
330
|
} else {
|
|
331
331
|
console.log('暂无埋点参数eventId和eventParam')
|
|
332
332
|
return Promise.resolve(false)
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
getConfig(opt = {}) {
|
|
336
336
|
return Object.assign(this, {}, defaultConfig, opt)
|
|
337
337
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {JdJumpJdApp} from './jdJumpJdApp'
|
|
2
|
routerInfo: {
|
|
1
3
|
params: {},
|
|
2
4
|
},
|
|
3
5
|
nativeEvent: null,
|
|
4
6
|
jumpConfig: {
|
|
5
7
|
venderId: null,
|
|
6
8
|
shopId: null,
|
|
7
9
|
sourceValue: '',
|
|
8
10
|
sourceType: 'App-H5',
|
|
9
11
|
activityType: 'shopx',
|
|
10
12
|
moduleId: 'none',
|
|
11
13
|
entrance: 'none',
|
|
12
14
|
},
|
|
13
15
|
logPageParamStr: '',
|
|
14
16
|
public logPageId: string
|
|
15
17
|
public jumpConfig: JumpEventReportInterFace.JumpH5ReportConfig
|
|
16
18
|
constructor(opt = {}) {
|
|
17
19
|
console.log('jdb加载==========')
|
|
18
20
|
super(opt)
|
|
19
21
|
this.getConfig(opt)
|
|
20
22
|
}
|
|
21
23
|
jdbOpenAppParams(openAppUrl): Object | boolean {
|
|
22
24
|
let getParams: boolean | Object = false
|
|
23
25
|
if (this.isOpenJdbAppUrl(openAppUrl)) {
|
|
24
26
|
try {
|
|
25
27
|
getParams = openAppUrl.replace(
|
|
26
28
|
/openApp\.jdbmall:\/\/virtual\?params=/i,
|
|
27
29
|
'',
|
|
28
30
|
)
|
|
29
31
|
getParams = JSON.parse(String(getParams))
|
|
30
32
|
} catch (e) {
|
|
31
33
|
console.log(e)
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
36
|
return getParams
|
|
35
37
|
}
|
|
36
38
|
isOpenJdbAppUrl(openAppUrl) {
|
|
37
39
|
return /openApp\.jdbmall:\/\/virtual\?params=/i.test(openAppUrl)
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
async jdJumpConfigUrl(detail, logEventInfo = {}) {
|
|
41
43
|
const {configDataType, configDataValue} = detail
|
|
42
44
|
switch (configDataType) {
|
|
43
45
|
case LinkConfigType.CONFIG_TYPE_SKU_LIST:
|
|
44
46
|
this.jdJumpToProduct(
|
|
45
47
|
{
|
|
46
48
|
...configDataValue,
|
|
47
49
|
skuId: configDataValue.skuIds,
|
|
48
50
|
skuUniformBizInfo: {buId: configDataValue.buId},
|
|
49
51
|
},
|
|
50
52
|
logEventInfo,
|
|
51
53
|
)
|
|
52
54
|
break
|
|
53
55
|
case LinkConfigType.CONFIG_TYPE_CUSTOM_LINK: {
|
|
54
56
|
const _url = configDataValue.linkUrl
|
|
55
57
|
if (this.isOpenJdbAppUrl(_url)) {
|
|
56
58
|
const getOpenAppParams = this.jdbOpenAppParams(_url)
|
|
57
59
|
console.log('jd web 获取自定义链接解析后的参数结果', getOpenAppParams)
|
|
58
60
|
if (getOpenAppParams) {
|
|
59
61
|
this.jdNavigateToNative(
|
|
60
62
|
Object.assign({}, getOpenAppParams, {
|
|
61
63
|
logEventInfo,
|
|
62
64
|
}),
|
|
63
65
|
)
|
|
64
66
|
}
|
|
65
67
|
} else {
|
|
66
68
|
const win = window.parent !== window ? window.parent : window;
|
|
67
69
|
win.location.href = _url
|
|
68
70
|
}
|
|
69
71
|
break
|
|
70
72
|
}
|
|
71
73
|
default:
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
jdJumpToProduct(skuParams, logEventInfo) {
|
|
76
78
|
if (typeof skuParams !== 'object') {
|
|
77
79
|
console.error('万商app跳转商品详情参数需要对象,详情请查看文档')
|
|
78
80
|
return
|
|
79
81
|
}
|
|
80
82
|
|
|
81
83
|
let {skuId, bMallTag = '1', skuUniformBizInfo} = skuParams
|
|
82
84
|
skuId = skuId.toString().trim()
|
|
83
85
|
let url = 'https://b2b.m.jd'
|
|
84
86
|
url = url + `.com/goods-detail/#/pages/index/index?skuId=${skuId}&bMallTag=${bMallTag}&skuSourceInfo=${encodeURIComponent(JSON.stringify(skuUniformBizInfo))}`
|
|
85
87
|
if(/jdjchshopapp/i.test(navigator.userAgent)) {
|
|
86
88
|
const {browser} = window['@jd/jdb-jssdk-b2b'] || {}
|
|
87
89
|
if (browser) {
|
|
88
90
|
browser.openPage({
|
|
89
91
|
url,
|
|
90
92
|
})
|
|
91
93
|
}
|
|
92
94
|
}else {
|
|
93
95
|
const win = window.parent !== window ? window.parent : window;
|
|
94
96
|
win.location.href = url
|
|
95
97
|
}
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
jdNavigateToNative(
|
|
99
101
|
params: {},
|
|
100
102
|
url = OpenAppHost,
|
|
101
103
|
successBack?: Function | null,
|
|
102
104
|
failBack?: Function | null,
|
|
103
105
|
) {
|
|
104
106
|
console.log('jdb web', params)
|
|
105
107
|
const getResParams: JumpEventReportInterFace.JdMiniJumpParams =
|
|
106
108
|
Object.assign(
|
|
107
109
|
{},
|
|
108
110
|
{
|
|
109
111
|
param: {},
|
|
110
112
|
},
|
|
111
113
|
params,
|
|
112
114
|
)
|
|
113
115
|
const {logEventInfo, ...otherParams} = getResParams
|
|
114
116
|
console.log(
|
|
115
117
|
'jdb web 获取open协议参数 jdNavigateToNative params: ',
|
|
116
118
|
otherParams,
|
|
117
119
|
)
|
|
118
120
|
console.log('logEventInfo params: ', logEventInfo)
|
|
119
121
|
console.log('otherParams', otherParams)
|
|
120
122
|
const paramsStr = JSON.stringify(otherParams)
|
|
121
123
|
console.log('跳转web jdb open协议', `${url}?params=${paramsStr}`)
|
|
122
124
|
global.info.pageInfo.dataType === BUSINESS_TYPE.ONLINE &&
|
|
123
125
|
this.clickEventLog(logEventInfo || getResParams)
|
|
124
126
|
.then(() => {
|
|
125
127
|
if (typeof successBack == 'function') {
|
|
126
128
|
successBack(getResParams)
|
|
127
129
|
} else {
|
|
128
130
|
try {
|
|
129
131
|
const paramsStr = JSON.stringify(otherParams)
|
|
130
132
|
console.log(
|
|
131
133
|
'success: 跳转web jdb open协议',
|
|
132
134
|
`${url}?params=${paramsStr}`,
|
|
133
135
|
)
|
|
134
136
|
window.location.href = `${url}?params=${paramsStr}`
|
|
135
137
|
} catch (e) {
|
|
136
138
|
console.log('跳转异常', e)
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
141
|
})
|
|
140
142
|
.catch((e) => {
|
|
141
143
|
console.log('catch', e)
|
|
142
144
|
typeof failBack == 'function' && failBack(getResParams)
|
|
143
145
|
})
|
|
144
146
|
}
|
|
145
147
|
|
|
146
148
|
clickEventLog(
|
|
147
149
|
opts: JumpEventReportInterFace.OptEventLogParams = {},
|
|
148
150
|
reportKey = 'click',
|
|
149
151
|
) {
|
|
150
152
|
const {eventId, jsonParam, eventLevel = 3, ...otherParams} = opts
|
|
151
153
|
if (eventId && jsonParam) {
|
|
152
154
|
const {etModelInfo, logBaseInfo} = jsonParam
|
|
153
155
|
const webLogParams = {
|
|
154
156
|
eid: eventId,
|
|
155
157
|
elevel: eventLevel,
|
|
156
158
|
eparam: JSON.stringify(logBaseInfo || jsonParam),
|
|
157
159
|
jsonParam: JSON.stringify(logBaseInfo || jsonParam),
|
|
158
160
|
etModel: JSON.stringify(etModelInfo || {}),
|
|
159
161
|
pageId: this.logPageId,
|
|
160
162
|
pageParam: this.logPageParamStr,
|
|
161
163
|
...otherParams,
|
|
162
164
|
}
|
|
163
165
|
return /click|exposure/.test(reportKey)
|
|
164
166
|
? reportClick(webLogParams)
|
|
165
167
|
: reportToCart(opts)
|
|
166
168
|
} else {
|
|
167
169
|
console.log('暂无埋点参数eventId和eventParam')
|
|
168
170
|
return Promise.resolve(false)
|
|
169
171
|
}
|
|
170
172
|
}
|
|
171
173
|
getConfig(opt = {}) {
|
|
172
174
|
return Object.assign(this, {}, defaultConfig, opt)
|
|
173
175
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*
|
|
2
|
-
var Taro=require("@tarojs/taro");!function(t){var e={};"weapp"===process.env.TARO_ENV&&(e={1e3:["direct","t_1000578828_xcx_1000_wxtd","xcx",""],1001:["direct","t_1000578828_xcx_1001_fxrk","xcx",""],1005:["weixin","t_1000578826_xcx_1005_fxss","xcx",""],1006:["weixin","t_1000578826_xcx_1006_fxss","xcx",""],1007:["weixin","t_1000578832_xcx_1007_drxxkp","xcx",""],1008:["weixin","t_1000578832_xcx_1008_qlxxkp","xcx",""],1010:["direct","t_1000578828_xcx_1010_scj","xcx",""],1011:["weixin","t_1000578833_xcx_1011_smewm","xcx",""],1012:["weixin","t_1000578833_xcx_1011_smewm","xcx",""],1013:["weixin","t_1000578833_xcx_1011_smewm","xcx",""],1014:["weixin","t_1000578827_xcx_1014_xcxmbxx","xcx",""],1017:["weixin","t_1000578829_xcx_1017_tyb","xcx",""],1019:["direct","t_1000578830_xcx_1019_qb","xcx",""],1020:["weixin","t_1000072662_xcx_1020_gzhjs","xcx",""],1022:["direct","t_1000578828_xcx_1022_zdrk","xcx",""],1023:["direct","t_1000578828_xcx_1023_zmtb","xcx",""],1024:["direct","t_1000578828_xcx_1024_xcxjs","xcx",""],1025:["weixin","t_1000578833_xcx_1025_smywm","xcx",""],1026:["weixin","t_1000578829_xcx_1026_fjxcx","xcx",""],1027:["weixin","t_1000578826_xcx_1027_dbss","xcx",""],1028:["direct","t_1000578836_xcx_1028_kqkb","xcx",""],1029:["direct","t_1000578836_xcx_1029_kqxq","xcx",""],1030:["weixin","t_1000578829_xcx_1030_zdhcs","xcx",""],1031:["weixin","t_1000578833_xcx_1025_smywm","xcx",""],1032:["weixin","t_1000578833_xcx_1025_smywm","xcx",""],1034:["weixin","t_1000578827_xcx_1034_zfwcxx","xcx",""],1035:["weixin","t_1000072662_xcx_1035_cdl","xcx",""],1036:["weixin","t_335139774_xcx_1036_appfxxx","xcx",""],1037:["weixin","t_1000578834_xcx_1037_xcxtz","xcx",""],1038:["weixin","t_1000578834_xcx_1038_xcxtz","xcx",""],1039:["weixin","t_1000578829_xcx_1039_yds","xcx",""],1042:["weixin","t_1000578826_xcx_1042_tjss","xcx",""],1043:["weixin","t_1000072662_xcx_1043_gzhxx","xcx",""],1044:["weixin","t_1000578832_xcx_1044_fxxxkp","xcx",""],1045:["weixin","t_1000578835_xcx_1045_pyq","xcx",""],1046:["weixin","t_1000578835_xcx_1046_xqy","xcx",""],1047:["weixin","t_1000578833_xcx_1047_smxcxm","xcx",""],1048:["weixin","t_1000578833_xcx_1047_smxcxm","xcx",""],1049:["weixin","t_1000578833_xcx_1047_smxcxm","xcx",""],1052:["direct","t_1000578836_xcx_1052_kqmdlb","xcx",""],1053:["weixin","t_1000578826_xcx_1053_sys","xcx",""],1054:["direct","t_1000578828_xcx_1054_dbss","xcx",""],1055:["weixin","t_1000578829_xcx_1055_h5hq","xcx",""],1056:["weixin","t_1000578829_xcx_1056_ylbf","xcx",""],1057:["direct","t_1000578830_xcx_1057_yxkxqy","xcx",""],1058:["weixin","t_1000072663_xcx_1058_gzhwz","xcx",""],1059:["weixin","t_1000578829_xcx_1059_yqy","xcx",""],1064:["weixin","t_1000578829_xcx_1064_wifilj","xcx",""],1067:["weixin","t_1000578835_xcx_1067_gzh","xcx",""],1068:["weixin","t_1000578835_xcx_1068_fjxcx","xcx",""],1069:["weixin","t_1000578829_xcx_1069_ydyy","xcx",""],1071:["direct","t_1000578830_xcx_1071_yxklby","xcx",""],1072:["weixin","t_1000578833_xcx_1072_ewmsk","xcx",""],1073:["weixin","t_1000578829_xcx_1073_kfxx","xcx",""],1074:["weixin","t_1000072663_xcx_1074_gzhxx","xcx",""],1077:["weixin","t_1000578829_xcx_1077_yzb","xcx",""],1078:["weixin","t_1000578829_xcx_1078_wifilj","xcx",""],1079:["weixin","t_1000578829_xcx_1079_yxzx","xcx",""],1081:["weixin","t_1000578829_xcx_1081_kfwzl","xcx",""],1082:["weixin","t_1000072663_xcx_1082_hhwzl","xcx",""],1084:["weixin","t_1000578835_xcx_1084_ysy","xcx",""],1088:["direct","t_1000578828_xcx_1088_hhxx","xcx",""],1089:["direct","t_1000578828_xcx_1089_ltkxl","xcx",""],1090:["direct","t_1000578828_xcx_1090_xcxcd","xcx",""],1091:["weixin","t_1000072663_xcx_1091_wzspkp","xcx",""],1092:["direct","t_1000578829_xcx_1092_csfwrk","xcx",""],1095:["weixin","t_1000578835_xcx_1095_xcxzj","xcx",""],1096:["direct","t_1000578828_xcx_1096_ltjl","xcx",""],1097:["weixin","t_1000578829_xcx_1097_zfqy","xcx",""],1099:["direct","t_1000578829_xcx_1099_cj","xcx",""],1100:["direct","t_1000578828_xcx_1100_hbfmxqy","xcx",""],1102:["weixin","t_1000072663_xcx_1102_fwyl","xcx",""],1103:["direct","t_1000578829_xcx_1103_fxwd","xcx",""],1104:["direct","t_1000578829_xcx_1104_xlwd","xcx",""],1106:["direct","t_1000578828_xcx_1106_xlss","xcx",""],1107:["direct","t_1000578828_xcx_1107_dyxx","xcx",""],1112:["direct","t_1000072660_17008_79","xcx",""],1113:["direct","t_1000578828_xcx_1113_azfyp","xcx",""],1114:["direct","t_1000578828_xcx_1114_azcbl","xcx",""],1119:["direct","t_1000578828_xcx_1119_qywxgzt","xcx",""],1120:["direct","t_1000578828_xcx_1120_qywxgrzl","xcx",""],1121:["weixin","t_1000578832_xcx_1121_qywxltjhk","xcx",""],1124:["weixin","t_1000578833_xcx_1124_smywym","xcx",""],1125:["weixin","t_1000578833_xcx_1124_smywym","xcx",""],1126:["weixin","t_1000578833_xcx_1124_smywym","xcx",""],1129:["weixin","t_1000578829_xcx_1129_pc","xcx",""],1131:["direct","t_1000578828_xcx_1131_fcdk","xcx",""],1133:["direct","t_1000578828_xcx_1133_yjsb","xcx",""],1135:["weixin","t_1000578829_xcx_1135_zcxtz","xcx",""],1150:["weixin","t_1000578833_xcx_1150_sspm","xcx",""],1152:["weixin","t_1000072663_xcx_1152_dyhspdkxcx","xcx",""],1153:["weixin","t_1000578833_xcx_1253_swjgy","xcx",""],1154:["weixin","t_1000578832_xcx_1154_pyqdy","xcx",""],1155:["weixin","t_1000578832_xcx_1155_pyqdytz","xcx",""],1157:["weixin","t_1000578832_xcx_1157_fqhhhk","xcx",""],1158:["weixin","t_1000578832_xcx_1158_qgjdkxcx","xcx",""],1167:["direct","t_1000578828_xcx_1167_bqtz","xcx",""],1168:["weixin","t_1000578828_xcx_1168_qqllq","xcx",""]});var n=function(e){var n="";try{n=t.getStorageSync(e)}catch(t){}return n},i=function(e,n){try{t.setStorageSync(e,n)}catch(t){}},x=t.request,r=t.getSystemInfo,a=t.getNetworkType,c="";"weapp"===process.env.TARO_ENV?c="wx-app":"swan"===process.env.TARO_ENV?c="baidu-app":"tt"===process.env.TARO_ENV?c="toutiao-app":"alipay"===process.env.TARO_ENV?c="alipay-app":"rn"===process.env.TARO_ENV?c="rn-app":"h5"===process.env.TARO_ENV&&(c="h5-app");var _="__jda",s="__jdd",o="__jdv",p="__debugId__",d="__sysExtKey__",u="union_customerinfo",h=864e5,l=86400,v=1800,f="__refer",g="5YT%aC89$22OI@pQ",m=function(t){var e="https://neptune.jd.com/log/m";try{var n=getApp({allowDefault:!0});n&&n.globalRequestUrl&&(e=n.globalRequestUrl.replace(/\/*$/,"/neptune/log/m"))}catch(t){}return t?"https://luna.jd.com/debuglog/xapp":e},w=0;function y(t){t=t||"tr-"+w++,this.name=t,this.logCache=[],this.env=[],this.ext={},this.isReady=y.isWxDataReady,y.loggerList&&y.loggerList instanceof Array&&y.loggerList.push(this),y.isInitJda||(y.initJda(),y.isInitJda=!0)}y.loggerList=[],y.dependList={sysinfo:0,netType:0},y.isWxDataReady=!1,y.instance=!1,y.getInstance=function(){return y.instance||(y.instance=new y)},y.getMulInstance=function(t){return new y(t)},y.dataReady=function(t){if(!y.isWxDataReady){y.dependList[t]=1;for(var e in y.dependList)if(!y.dependList[e])return;y.isWxDataReady=!0;e=0;for(var n=y.loggerList.length;e<n;e++)y.loggerList[e].ready();delete y.loggerList}},y.pr=y.prototype,y.pr.ready=function(){this.isReady=!0;for(var t=this.logCache.length,e=0;e<t;e++)this.sendData.apply(this,this.logCache[e])},y.pr.sendData=function(t,e,n){var i;(i="pv"==e?this.initPvData(n):"cl"==e?this.initClickData(n):"cd"==e?this.initShoppingData(n):"od"==e?this.initOrderData(n):"sr"==e?this.initPageUnloadData(n):"ep"==e?this.initExposureData(n):n).tpc=t,i.report_ts=D()/1e3,i.token=y.md5(i.report_ts+g),i.data[0].typ=e,i.data[0].debugId=this.env[st]||"",this.request(i,"sr"==e||"cl"==e)},y.pr.send=function(t,e,n){this.isReady?this.sendData.apply(this,arguments):this.logCache.push(arguments)},y.pr.request=function(t,e){var n=!1,i=!!this.env[st];if(x({url:m(i)+"?std="+t.std,data:t,method:"POST",header:{"content-type":"application/json"},success:function(t){n=!0}}),e)for(var r=D()+100;D()<r||n;);},y.pr.exports=function(){var t=this;return{set:function(e){t.setData(e)},pv:function(e){t.lastPvTime&&D()-t.lastPvTime<100||(t.lastPvTime=D(),t.setData(e),t.setupPageview(!0),t.send("wx_app.000000","pv",e))},click:function(e){t.send("wx_app.000001","cl",e)},exposure:function(e){t.send("wx_app.000005","ep",e)},autoClick:function(e){var n,i=e.target.dataset,x=e.currentTarget.dataset;if(i&&i.eid?n=i:x&&x.eid&&(n=x),n){var r={eid:n.eid,elevel:n.elevel,eparam:n.eparam,pname:n.pname,pparam:n.pparam,target:n.target,event:e};t.send("wx_app.000001","cl",r)}},addToCart:function(e){t.send("wx_app.000002","cd",e)},order:function(e){t.send("wx_app.000003","od",e)},pageUnload:function(e){t.send("wx_app.000004","sr",e)},getSeries:function(){return t.env[L]||(t.setupPageview(),t.env[L]=!0),JSON.stringify(t.getSeriesData())},urlAddSeries:function(t){var e=(t||"").indexOf("#"),n="wxappSeries="+encodeURIComponent(this.getSeries());return e>-1?e===t.length-1?t+n:t+"&"+n:t+"#"+n},setMParam:function(e){return t.setMParam(e)},getJda:function(){return n(_)},getJdv:function(){return n(o)},getStorage:function(t){return n(t)},setStorage:function(t,e){return i(t,e)},setJdv:function(t){return t&&5===t.split("|").length&&i(o,t+"|"+D())}}},function(t){var e=0;function n(t){return x(i(r(t)))}function i(t){return c(_(a(t),8*t.length))}function x(t){for(var n,i=e?"0123456789ABCDEF":"0123456789abcdef",x="",r=0;r<t.length;r++)n=t.charCodeAt(r),x+=i.charAt(n>>>4&15)+i.charAt(15&n);return x}function r(t){for(var e,n,i="",x=-1;++x<t.length;)e=t.charCodeAt(x),n=x+1<t.length?t.charCodeAt(x+1):0,55296<=e&&e<=56319&&56320<=n&&n<=57343&&(e=65536+((1023&e)<<10)+(1023&n),x++),e<=127?i+=String.fromCharCode(e):e<=2047?i+=String.fromCharCode(192|e>>>6&31,128|63&e):e<=65535?i+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):e<=2097151&&(i+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return i}function a(t){var e,n=Array(t.length>>2);for(e=0;e<n.length;e++)n[e]=0;for(e=0;e<8*t.length;e+=8)n[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return n}function c(t){for(var e="",n=0;n<32*t.length;n+=8)e+=String.fromCharCode(t[n>>5]>>>n%32&255);return e}function _(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var n=1732584193,i=-271733879,x=-1732584194,r=271733878,a=0;a<t.length;a+=16){var c=n,_=i,s=x,l=r;i=u(i=u(i=u(i=u(i=d(i=d(i=d(i=d(i=p(i=p(i=p(i=p(i=o(i=o(i=o(i=o(i,x=o(x,r=o(r,n=o(n,i,x,r,t[a+0],7,-680876936),i,x,t[a+1],12,-389564586),n,i,t[a+2],17,606105819),r,n,t[a+3],22,-1044525330),x=o(x,r=o(r,n=o(n,i,x,r,t[a+4],7,-176418897),i,x,t[a+5],12,1200080426),n,i,t[a+6],17,-1473231341),r,n,t[a+7],22,-45705983),x=o(x,r=o(r,n=o(n,i,x,r,t[a+8],7,1770035416),i,x,t[a+9],12,-1958414417),n,i,t[a+10],17,-42063),r,n,t[a+11],22,-1990404162),x=o(x,r=o(r,n=o(n,i,x,r,t[a+12],7,1804603682),i,x,t[a+13],12,-40341101),n,i,t[a+14],17,-1502002290),r,n,t[a+15],22,1236535329),x=p(x,r=p(r,n=p(n,i,x,r,t[a+1],5,-165796510),i,x,t[a+6],9,-1069501632),n,i,t[a+11],14,643717713),r,n,t[a+0],20,-373897302),x=p(x,r=p(r,n=p(n,i,x,r,t[a+5],5,-701558691),i,x,t[a+10],9,38016083),n,i,t[a+15],14,-660478335),r,n,t[a+4],20,-405537848),x=p(x,r=p(r,n=p(n,i,x,r,t[a+9],5,568446438),i,x,t[a+14],9,-1019803690),n,i,t[a+3],14,-187363961),r,n,t[a+8],20,1163531501),x=p(x,r=p(r,n=p(n,i,x,r,t[a+13],5,-1444681467),i,x,t[a+2],9,-51403784),n,i,t[a+7],14,1735328473),r,n,t[a+12],20,-1926607734),x=d(x,r=d(r,n=d(n,i,x,r,t[a+5],4,-378558),i,x,t[a+8],11,-2022574463),n,i,t[a+11],16,1839030562),r,n,t[a+14],23,-35309556),x=d(x,r=d(r,n=d(n,i,x,r,t[a+1],4,-1530992060),i,x,t[a+4],11,1272893353),n,i,t[a+7],16,-155497632),r,n,t[a+10],23,-1094730640),x=d(x,r=d(r,n=d(n,i,x,r,t[a+13],4,681279174),i,x,t[a+0],11,-358537222),n,i,t[a+3],16,-722521979),r,n,t[a+6],23,76029189),x=d(x,r=d(r,n=d(n,i,x,r,t[a+9],4,-640364487),i,x,t[a+12],11,-421815835),n,i,t[a+15],16,530742520),r,n,t[a+2],23,-995338651),x=u(x,r=u(r,n=u(n,i,x,r,t[a+0],6,-198630844),i,x,t[a+7],10,1126891415),n,i,t[a+14],15,-1416354905),r,n,t[a+5],21,-57434055),x=u(x,r=u(r,n=u(n,i,x,r,t[a+12],6,1700485571),i,x,t[a+3],10,-1894986606),n,i,t[a+10],15,-1051523),r,n,t[a+1],21,-2054922799),x=u(x,r=u(r,n=u(n,i,x,r,t[a+8],6,1873313359),i,x,t[a+15],10,-30611744),n,i,t[a+6],15,-1560198380),r,n,t[a+13],21,1309151649),x=u(x,r=u(r,n=u(n,i,x,r,t[a+4],6,-145523070),i,x,t[a+11],10,-1120210379),n,i,t[a+2],15,718787259),r,n,t[a+9],21,-343485551),n=h(n,c),i=h(i,_),x=h(x,s),r=h(r,l)}return Array(n,i,x,r)}function s(t,e,n,i,x,r){return h((a=h(h(e,t),h(i,r)))<<(c=x)|a>>>32-c,n);var a,c}function o(t,e,n,i,x,r,a){return s(e&n|~e&i,t,e,x,r,a)}function p(t,e,n,i,x,r,a){return s(e&i|n&~i,t,e,x,r,a)}function d(t,e,n,i,x,r,a){return s(e^n^i,t,e,x,r,a)}function u(t,e,n,i,x,r,a){return s(n^(e|~i),t,e,x,r,a)}function h(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}y.md5=n}();var D=function(){return(new Date).getTime()},k=function(){return D()+""+parseInt(2147483647*Math.random())},P=function(t){return"[object Object]"=={}.toString.call(t)},C=function(t,e){if(P(t)&&P(e))for(var n in e)t[n]=e[n]},q=function(t){var e=[];if(P(t))for(var n in t)"m_param"!==n&&e.push(n+"="+t[n]);return e.join("&")},I=function(t){if(P(t))for(var e in t)return!1;return!0},R=0,j=R++,b=R++,S=R++,A=R++,z=R++,T=R++,U=R++,E=R++,O=R++,L=R++,J=R++,N=R++,M=R++,V=R++,W=R++,X=R++,$=R++,F=R++,K=R++,Y=R++,B=R++,H=R++,Q=R++,G=R++,Z=R++,tt=R++,et=R++,nt=R++,it=R++,xt=R++,rt=R++,at=R++,ct=R++,_t=R++,st=R++;y.pr.getData=function(t){for(var e={},n=0,i=t.length;n<i;n++){var x=t[n];e[x[0]]=this.env[x[1]]||""}return e};var ot=null;y.pr.getPname=function(t){return(t=t||{}).pname||this.env[Y]||this.env[M]||this.env[X]||""},y.pr.getPparam=function(t){return(t=t||{}).pparam||this.env[B]||this.env[V]||this.env[$]||""},y.pr.getUrl=function(){return this.env[M]||this.env[X]||""},y.pr.getUrlParam=function(){return this.env[V]||this.env[$]||""},y.pr.setupPageview=function(t){var x,r,a,c=this.env,d=D(),g=parseInt(d/1e3),m=n(_),w=n(s),C=n(o),R=n(p);c[J]=!0;try{var j=(mt=getCurrentPages())[mt.length-1];c[X]=j.route||j.__route__||"";var L=P(j.options)?j.options:{};c[$]=q(L)||"",c[F]=L,this.setMParam((this.env[W]||{}).m_param||L.m_param)}catch(t){}c[O]=!1,x=g,r=c,(a=(w||"").split(".")).length>1?r[O]=r[O]||1*a[1]+v<x:r[O]=!0;var N,M,V,K,Y,B,G,Z,tt,xt,rt,at,pt,dt,ut=function(t,n,i){var x=(t||"").split("|"),r="",a="",c="",_="",s=!0;x.length>=6&&n-x[5]<=h&&(r=x[1],a=x[2],c=x[3],_=x[4],s=!1);var o=I(i[W])?i[F]:i[W],p=[];if(ot&&e[ot]){var d=e[ot];p[0]=d[0],p[1]=encodeURIComponent(d[1]),p[2]=encodeURIComponent(d[2])||"none",p[3]=encodeURIComponent(d[3])||"-",ot=null}o&&o.utm_source&&(p[0]=encodeURIComponent(o.utm_source),p[1]=encodeURIComponent(o.utm_campaign||"")||a,p[2]=encodeURIComponent(o.utm_medium||"")||c,p[3]=encodeURIComponent(o.utm_term||"")||_,_=p[3],s=!0);var u=!1;p.length>0&&"direct"!=p[0]?u=(p[0]!==r||p[1]!==a||p[2]!==c)&&"referral"!==p[2]:p.length>0&&"direct"==p[0]&&("direct"===r||!r)&&(u=p[1]!==a||p[2]!==c||p[3]!==_);var l="";return u&&(r=p[0]||r,a=p[1]||a,c=p[2]||c,_=p[3]||_),(s||u)&&(l=[1,r||"direct",a||"-",c||"none",_||"-",n].join("|")),i[O]=i[O]||u,l}(C,d,c),ht=(xt=g,rt=c,at=t,pt=(w||"").split("."),dt=1,pt.length>1?(rt[O]=rt[O]||1*pt[1]+v<xt,dt=(rt[O]?1:at?1*pt[0]+1:1*pt[0])||1):rt[O]=!0,rt[T]=dt,dt+"."+xt),lt=(N=g,M=c,G=(m||"").split("."),Z=1,tt=1,G.length>5?(Z=G[0]||Z,V=G[1]||k(),K=G[2]||N,M[O]?(Y=G[4]||N,B=N,tt=1*G[5]+1||1):(Y=G[3]||N,B=G[4]||N,tt=1*G[5]||1)):(V=k(),K=Y=B=N,tt=1),M[ct]=Z,M[b]=V,M[S]=K,M[A]=Y,M[z]=B,M[U]=tt,[Z,V,K,Y,B,tt].join("."));i(s,ht),i(_,lt),ut&&i(o,ut),c[E]=ut||C,y.setAppData(),function(t){if(t[_t]&&t[_t].pv_sid&&t[_t].pv_seq){var e=1*t[_t].pv_sid,n=1*t[_t].pv_seq;e>99999999||(e>t[U]||e==t[U]&&n>=t[T])&&(t[U]=e,t[T]=n+1)}}(c);var vt,ft,gt=function(t,e,n){var i=I(n[W])?n[F]:n[W],x="",r="";if(i&&i.customerinfo)x=i.customerinfo,r=e;else{var a=t instanceof Array?t:[];2==a.length&&e-a[1]<l&&(x=a[0],r=a[1])}return n[it]=x,x?[x,r]:[]}(n(u),g,c);i(u,gt),vt=this.env,(ft=n("jdwcx")||n("jdzdm"))&&(ft.unionid&&(vt[et]=ft.unionid),ft.wxversion&&(vt[nt]=ft.wxversion));try{j=(mt=getCurrentPages())[mt.length-1];var mt,wt=P(j.options)?j.options:{},yt=decodeURIComponent(wt.scene),Dt=new RegExp("(^|&)"+p+"=([^&]*)(&|$)"),kt=yt.match(Dt),Pt=wt[p];null!=kt&&(Pt=kt[2]),Pt?(i(p,Pt),R=Pt):c[O]&&(i(p,""),R=""),c[st]=R}catch(t){}if(c[O])c[H]="",c[Q]="";else{var Ct=n(f);c[H]=Ct[0],c[Q]=Ct[1]}i(f,[this.getUrl(),this.getUrlParam()])},y.pr.initMulcommonData=function(){var t=y.instance&&y.instance.env||[],e={account:G,siteId:j,appid:Z,openid:tt,unionid:et};for(var n in e)this.env[e[n]]=this.env[e[n]]||t[e[n]]},y.pr.initPvData=function(t){this.pageLoadTime=D(),this.maxClickDeep=0,t=t||{};var e=this.baseEnv(),n=e.data[0];return n.page_id=this.env[K]||"",n.pname=this.getPname(t),n.pparam=this.getPparam(t),n.sku=this.env[xt]||"",n.shp=this.env[rt]||"",n.tit=this.env[N]||"",n.ldt=this.env[at]||"",C(n.ext,t.ext),e},y.pr.initClickData=function(t){var e,n=this.baseEnv(),i=n.data[0];if(i.eid=t.eid||"",i.eparam=t.eparam||"",i.elevel=t.elevel||"",i.page_id=t.pageId||this.env[K]||"",i.pname=this.getPname(t),i.pparam=this.getPparam(t),i.tar=t.target||"",i.x=0,i.y=0,e=t.event,P(e)&&e.type&&e.target){var x=t.event,r=x.touches;if((!r||r.length<1)&&(r=x.changedTouches),r&&r.length>0){i.x=parseInt(r[0].pageX);var a=parseInt(r[0].pageY);i.y=a,a>this.maxClickDeep&&(this.maxClickDeep=a)}}return C(i.ext,t.ext),n},y.pr.initExposureData=y.pr.initClickData,y.pr.initShoppingData=function(t){var e=this.baseEnv(),n=e.data[0];return n.eid=t.eid||"",n.eparam=t.eparam||"",n.elevel=t.elevel||"",n.page_id=t.pageId||this.env[K]||"",n.pname=this.getPname(t),n.pparam=this.getPparam(t),n.sku_list=t.shoppingList?JSON.stringify(t.shoppingList):"",C(n.ext,t.ext),e},y.pr.initOrderData=function(t){var e=this.baseEnv(),n=e.data[0];return n.eid=t.eid||"",n.eparam=t.eparam||"",n.elevel=t.elevel||"",n.page_id=t.pageId||this.env[K]||"",n.pname=this.getPname(t),n.pparam=this.getPparam(t),n.sku_list=t.orderList?JSON.stringify(t.orderList):"",n.order_total_fee=t.total||0,n.sale_ord_id=t.orderid||"",C(n.ext,t.ext),e},y.pr.initPageUnloadData=function(t){var e=((D()-this.pageLoadTime)/1e3).toFixed(3),n=this.baseEnv(),i=n.data[0];return t=t||{},i.page_id=t.pageId||this.env[K]||"",i.pname=this.getPname(t),i.pparam=this.getPparam(t),i.alive_seconds=e,i.click_deep=this.maxClickDeep,C(i.ext,t.ext),n},function(){y.wxDat={};var t=y.wxDat;r({success:function(e){e&&(t.dvc=e.model,t.pixelRatio=(e.pixelRatio||"")+"",t.scr=parseInt(e.windowWidth)+"x"+parseInt(e.windowHeight),t.lang=e.language,t.wxver=e.version,t.sdkver=e.SDKVersion||"")},complete:function(){y.dataReady("sysinfo")}}),a({success:function(e){e&&(t.net=e.networkType)},complete:function(){y.dataReady("netType")}})}(),y.pr.setData=function(t){t=P(t)?t:{};var e=P(t.urlParam)?t.urlParam:{},i={skuid:[xt],shopid:[rt],title:[N],loadtime:[at],url:[M],urlParam:[V,q],pname:[Y],pparam:[B],pageId:[K]},x={account:[G],siteId:[j],appid:[Z],openid:[tt],unionid:[et]};this.ext={},this.env[W]=e,this.setMParam(e.m_param);for(var r in i){var a=i[r];this.env[a[0]]=t[r]?a[1]?a[1](t[r]):t[r]:"",delete t[r]}for(var r in x){a=x[r];this.env[a[0]]=t[r]?a[1]?a[1](t[r]):t[r]:this.env[a[0]]||"",delete t[r]}for(var r in t)"ext"!==r&&(this.ext[r]=t[r]);this.env[Z]||(this.env[Z]=n("appid"))},y.appDat={},y.setAppData=function(t){try{var e={},x=n(d);C(e,x),C(e,t);for(var r in e)y.appDat[r]=e[r];i(d,e)}catch(t){}},y.clearAppData=function(){y.appDat={},function(e){try{t.removeStorageSync(e)}catch(t){}}(d)},y.scene=null,y.setScene=function(t){y.scene=t,ot=t},y.pr.setMParam=function(t){try{var e=JSON.parse(t);this.env[_t]=P(e)?e:{}}catch(t){this.env[_t]={}}},y.pr.baseEnv=function(){this===y.instance?this.env[J]||this.setupPageview():this.initCommon||(this.initMulcommonData(),this.initCommon=!0);var t=this.env,e=y.wxDat,i={cli:c,std:t[j]||"WXAPP-JA2016-1",uuid:t[b]||"",scr:e.scr||"",dvc:e.dvc||"",lang:e.lang||"",appkey:t[nt]||"",appid:t[Z]||"",openid:t[tt]||"",unionid:t[et]||"",gender:e.gender||"",city:e.city||"",province:e.province||"",country:e.country||"",wxver:e.wxver||"",data:[]},x=[["realUrl",X],["realParam",$],["ref",H],["rpr",Q],["seq",T],["vts",U],["pin",G],["fst",S],["pst",A],["vct",z]],r=this.getData(x);return r.jsver="TR1.0.1",r.net=e.net||"",r.lat=e.lat||"",r.lon=e.lon||"",r.speed=e.speed||"",r.accuracy=e.accuracy||"",r.pixelRatio=e.pixelRatio||"",r.jdv=t[E]||"",r.customerInfo=t[it]||"",r.ctp=this.getUrl(),r.par=this.getUrlParam(),r.unpl=n("unpl")||"",r.scene=y.scene||"",r.sdkver=e.sdkver||"",r.ext={},r.std_param=y.appDat,C(r.ext,this.ext),C(r.ext,y.appDat),i.data.push(r),i},y.pr.getSeriesData=function(){var t=this.env,e={uuid:t[b]||"",std:t[j]||"WXAPP-JA2016-1",seq:t[T],vts:t[U]};return t[nt]&&(e.appkey=t[nt]),t[Z]&&(e.appid=t[Z]),t[st]&&(e.debugId=t[st]),e},y.initJda=function(){var t=n(_);if(!t){var e=D();t=[1,k(),e,e,e,0].join("."),i(_,t)}return t},module.exports={init:function(t){return y.getInstance().exports()},instance:function(t){return y.getMulInstance(t).exports()},usePlugin:function(t){if(t)try{pluginObj=requirePlugin(t)}catch(t){}},setAppData:function(t){y.setAppData(t)},clearAppData:function(){y.clearAppData()},setScene:function(t){y.setScene(t)}}}(Taro);
|
|
1
|
+
/* 2024-02-22 13:46:25 @issue to huangzhihua@jd.com Thanks */
|
|
2
|
+
var Taro=require("@tarojs/taro");!function(t){var e={};"weapp"===process.env.TARO_ENV&&(e={1e3:["direct","t_1000578828_xcx_1000_wxtd","xcx",""],1001:["direct","t_1000578828_xcx_1001_fxrk","xcx",""],1005:["weixin","t_1000578826_xcx_1005_fxss","xcx",""],1006:["weixin","t_1000578826_xcx_1006_fxss","xcx",""],1007:["weixin","t_1000578832_xcx_1007_drxxkp","xcx",""],1008:["weixin","t_1000578832_xcx_1008_qlxxkp","xcx",""],1010:["direct","t_1000578828_xcx_1010_scj","xcx",""],1011:["weixin","t_1000578833_xcx_1011_smewm","xcx",""],1012:["weixin","t_1000578833_xcx_1011_smewm","xcx",""],1013:["weixin","t_1000578833_xcx_1011_smewm","xcx",""],1014:["weixin","t_1000578827_xcx_1014_xcxmbxx","xcx",""],1017:["weixin","t_1000578829_xcx_1017_tyb","xcx",""],1019:["direct","t_1000578830_xcx_1019_qb","xcx",""],1020:["weixin","t_1000072662_xcx_1020_gzhjs","xcx",""],1022:["direct","t_1000578828_xcx_1022_zdrk","xcx",""],1023:["direct","t_1000578828_xcx_1023_zmtb","xcx",""],1024:["direct","t_1000578828_xcx_1024_xcxjs","xcx",""],1025:["weixin","t_1000578833_xcx_1025_smywm","xcx",""],1026:["weixin","t_1000578829_xcx_1026_fjxcx","xcx",""],1027:["weixin","t_1000578826_xcx_1027_dbss","xcx",""],1028:["direct","t_1000578836_xcx_1028_kqkb","xcx",""],1029:["direct","t_1000578836_xcx_1029_kqxq","xcx",""],1030:["weixin","t_1000578829_xcx_1030_zdhcs","xcx",""],1031:["weixin","t_1000578833_xcx_1025_smywm","xcx",""],1032:["weixin","t_1000578833_xcx_1025_smywm","xcx",""],1034:["weixin","t_1000578827_xcx_1034_zfwcxx","xcx",""],1035:["weixin","t_1000072662_xcx_1035_cdl","xcx",""],1036:["weixin","t_335139774_xcx_1036_appfxxx","xcx",""],1037:["weixin","t_1000578834_xcx_1037_xcxtz","xcx",""],1038:["weixin","t_1000578834_xcx_1038_xcxtz","xcx",""],1039:["weixin","t_1000578829_xcx_1039_yds","xcx",""],1042:["weixin","t_1000578826_xcx_1042_tjss","xcx",""],1043:["weixin","t_1000072662_xcx_1043_gzhxx","xcx",""],1044:["weixin","t_1000578832_xcx_1044_fxxxkp","xcx",""],1045:["weixin","t_1000578835_xcx_1045_pyq","xcx",""],1046:["weixin","t_1000578835_xcx_1046_xqy","xcx",""],1047:["weixin","t_1000578833_xcx_1047_smxcxm","xcx",""],1048:["weixin","t_1000578833_xcx_1047_smxcxm","xcx",""],1049:["weixin","t_1000578833_xcx_1047_smxcxm","xcx",""],1052:["direct","t_1000578836_xcx_1052_kqmdlb","xcx",""],1053:["weixin","t_1000578826_xcx_1053_sys","xcx",""],1054:["direct","t_1000578828_xcx_1054_dbss","xcx",""],1055:["weixin","t_1000578829_xcx_1055_h5hq","xcx",""],1056:["weixin","t_1000578829_xcx_1056_ylbf","xcx",""],1057:["direct","t_1000578830_xcx_1057_yxkxqy","xcx",""],1058:["weixin","t_1000072663_xcx_1058_gzhwz","xcx",""],1059:["weixin","t_1000578829_xcx_1059_yqy","xcx",""],1064:["weixin","t_1000578829_xcx_1064_wifilj","xcx",""],1067:["weixin","t_1000578835_xcx_1067_gzh","xcx",""],1068:["weixin","t_1000578835_xcx_1068_fjxcx","xcx",""],1069:["weixin","t_1000578829_xcx_1069_ydyy","xcx",""],1071:["direct","t_1000578830_xcx_1071_yxklby","xcx",""],1072:["weixin","t_1000578833_xcx_1072_ewmsk","xcx",""],1073:["weixin","t_1000578829_xcx_1073_kfxx","xcx",""],1074:["weixin","t_1000072663_xcx_1074_gzhxx","xcx",""],1077:["weixin","t_1000578829_xcx_1077_yzb","xcx",""],1078:["weixin","t_1000578829_xcx_1078_wifilj","xcx",""],1079:["weixin","t_1000578829_xcx_1079_yxzx","xcx",""],1081:["weixin","t_1000578829_xcx_1081_kfwzl","xcx",""],1082:["weixin","t_1000072663_xcx_1082_hhwzl","xcx",""],1084:["weixin","t_1000578835_xcx_1084_ysy","xcx",""],1088:["direct","t_1000578828_xcx_1088_hhxx","xcx",""],1089:["direct","t_1000578828_xcx_1089_ltkxl","xcx",""],1090:["direct","t_1000578828_xcx_1090_xcxcd","xcx",""],1091:["weixin","t_1000072663_xcx_1091_wzspkp","xcx",""],1092:["direct","t_1000578829_xcx_1092_csfwrk","xcx",""],1095:["weixin","t_1000578835_xcx_1095_xcxzj","xcx",""],1096:["direct","t_1000578828_xcx_1096_ltjl","xcx",""],1097:["weixin","t_1000578829_xcx_1097_zfqy","xcx",""],1099:["direct","t_1000578829_xcx_1099_cj","xcx",""],1100:["direct","t_1000578828_xcx_1100_hbfmxqy","xcx",""],1102:["weixin","t_1000072663_xcx_1102_fwyl","xcx",""],1103:["direct","t_1000578829_xcx_1103_fxwd","xcx",""],1104:["direct","t_1000578829_xcx_1104_xlwd","xcx",""],1106:["direct","t_1000578828_xcx_1106_xlss","xcx",""],1107:["direct","t_1000578828_xcx_1107_dyxx","xcx",""],1112:["direct","t_1000072660_17008_79","xcx",""],1113:["direct","t_1000578828_xcx_1113_azfyp","xcx",""],1114:["direct","t_1000578828_xcx_1114_azcbl","xcx",""],1119:["direct","t_1000578828_xcx_1119_qywxgzt","xcx",""],1120:["direct","t_1000578828_xcx_1120_qywxgrzl","xcx",""],1121:["weixin","t_1000578832_xcx_1121_qywxltjhk","xcx",""],1124:["weixin","t_1000578833_xcx_1124_smywym","xcx",""],1125:["weixin","t_1000578833_xcx_1124_smywym","xcx",""],1126:["weixin","t_1000578833_xcx_1124_smywym","xcx",""],1129:["weixin","t_1000578829_xcx_1129_pc","xcx",""],1131:["direct","t_1000578828_xcx_1131_fcdk","xcx",""],1133:["direct","t_1000578828_xcx_1133_yjsb","xcx",""],1135:["weixin","t_1000578829_xcx_1135_zcxtz","xcx",""],1150:["weixin","t_1000578833_xcx_1150_sspm","xcx",""],1152:["weixin","t_1000072663_xcx_1152_dyhspdkxcx","xcx",""],1153:["weixin","t_1000578833_xcx_1253_swjgy","xcx",""],1154:["weixin","t_1000578832_xcx_1154_pyqdy","xcx",""],1155:["weixin","t_1000578832_xcx_1155_pyqdytz","xcx",""],1157:["weixin","t_1000578832_xcx_1157_fqhhhk","xcx",""],1158:["weixin","t_1000578832_xcx_1158_qgjdkxcx","xcx",""],1167:["direct","t_1000578828_xcx_1167_bqtz","xcx",""],1168:["weixin","t_1000578828_xcx_1168_qqllq","xcx",""]});var n=function(e){var n="";try{n=t.getStorageSync(e)}catch(t){}return n},i=function(e,n){try{t.setStorageSync(e,n)}catch(t){}},x=t.request,a=t.getSystemInfo,r=t.onAppHide,c=t.getNetworkType,_="";"weapp"===process.env.TARO_ENV?_="wx-app":"swan"===process.env.TARO_ENV?_="baidu-app":"tt"===process.env.TARO_ENV?_="toutiao-app":"alipay"===process.env.TARO_ENV?_="alipay-app":"rn"===process.env.TARO_ENV?_="rn-app":"h5"===process.env.TARO_ENV&&(_="h5-app");var s={jdaKey:"__jda",jddKey:"__jdd",jdvKey:"__jdv",debugKey:"__debugId__",sysExtKey:"__sysExtKey__",customerInfoKey:"union_customerinfo",jdvTimeMS:864e5,customerInfoTime:86400,sessionTime:1800,referKey:"__refer",md5Salt:"5YT%aC89$22OI@pQ",batchKey:"zwx-stream-storage",reportStrategy:"zwx-report-strategy",sendByBatch:!1,own:{__jda:1,__jdd:1,__jdv:1,__refer:1,appid:1,jdwcx:1,jdzdm:1,union_customerinfo:1},addr:function(t){var e="https://neptune.jd.com/log/m";try{var n=getApp({allowDefault:!0});n&&n.globalRequestUrl&&(e=n.globalRequestUrl.replace(/\/*$/,"/neptune/log/m"))}catch(t){}return t?"https://luna.jd.com/debuglog/xapp":e}},o=0;function d(t){t=t||"tr-"+o++,this.name=t,this.logCache=[],this.env=[],this.ext={},this.isReady=d.isWxDataReady,d.loggerList&&d.loggerList instanceof Array&&d.loggerList.push(this),d.isInitJda||(d.initJda(),d.isInitJda=!0)}d.loggerList=[],d.dependList={sysinfo:0,netType:0},d.isWxDataReady=!1,d.instance=!1,d.getInstance=function(){return d.instance||(d.instance=new d)},d.getMulInstance=function(t){return new d(t)},d.dataReady=function(t){if(!d.isWxDataReady){d.dependList[t]=1;for(var e in d.dependList)if(!d.dependList[e])return;d.isWxDataReady=!0;e=0;for(var n=d.loggerList.length;e<n;e++)d.loggerList[e].ready();delete d.loggerList}},d.pr=d.prototype,d.pr.ready=function(){this.isReady=!0;for(var t=this.logCache.length,e=0;e<t;e++)this.sendData.apply(this,this.logCache[e])},d.pr.sendData=function(t,e,n){var i;(i="pv"==e?this.initPvData(n):"cl"==e?this.initClickData(n):"cd"==e?this.initShoppingData(n):"od"==e?this.initOrderData(n):"sr"==e?this.initPageUnloadData(n):"ep"==e?this.initExposureData(n):n).tpc=t,i.report_ts=b()/1e3,i.token=d.md5(i.report_ts+s.md5Salt),i.data[0].typ=e,i.data[0].debugId=this.env[dt]||"",this.logByPost(i,i.data[0])},d.pr.send=function(t,e,n){this.isReady?this.sendData.apply(this,arguments):this.logCache.push(arguments)},d.pr.request=function(t,e){var n=!!this.env[dt],i="https://neptune.jd.com/log/m/v3?std="+t.std;x({url:e?i:s.addr(n)+"?std="+t.std,data:t,method:"POST",header:{"content-type":"application/json"},success:function(t){}})},d.pr.exports=function(){var t=this;return{set:function(e){t.setData(e)},pv:function(e){t.lastPvTime&&b()-t.lastPvTime<100||(t.lastPvTime=b(),t.setData(e),t.setupPageview(!0),t.send("wx_app.000000","pv",e))},click:function(e){t.send("wx_app.000001","cl",e)},exposure:function(e){t.send("wx_app.000005","ep",e)},autoClick:function(e){var n,i=e.target.dataset,x=e.currentTarget.dataset;if(i&&i.eid?n=i:x&&x.eid&&(n=x),n){var a={eid:n.eid,elevel:n.elevel,eparam:n.eparam,pname:n.pname,pparam:n.pparam,target:n.target,event:e};t.send("wx_app.000001","cl",a)}},addToCart:function(e){t.send("wx_app.000002","cd",e)},order:function(e){t.send("wx_app.000003","od",e)},pageUnload:function(e){t.send("wx_app.000004","sr",e)},getSeries:function(){return t.env[M]||(t.setupPageview(),t.env[M]=!0),JSON.stringify(t.getSeriesData())},urlAddSeries:function(t){var e=(t||"").indexOf("#"),n="wxappSeries="+encodeURIComponent(this.getSeries());return e>-1?e===t.length-1?t+n:t+"&"+n:t+"#"+n},setMParam:function(e){return t.setMParam(e)},getJda:function(){return n(s.jdaKey)},getJdv:function(){return n(s.jdvKey)},getStorage:function(t){return n(t)},setStorage:function(t,e){return i(t,e)},setJdv:function(t){return t&&5===t.split("|").length&&i(s.jdvKey,t+"|"+b())}}};var p=2e3,u=1e3,h=1e3,l=100,v=10,f=null,m={num:"numberOut",time:"timeOut",pageHide:"pageHide"};function g(t){t&&k(t)&&(s.sendByBatch=t.h5_size&&1!=t.h5_size||t.h5_time&&1!=t.h5_time,v=t.h5_size?+t.h5_size:v,h=t.h5_time?1e3*t.h5_time:h)}function y(t,e){var n;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(t[n],n)}function w(t,e){y(t,function(t,n){e[n]=t})}function j(t){var e,n,i,x={};for(w(t[0],x),e=0;e<t.length;++e)for(i=[],y(x,function(n,x){n!==t[e][x]&&i.push(x)}),n=0;n<i.length;++n)delete x[i[n]];return y(x,function(n,i){for(e=0;e<t.length;++e)delete t[e][i]}),x.data=t,x}function D(){var t=n(s.batchKey);if(t){var e,i=t.data;for(delete t.data,e=0;e<i.length;++e)w(t,i[e]);return i}return[]}d.pr.batchSend=function(t,e){try{if(t.length){i(s.batchKey,null);var n=j(t);n.batch_report_type=e,n.report_ts=b()/1e3,n.token=d.md5(n.report_ts+s.md5Salt),this.request(n,!0)}}catch(t){}},d.pr.logByPost=function(t,e){var n=this;if(!!!this.env[dt]&&s.sendByBatch)try{if(!f){!function t(e,n){var i=p+(u*Math.random()<<0),x=h+(l*Math.random()<<0);f=setTimeout(function(){try{n.batchSend(D(),m.time),t(!1,n)}catch(t){}},e?i:x)}(!0,n),r(function(){!function(t){try{clearTimeout(f),f=null,n.batchSend(D(),t)}catch(t){}}(m.pageHide)})}var x={};delete t.report_ts,delete t.token,delete t.data,w(t,x),w(e,x);var a=D().concat(x);a.length>=v?this.batchSend(a,m.num):i(s.batchKey,j(a))}catch(t){}else this.request(t)},function(t){var e=0;function n(t){return x(i(a(t)))}function i(t){return c(_(r(t),8*t.length))}function x(t){for(var n,i=e?"0123456789ABCDEF":"0123456789abcdef",x="",a=0;a<t.length;a++)n=t.charCodeAt(a),x+=i.charAt(n>>>4&15)+i.charAt(15&n);return x}function a(t){for(var e,n,i="",x=-1;++x<t.length;)e=t.charCodeAt(x),n=x+1<t.length?t.charCodeAt(x+1):0,55296<=e&&e<=56319&&56320<=n&&n<=57343&&(e=65536+((1023&e)<<10)+(1023&n),x++),e<=127?i+=String.fromCharCode(e):e<=2047?i+=String.fromCharCode(192|e>>>6&31,128|63&e):e<=65535?i+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):e<=2097151&&(i+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return i}function r(t){var e,n=Array(t.length>>2);for(e=0;e<n.length;e++)n[e]=0;for(e=0;e<8*t.length;e+=8)n[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return n}function c(t){for(var e="",n=0;n<32*t.length;n+=8)e+=String.fromCharCode(t[n>>5]>>>n%32&255);return e}function _(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var n=1732584193,i=-271733879,x=-1732584194,a=271733878,r=0;r<t.length;r+=16){var c=n,_=i,s=x,d=a;i=h(i=h(i=h(i=h(i=u(i=u(i=u(i=u(i=p(i=p(i=p(i=p(i=o(i=o(i=o(i=o(i,x=o(x,a=o(a,n=o(n,i,x,a,t[r+0],7,-680876936),i,x,t[r+1],12,-389564586),n,i,t[r+2],17,606105819),a,n,t[r+3],22,-1044525330),x=o(x,a=o(a,n=o(n,i,x,a,t[r+4],7,-176418897),i,x,t[r+5],12,1200080426),n,i,t[r+6],17,-1473231341),a,n,t[r+7],22,-45705983),x=o(x,a=o(a,n=o(n,i,x,a,t[r+8],7,1770035416),i,x,t[r+9],12,-1958414417),n,i,t[r+10],17,-42063),a,n,t[r+11],22,-1990404162),x=o(x,a=o(a,n=o(n,i,x,a,t[r+12],7,1804603682),i,x,t[r+13],12,-40341101),n,i,t[r+14],17,-1502002290),a,n,t[r+15],22,1236535329),x=p(x,a=p(a,n=p(n,i,x,a,t[r+1],5,-165796510),i,x,t[r+6],9,-1069501632),n,i,t[r+11],14,643717713),a,n,t[r+0],20,-373897302),x=p(x,a=p(a,n=p(n,i,x,a,t[r+5],5,-701558691),i,x,t[r+10],9,38016083),n,i,t[r+15],14,-660478335),a,n,t[r+4],20,-405537848),x=p(x,a=p(a,n=p(n,i,x,a,t[r+9],5,568446438),i,x,t[r+14],9,-1019803690),n,i,t[r+3],14,-187363961),a,n,t[r+8],20,1163531501),x=p(x,a=p(a,n=p(n,i,x,a,t[r+13],5,-1444681467),i,x,t[r+2],9,-51403784),n,i,t[r+7],14,1735328473),a,n,t[r+12],20,-1926607734),x=u(x,a=u(a,n=u(n,i,x,a,t[r+5],4,-378558),i,x,t[r+8],11,-2022574463),n,i,t[r+11],16,1839030562),a,n,t[r+14],23,-35309556),x=u(x,a=u(a,n=u(n,i,x,a,t[r+1],4,-1530992060),i,x,t[r+4],11,1272893353),n,i,t[r+7],16,-155497632),a,n,t[r+10],23,-1094730640),x=u(x,a=u(a,n=u(n,i,x,a,t[r+13],4,681279174),i,x,t[r+0],11,-358537222),n,i,t[r+3],16,-722521979),a,n,t[r+6],23,76029189),x=u(x,a=u(a,n=u(n,i,x,a,t[r+9],4,-640364487),i,x,t[r+12],11,-421815835),n,i,t[r+15],16,530742520),a,n,t[r+2],23,-995338651),x=h(x,a=h(a,n=h(n,i,x,a,t[r+0],6,-198630844),i,x,t[r+7],10,1126891415),n,i,t[r+14],15,-1416354905),a,n,t[r+5],21,-57434055),x=h(x,a=h(a,n=h(n,i,x,a,t[r+12],6,1700485571),i,x,t[r+3],10,-1894986606),n,i,t[r+10],15,-1051523),a,n,t[r+1],21,-2054922799),x=h(x,a=h(a,n=h(n,i,x,a,t[r+8],6,1873313359),i,x,t[r+15],10,-30611744),n,i,t[r+6],15,-1560198380),a,n,t[r+13],21,1309151649),x=h(x,a=h(a,n=h(n,i,x,a,t[r+4],6,-145523070),i,x,t[r+11],10,-1120210379),n,i,t[r+2],15,718787259),a,n,t[r+9],21,-343485551),n=l(n,c),i=l(i,_),x=l(x,s),a=l(a,d)}return Array(n,i,x,a)}function s(t,e,n,i,x,a){return l((r=l(l(e,t),l(i,a)))<<(c=x)|r>>>32-c,n);var r,c}function o(t,e,n,i,x,a,r){return s(e&n|~e&i,t,e,x,a,r)}function p(t,e,n,i,x,a,r){return s(e&i|n&~i,t,e,x,a,r)}function u(t,e,n,i,x,a,r){return s(e^n^i,t,e,x,a,r)}function h(t,e,n,i,x,a,r){return s(n^(e|~i),t,e,x,a,r)}function l(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}d.md5=n}();var b=function(){return(new Date).getTime()},S=function(){return b()+""+parseInt(2147483647*Math.random())},k=function(t){return"[object Object]"=={}.toString.call(t)},P=function(t,e){if(k(t)&&k(e))for(var n in e)t[n]=e[n]},C=function(t){var e=[];if(k(t))for(var n in t)"m_param"!==n&&e.push(n+"="+t[n]);return e.join("&")},I=function(t){if(k(t))for(var e in t)return!1;return!0},q=0,K=q++,R=q++,z=q++,T=q++,A=q++,E=q++,O=q++,U=q++,L=q++,M=q++,J=q++,N=q++,B=q++,V=q++,W=q++,H=q++,X=q++,$=q++,F=q++,Y=q++,G=q++,Q=q++,Z=q++,tt=q++,et=q++,nt=q++,it=q++,xt=q++,at=q++,rt=q++,ct=q++,_t=q++,st=q++,ot=q++,dt=q++,pt=q++;d.pr.getData=function(t){for(var e={},n=0,i=t.length;n<i;n++){var x=t[n];e[x[0]]=this.env[x[1]]||""}return e};var ut=null;d.pr.getPname=function(t){return(t=t||{}).pname||this.env[Y]||this.env[B]||this.env[H]||""},d.pr.getPparam=function(t){return(t=t||{}).pparam||this.env[G]||this.env[V]||this.env[X]||""},d.pr.getUrl=function(){return this.env[B]||this.env[H]||""},d.pr.getUrlParam=function(){return this.env[V]||this.env[X]||""},d.pr.setupPageview=function(t){var x,a,r,c=this.env,_=b(),o=parseInt(_/1e3),p=n(s.jdaKey),u=n(s.jddKey),h=n(s.jdvKey),l=n(s.debugKey);c[J]=!0;try{var v=(ct=getCurrentPages())[ct.length-1];c[H]=v.route||v.__route__||"";var f=k(v.options)?v.options:{};c[X]=C(f)||"",c[$]=f,this.setMParam((this.env[W]||{}).m_param||f.m_param)}catch(t){}c[L]=!1,x=o,a=c,(r=(u||"").split(".")).length>1?a[L]=a[L]||1*r[1]+s.sessionTime<x:a[L]=!0;var m,g,y,w,j,D,P,q,K,M,N,B,V,F,Y=function(t,n,i){var x=(t||"").split("|"),a="",r="",c="",_="",o=!0;x.length>=6&&n-x[5]<=s.jdvTimeMS&&(a=x[1],r=x[2],c=x[3],_=x[4],o=!1);var d=I(i[W])?i[$]:i[W],p=[];if(ut&&e[ut]){var u=e[ut];p[0]=u[0],p[1]=encodeURIComponent(u[1]),p[2]=encodeURIComponent(u[2])||"none",p[3]=encodeURIComponent(u[3])||"-",ut=null}d&&d.utm_source&&(p[0]=encodeURIComponent(d.utm_source),p[1]=encodeURIComponent(d.utm_campaign||"")||r,p[2]=encodeURIComponent(d.utm_medium||"")||c,p[3]=encodeURIComponent(d.utm_term||"")||_,_=p[3],o=!0);var h=!1;p.length>0&&"direct"!=p[0]?h=(p[0]!==a||p[1]!==r||p[2]!==c)&&"referral"!==p[2]:p.length>0&&"direct"==p[0]&&("direct"===a||!a)&&(h=p[1]!==r||p[2]!==c||p[3]!==_);var l="";return h&&(a=p[0]||a,r=p[1]||r,c=p[2]||c,_=p[3]||_),(o||h)&&(l=[1,a||"direct",r||"-",c||"none",_||"-",n].join("|")),i[L]=i[L]||h,l}(h,_,c),G=(M=o,N=c,B=t,V=(u||"").split("."),F=1,V.length>1?(N[L]=N[L]||1*V[1]+s.sessionTime<M,F=(N[L]?1:B?1*V[0]+1:1*V[0])||1):N[L]=!0,N[E]=F,F+"."+M),tt=(m=o,g=c,P=(p||"").split("."),q=1,K=1,P.length>5?(q=P[0]||q,y=P[1]||S(),w=P[2]||m,g[L]?(j=P[4]||m,D=m,K=1*P[5]+1||1):(j=P[3]||m,D=P[4]||m,K=1*P[5]||1)):(y=S(),w=j=D=m,K=1),g[st]=q,g[R]=y,g[z]=w,g[T]=j,g[A]=D,g[O]=K,[q,y,w,j,D,K].join("."));i(s.jddKey,G),i(s.jdaKey,tt),Y&&i(s.jdvKey,Y),c[U]=Y||h,d.setAppData(),function(t){if(t[ot]&&t[ot].pv_sid&&t[ot].pv_seq){var e=1*t[ot].pv_sid,n=1*t[ot].pv_seq;e>99999999||(e>t[O]||e==t[O]&&n>=t[E])&&(t[O]=e,t[E]=n+1)}}(c);var et,nt,rt=function(t,e,n){var i=I(n[W])?n[$]:n[W],x="",a="";if(i&&i.customerinfo)x=i.customerinfo,a=e;else{var r=t instanceof Array?t:[];2==r.length&&e-r[1]<s.customerInfoTime&&(x=r[0],a=r[1])}return n[at]=x,x?[x,a]:[]}(n(s.customerInfoKey),o,c);i(s.customerInfoKey,rt),et=this.env,(nt=n("jdwcx")||n("jdzdm"))&&(nt.unionid&&(et[it]=nt.unionid),nt.wxversion&&(et[xt]=nt.wxversion));try{v=(ct=getCurrentPages())[ct.length-1];var ct,_t=k(v.options)?v.options:{},pt=decodeURIComponent(_t.scene),ht=new RegExp("(^|&)"+s.debugKey+"=([^&]*)(&|$)"),lt=pt.match(ht),vt=_t[s.debugKey];null!=lt&&(vt=lt[2]),vt?(i(s.debugKey,vt),l=vt):c[L]&&(i(s.debugKey,""),l=""),c[dt]=l}catch(t){}if(c[L])c[Q]="",c[Z]="";else{var ft=n(s.referKey);c[Q]=ft[0],c[Z]=ft[1]}i(s.referKey,[this.getUrl(),this.getUrlParam()])},d.pr.initMulcommonData=function(){var t=d.instance&&d.instance.env||[],e={account:tt,siteId:K,appid:et,openid:nt,unionid:it};for(var n in e)this.env[e[n]]=this.env[e[n]]||t[e[n]]},d.pr.initPvData=function(t){this.pageLoadTime=b(),this.maxClickDeep=0,t=t||{};var e=this.baseEnv(),n=e.data[0];return n.page_id=this.env[F]||"",n.pname=this.getPname(t),n.pparam=this.getPparam(t),n.sku=this.env[rt]||"",n.shp=this.env[ct]||"",n.tit=this.env[N]||"",n.ldt=this.env[_t]||"",P(n.ext,t.ext),e},d.pr.initClickData=function(t){var e,n=this.baseEnv(),i=n.data[0];if(i.eid=t.eid||"",i.eparam=t.eparam||"",i.elevel=t.elevel||"",i.page_id=t.pageId||this.env[F]||"",i.pname=this.getPname(t),i.pparam=this.getPparam(t),i.tar=t.target||"",i.x=0,i.y=0,e=t.event,k(e)&&e.type&&e.target){var x=t.event,a=x.touches;if((!a||a.length<1)&&(a=x.changedTouches),a&&a.length>0){i.x=parseInt(a[0].pageX);var r=parseInt(a[0].pageY);i.y=r,r>this.maxClickDeep&&(this.maxClickDeep=r)}}return P(i.ext,t.ext),n},d.pr.initExposureData=d.pr.initClickData,d.pr.initShoppingData=function(t){var e=this.baseEnv(),n=e.data[0];return n.eid=t.eid||"",n.eparam=t.eparam||"",n.elevel=t.elevel||"",n.page_id=t.pageId||this.env[F]||"",n.pname=this.getPname(t),n.pparam=this.getPparam(t),n.sku_list=t.shoppingList?JSON.stringify(t.shoppingList):"",P(n.ext,t.ext),e},d.pr.initOrderData=function(t){var e=this.baseEnv(),n=e.data[0];return n.eid=t.eid||"",n.eparam=t.eparam||"",n.elevel=t.elevel||"",n.page_id=t.pageId||this.env[F]||"",n.pname=this.getPname(t),n.pparam=this.getPparam(t),n.sku_list=t.orderList?JSON.stringify(t.orderList):"",n.order_total_fee=t.total||0,n.sale_ord_id=t.orderid||"",P(n.ext,t.ext),e},d.pr.initPageUnloadData=function(t){var e=((b()-this.pageLoadTime)/1e3).toFixed(3),n=this.baseEnv(),i=n.data[0];return t=t||{},i.page_id=t.pageId||this.env[F]||"",i.pname=this.getPname(t),i.pparam=this.getPparam(t),i.alive_seconds=e,i.click_deep=this.maxClickDeep,P(i.ext,t.ext),n},d.pr.initStrategy=function(t){var e=n(s.reportStrategy);x({url:"https://policy.jd.com/m/log/v2?key=x&item="+t+"&v="+(e&&e.v),method:"GET",header:{"content-type":"application/json"},success:function(t){t&&t.data&&("1"===t.data.code&&g(e),"0"===t.data.code&&(i(s.reportStrategy,t.data),g(t.data)))}})},function(){d.wxDat={};var t=d.wxDat;a({success:function(e){e&&(t.dvc=e.model,t.pixelRatio=(e.pixelRatio||"")+"",t.scr=parseInt(e.windowWidth)+"x"+parseInt(e.windowHeight),t.lang=e.language,t.wxver=e.version,t.sdkver=e.SDKVersion||"")},complete:function(){d.dataReady("sysinfo")}}),c({success:function(e){e&&(t.net=e.networkType)},complete:function(){d.dataReady("netType")}})}(),d.pr.setData=function(t){t=k(t)?t:{};var e=k(t.urlParam)?t.urlParam:{},i={skuid:[rt],shopid:[ct],title:[N],loadtime:[_t],url:[B],urlParam:[V,C],pname:[Y],pparam:[G],pageId:[F]},x={account:[tt],siteId:[K],appid:[et],openid:[nt],unionid:[it],sendByBatch:[pt]};this.ext={},this.env[W]=e,this.setMParam(e.m_param);for(var a in i){var r=i[a];this.env[r[0]]=t[a]?r[1]?r[1](t[a]):t[a]:"",delete t[a]}for(var a in x){r=x[a];this.env[r[0]]=t[a]?r[1]?r[1](t[a]):t[a]:this.env[r[0]]||"",delete t[a]}for(var a in t)"ext"!==a&&(this.ext[a]=t[a]);this.env[et]||(this.env[et]=n("appid")),this.env[pt]&&this.env[K]&&!d.isStrategyReady&&(d.isStrategyReady=!0,this.initStrategy(this.env[K]))},d.appDat={},d.setAppData=function(t){try{var e={},x=n(s.sysExtKey);P(e,x),P(e,t);for(var a in e)d.appDat[a]=e[a];i(s.sysExtKey,e)}catch(t){}},d.clearAppData=function(){d.appDat={},function(e){try{t.removeStorageSync(e)}catch(t){}}(s.sysExtKey)},d.scene=null,d.setScene=function(t){d.scene=t,ut=t},d.pr.setMParam=function(t){try{var e=JSON.parse(t);this.env[ot]=k(e)?e:{}}catch(t){this.env[ot]={}}},d.pr.baseEnv=function(){this===d.instance?this.env[J]||this.setupPageview():this.initCommon||(this.initMulcommonData(),this.initCommon=!0);var t=this.env,e=d.wxDat,i={cli:_,std:t[K]||"WXAPP-JA2016-1",uuid:t[R]||"",scr:e.scr||"",dvc:e.dvc||"",lang:e.lang||"",appkey:t[xt]||"",appid:t[et]||"",openid:t[nt]||"",unionid:t[it]||"",gender:e.gender||"",city:e.city||"",province:e.province||"",country:e.country||"",wxver:e.wxver||"",data:[]},x=[["realUrl",H],["realParam",X],["ref",Q],["rpr",Z],["seq",E],["vts",O],["pin",tt],["fst",z],["pst",T],["vct",A]],a=this.getData(x);return a.jsver="TR1.0.1",a.net=e.net||"",a.lat=e.lat||"",a.lon=e.lon||"",a.speed=e.speed||"",a.accuracy=e.accuracy||"",a.pixelRatio=e.pixelRatio||"",a.jdv=t[U]||"",a.customerInfo=t[at]||"",a.ctp=this.getUrl(),a.par=this.getUrlParam(),a.unpl=n("unpl")||"",a.scene=d.scene||"",a.sdkver=e.sdkver||"",a.ext={},a.std_param=d.appDat,P(a.ext,this.ext),P(a.ext,d.appDat),i.data.push(a),i},d.pr.getSeriesData=function(){var t=this.env,e={uuid:t[R]||"",std:t[K]||"WXAPP-JA2016-1",seq:t[E],vts:t[O]};return t[xt]&&(e.appkey=t[xt]),t[et]&&(e.appid=t[et]),t[dt]&&(e.debugId=t[dt]),e},d.initJda=function(){var t=n(s.jdaKey);if(!t){var e=b();t=[1,S(),e,e,e,0].join("."),i(s.jdaKey,t)}return t},module.exports={init:function(t){return d.getInstance().exports()},instance:function(t){return d.getMulInstance(t).exports()},usePlugin:function(t){if(t)try{pluginObj=requirePlugin(t)}catch(t){}},setAppData:function(t){d.setAppData(t)},clearAppData:function(){d.clearAppData()},setScene:function(t){d.setScene(t)}}}(Taro);
|
|
@@ -10,12 +10,21 @@
|
|
|
10
10
|
// 不能加overflow 防止IntersectionObserver监听异常
|
|
11
11
|
//overflow: hidden;
|
|
12
12
|
}
|
|
13
|
+
|
|
13
14
|
|
|
14
15
|
.d-floor-item {
|
|
15
16
|
overflow: hidden;
|
|
16
17
|
display: block; // 由于taro的View属于一种自定义标签,虽然taro自己会给View设置display为block,但是这个是一个异步过程,而自定义标签的默认display是inline,inline状态下即使设置了overflow:hidden,也会由于内容过大导致宽度被撑大而超出容器实际宽度。所以为了保证楼层容器节点在加载过程中不被撑大,需要显示设置display:block
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
+
.d-floor-chart-item{
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: 0;
|
|
22
|
+
left: 0;
|
|
23
|
+
right: 0;
|
|
24
|
+
bottom: 0;
|
|
25
|
+
pointer-events: auto;
|
|
26
|
+
z-index: 99;
|
|
27
|
+
}
|
|
19
28
|
.d-container-item {
|
|
20
29
|
//opacity: 0;
|
|
21
30
|
//animation: containerShowToOpacity 500ms;
|