@conecli/cone-render 0.10.1-shop-beta.11 → 0.10.1-shop-beta.13

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.
Files changed (78) hide show
  1. package/README.md +1 -1
  2. package/dist/common/const.ts +1 -1
  3. package/dist/common/index.dynamic.ts +1 -0
  4. package/dist/common/index.h5.ts +1 -1
  5. package/dist/common/index.jd.ts +1 -1
  6. package/dist/common/index.ts +1 -1
  7. package/dist/common/index.weapp.ts +1 -1
  8. package/dist/common/jssdk.ts +1 -1
  9. package/dist/common/token/index.h5.ts +1 -1
  10. package/dist/common/wxappApi.ts +1 -1
  11. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  12. package/dist/components/base/CountDown/index.tsx +1 -1
  13. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  14. package/dist/components/base/Dialog/index.dynamic.module.scss +126 -0
  15. package/dist/components/base/Dialog/index.dynamic.tsx +1 -0
  16. package/dist/components/base/DynamicTest/index.dynamic.module.scss +15 -0
  17. package/dist/components/base/DynamicTest/index.module.scss +16 -0
  18. package/dist/components/base/DynamicTest/index.tsx +1 -0
  19. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  20. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  21. package/dist/components/base/JdLoading/index.module.scss +2 -0
  22. package/dist/components/base/JdLoading/index.tsx +1 -1
  23. package/dist/components/base/LazyLoadImage/index.tsx +1 -1
  24. package/dist/components/base/NetworkDataError/const.ts +1 -1
  25. package/dist/components/base/NetworkDataError/index.module.scss +116 -70
  26. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  27. package/dist/components/base/Price/Base/index.dynamic.module.scss +63 -0
  28. package/dist/components/base/Price/Base/index.dynamic.tsx +1 -0
  29. package/dist/components/base/Price/Base/index.module.scss +6 -0
  30. package/dist/components/base/Price/Base/index.tsx +1 -1
  31. package/dist/components/base/Price/Double/index.dynamic.module.scss +172 -0
  32. package/dist/components/base/Price/Double/index.dynamic.tsx +1 -0
  33. package/dist/components/base/Price/Double/index.module.scss +6 -0
  34. package/dist/components/base/Price/Double/index.tsx +1 -1
  35. package/dist/components/debug/DebugLayout/index.module.scss +2 -2
  36. package/dist/config/env.ts +1 -1
  37. package/dist/interface/common.ts +1 -1
  38. package/dist/interface/component.ts +1 -1
  39. package/dist/interface/jumpEventReport.ts +1 -1
  40. package/dist/jumpEventReport/const.ts +1 -1
  41. package/dist/jumpEventReport/index.dynamic.ts +1 -0
  42. package/dist/jumpEventReport/index.h5.ts +1 -1
  43. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  44. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  45. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  46. package/dist/jumpEventReport/web.base.ts +1 -1
  47. package/dist/jumpEventReport/web.jd.ts +1 -1
  48. package/dist/language/zh_CN.json +162 -0
  49. package/dist/open/api/index.ts +1 -1
  50. package/dist/open/api/shopMember.dynamic.ts +1 -0
  51. package/dist/open/api/shopMember.ts +1 -1
  52. package/dist/open/components/index.dynamic.ts +1 -0
  53. package/dist/open/components/index.ts +1 -1
  54. package/dist/sass/app.dynamic.scss +306 -0
  55. package/dist/service/fetchGateway.h5.ts +1 -0
  56. package/dist/service/fetchGateway.ts +1 -1
  57. package/dist/service/fetchGateway.weapp.ts +1 -1
  58. package/dist/service/fetchJsonp.h5.ts +1 -0
  59. package/dist/service/fetchJsonp.ts +1 -1
  60. package/dist/service/http/colorSign.dynamic.ts +1 -0
  61. package/dist/service/http/http.ts +1 -1
  62. package/dist/service/requestServer.h5.ts +1 -1
  63. package/dist/service/requestServer.ts +1 -1
  64. package/dist/service/requestServer.weapp.ts +1 -1
  65. package/dist/utils/connectNativeJsBridge.dynamic.ts +1 -0
  66. package/dist/utils/connectNativeJsBridge.ts +1 -1
  67. package/dist/utils/h5Utils.ts +1 -1
  68. package/dist/utils/index.h5.ts +1 -1
  69. package/dist/utils/index.ts +1 -1
  70. package/dist/utils/index.weapp.ts +1 -1
  71. package/dist/utils/intersectionObserver.ts +1 -1
  72. package/dist/utils/jumpExtMapUtil.ts +1 -0
  73. package/dist/utils/log.ts +1 -0
  74. package/dist/utils/utils.ts +1 -1
  75. package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
  76. package/dist/wxapp/common/user_info.js +1 -1
  77. package/package.json +51 -31
  78. /package/dist/utils/{jumpExtMapUtil.js → jumpExtMapUtil.h5.ts} +0 -0
@@ -0,0 +1 @@
1
+ import Taro from '@tarojs/taro';
2
  parseQueryUrlString,
1
3
  routerInfo: {
2
4
  params: {},
3
5
  },
4
6
  nativeEvent: null,
5
7
  jumpConfig: {
6
8
  venderId: null,
7
9
  shopId: null,
8
10
  sourceValue: '',
9
11
  sourceType: 'App-H5',
10
12
  activityType: 'shopx',
11
13
  moduleId: 'none',
12
14
  entrance: 'none',
13
15
  },
14
16
  logPageParamStr: '',
15
17
  public logPageId: string;
16
18
  public jumpConfig: JumpEventReportInterFace.JumpH5ReportConfig;
17
19
  constructor(opt = {}) {
18
20
  super(opt);
19
21
  this.getConfig(opt);
20
22
  }
21
23
  getConfig(opt = {}) {
22
24
  return Object.assign(this, {}, defaultConfig, opt);
23
25
  }
24
26
  updateInfo(routerInfo, logPname = LogPnameInfo.HOME, pageId = LogPageIdInfo.APP) {
25
27
  this.logPageId = pageId;
26
28
  this.routerInfo = routerInfo;
27
29
  this.jumpConfig = Object.assign({}, this.jumpConfig, routerInfo.params);
28
30
  this.logPname = logPname;
29
31
  }
30
32
  reportInfoPv(
31
33
  pageId = LogPageIdInfo.APP,
32
34
  opt: {
33
35
  pageParam?: any;
34
36
  } = {},
35
37
  ) {
36
38
  const { pageParam } = opt;
37
39
  this.logPageParamStr = pageParam
38
40
  ? pageParam
39
41
  : this.creatParamToLogStr(this.jumpConfig)
40
42
  .replace(/moduleId/, 'JumpmoduleID')
41
43
  .replace(/entrance/, 'Jumpentrance');
42
44
  this.reportPV({
43
45
  pageId,
44
46
  pageParam: this.logPageParamStr,
45
47
  ...opt,
46
48
  });
47
49
  }
48
50
 
49
51
  jdJumpToDongDongChatGroup(groupId, source = '4') {
50
52
  this.jdNavigateToNative({
51
53
  category: 'jump',
52
54
  des: 'dongdong_group_chat',
53
55
  source: source,
54
56
  groupId: `${groupId}`,
55
57
  });
56
58
  }
57
59
 
58
60
  jdJumpToWeb(
59
61
  url,
60
62
  logEventInfo,
61
63
  successBack?: functionType | undefined,
62
64
  failBack?: functionType | undefined,
63
65
  ) {
64
66
  console.log('jd web', this.isOpenJdAppUrl(url), url);
65
67
  if (this.isOpenJdAppUrl(url)) {
66
68
  const getOpenAppParams = this.jdOpenAppParams(url);
67
69
  console.log('jd web 获取自定义openApp链接解析后的参数结果', getOpenAppParams);
68
70
  if (getOpenAppParams) {
69
71
  this.jdNavigateToNative(
70
72
  Object.assign({}, getOpenAppParams, {
71
73
  logEventInfo,
72
74
  }),
73
75
  );
74
76
  }
75
77
  } else {
76
78
  let _getLastUrl = url;
77
79
  if (/shop\.m\.jd\.com|pages\.jd\.com/.test(_getLastUrl)) {
78
80
  const getUrlSearchParamState = _getLastUrl.indexOf('?') !== -1;
79
81
  if (!/jwebprog=0/.test(_getLastUrl)) {
80
82
  _getLastUrl = `${_getLastUrl}${getUrlSearchParamState ? '&' : '?'}jwebprog=0`;
81
83
  }
82
84
  if (global.info.sysInfo?.isJdTabletDevice && !/device=tablet/.test(_getLastUrl)) {
83
85
  _getLastUrl = `${_getLastUrl}${getUrlSearchParamState ? '&' : '?'}device=tablet`;
84
86
  }
85
87
  }
86
88
  super.jdJumpToWeb(
87
89
  _getLastUrl,
88
90
  {
89
91
  ...logEventInfo,
90
92
  },
91
93
  successBack,
92
94
  failBack,
93
95
  );
94
96
  }
95
97
  }
96
98
 
97
99
  jdJumpToWebInner(url, logEventInfo) {
98
100
  this.jdJumpToWeb(url, logEventInfo);
99
101
  }
100
102
 
101
103
  jdJumpConfigUrl(detail, logEventInfo = {}) {
102
104
  const { configDataType, configDataValue } = detail;
103
105
  switch (configDataType) {
104
106
  case LinkConfigType.CONFIG_TYPE_CATEGORY_PAGE:
105
107
  this.jdJumpToShopCategory({
106
108
  ...configDataValue,
107
109
  logEventInfo,
108
110
  });
109
111
  break;
110
112
  case LinkConfigType.CONFIG_TYPE_SKU_LIST:
111
113
  if (logEventInfo?.jsonParam?.logBaseInfo?.mInfo) {
112
114
  logEventInfo.jsonParam.logBaseInfo.mInfo.skuid = configDataValue.skuIds;
113
115
  }
114
116
  this.jdJumpToProduct(configDataValue.skuIds, logEventInfo);
115
117
  break;
116
118
  case LinkConfigType.CONFIG_TYPE_COUPON_LIST:
117
119
  this.jdJumpToWeb(
118
120
  `${this.jumpWebUrl.shopCoupon}?couponType=1&shopId=${global.info.queryInfo.shopId}&venderId=${global.info.queryInfo.venderId}`,
119
121
  {},
120
122
  );
121
123
  break;
122
124
  case LinkConfigType.CONFIG_TYPE_CATEGORY:
123
125
  if (this.isOpenJdAppUrl(configDataValue.clickUrl)) {
124
126
  const getShopSearchParams = this.jdOpenAppParams(configDataValue.clickUrl);
125
127
  console.log('jd web 获取店铺分类链接解析后的参数结果', getShopSearchParams);
126
128
  getShopSearchParams &&
127
129
  this.jdJumpToShopSearch(
128
130
  Object.assign({}, getShopSearchParams, {
129
131
  logEventInfo,
130
132
  }),
131
133
  );
132
134
  } else {
133
135
  this.jdJumpToShopSearch(
134
136
  configDataValue['cid']
135
137
  ? Object.assign(
136
138
  {},
137
139
  {
138
140
  shopId: global.info.queryInfo.shopId,
139
141
  categoryId: configDataValue.cid,
140
142
  searchType: '5',
141
143
  logEventInfo,
142
144
  },
143
145
  )
144
146
  : {
145
147
  shopId: global.info.queryInfo.shopId,
146
148
  logEventInfo,
147
149
  },
148
150
  );
149
151
  }
150
152
  break;
151
153
  case LinkConfigType.CONFIG_TYPE_MEMBER:
152
154
  if (this.isOpenJdAppUrl(configDataValue.clickUrl)) {
153
155
  const getShopMemberParams = this.jdOpenAppParams(configDataValue.clickUrl);
154
156
  getShopMemberParams &&
155
157
  this.jdJumpToShopMember(
156
158
  Object.assign({}, getShopMemberParams, {
157
159
  logEventInfo,
158
160
  }),
159
161
  );
160
162
  } else {
161
163
  this.jdJumpToShopMember({
162
164
  shopId: global.info.queryInfo.shopId,
163
165
  venderId: configDataValue.shopDetail,
164
166
  logEventInfo,
165
167
  });
166
168
  }
167
169
  break;
168
170
  case LinkConfigType.CONFIG_TYPE_SHOP_ACTIVITY:
169
171
  if (this.isOpenJdAppUrl(configDataValue.clickUrl)) {
170
172
  const getShopActivityParams = this.jdOpenAppParams(configDataValue.clickUrl);
171
173
  getShopActivityParams &&
172
174
  this.jdJumpToShopActivity(
173
175
  Object.assign({}, getShopActivityParams, {
174
176
  logEventInfo,
175
177
  }),
176
178
  );
177
179
  } else if (configDataValue['projectId']) {
178
180
  this.jdJumpToShopActivity({
179
181
  projectId: configDataValue['projectId'],
180
182
  configDataValue,
181
183
  logEventInfo,
182
184
  });
183
185
  }
184
186
  break;
185
187
  case LinkConfigType.CONFIG_TYPE_CUSTOM_LINK:
186
188
  case LinkConfigType.CONFIG_TYPE_FINANCE_COUPON: {
187
189
  const _url = configDataValue.linkUrl;
188
190
  if (
189
191
  _url.indexOf('to=') === -1 &&
190
192
  _url.indexOf(`${domain.mshop.replace(/https?:/, '')}/?shopId=`) !== -1
191
193
  ) {
192
194
  const _shopId = _url.match(/\d+/g)[0];
193
195
  this.jdJumpToShopHome({
194
196
  shopId: `${_shopId}`,
195
197
  logEventInfo,
196
198
  });
197
199
  } else if (this.isOpenJdAppUrl(_url)) {
198
200
  const getOpenAppParams = this.jdOpenAppParams(_url);
199
201
  console.log('jd web 获取自定义链接解析后的参数结果', getOpenAppParams);
200
202
  if (getOpenAppParams) {
201
203
  let _changeOpenAppParams = getOpenAppParams;
202
204
  const { operation, ...otherOpenAppParams } = getOpenAppParams;
203
205
  if (operation && operation === 'jumpTabInner') {
204
206
  _changeOpenAppParams = otherOpenAppParams;
205
207
  }
206
208
  this.jdNavigateToNative(
207
209
  Object.assign({}, _changeOpenAppParams, {
208
210
  logEventInfo,
209
211
  }),
210
212
  );
211
213
  }
212
214
  } else {
213
215
  this.jdJumpToWeb(_url, logEventInfo);
214
216
  }
215
217
  break;
216
218
  }
217
219
  case LinkConfigType.CONFIG_TYPE_JSHOP_DETAIL:
218
220
  this.jdJumpToShopDetail({
219
221
  venderId: global.info.queryInfo.venderId,
220
222
  shopId: global.info.queryInfo.shopId,
221
223
  logEventInfo,
222
224
  });
223
225
  break;
224
226
  case LinkConfigType.CONFIG_TYPE_SHOP_HOME:
225
227
  this.jdJumpToShopHome({
226
228
  ...configDataValue,
227
229
  logEventInfo,
228
230
  });
229
231
  break;
230
232
  case LinkConfigType.CONFIG_TYPE_ANCHOR_POINT:
231
233
  break;
232
234
  case LinkConfigType.CONFIG_TYPE_SHOPPING_GUIDE:
233
235
  if (this.isOpenJdAppUrl(configDataValue.clickUrl)) {
234
236
  const getShoppingGuideParams = this.jdOpenAppParams(configDataValue.clickUrl);
235
237
  getShoppingGuideParams &&
236
238
  this.jdJumpToShopActivity(
237
239
  Object.assign({}, getShoppingGuideParams, {
238
240
  logEventInfo,
239
241
  }),
240
242
  );
241
243
  }
242
244
  break;
243
245
  case LinkConfigType.CONFIG_TYPE_MINI_PROGRAM: {
244
246
  const linkUrl = decodeURIComponent(configDataValue?.linkUrl || '');
245
247
  const search = linkUrl.match(/\?.+/);
246
248
  if (search) {
247
249
  const miniQueryData: JumpEventReportInterFace.LinkMiniParams =
248
250
  parseQueryUrlString(linkUrl);
249
251
  try {
250
252
  miniQueryData.param = JSON.parse(miniQueryData?.param);
251
253
  } catch (e) {
252
254
  console.warn('解析小程序 param 错误:', miniQueryData);
253
255
  }
254
256
  this.jdJumpToMiniProgram(miniQueryData);
255
257
  } else {
256
258
  console.warn('小程序地址错误:', linkUrl);
257
259
  }
258
260
  break;
259
261
  }
260
262
  case LinkConfigType.CONFIG_TYPE_SHOP_SEARCH: {
261
263
  if (this.isOpenJdAppUrl(configDataValue.clickUrl)) {
262
264
  const getShopSearchParams = this.jdOpenAppParams(configDataValue.clickUrl);
263
265
  console.log('jd web 获取店铺结果落地页链接解析后的参数结果', getShopSearchParams);
264
266
  getShopSearchParams &&
265
267
  this.jdJumpToShopSearch(
266
268
  Object.assign({}, getShopSearchParams, {
267
269
  logEventInfo,
268
270
  }),
269
271
  );
270
272
  } else {
271
273
  this.jdJumpToWeb(configDataValue.clickUrl, logEventInfo);
272
274
  }
273
275
  break;
274
276
  }
275
277
  default:
276
278
  }
277
279
  }
278
280
 
279
281
  jdNavigateToNative(
280
282
  params: object,
281
283
  url = 'openapp.jdmobile://virtual',
282
284
  successBack?: functionType | null,
283
285
  failBack?: functionType | null,
284
286
  ) {
285
287
  const getResParams: JumpEventReportInterFace.JdMiniJumpParams = Object.assign(
286
288
  {},
287
289
  {
288
290
  sourceValue: 'sourceValue_jshopModuleWeb',
289
291
  sourceType: 'sourceType_jshopModuleWeb',
290
292
  param: {},
291
293
  },
292
294
  params,
293
295
  );
294
296
  const { logEventInfo, ...otherParams } = getResParams;
295
297
  console.log('[taro dynamic] jdNavigateToNative jd:', params,"融合后的参数getResParams",getResParams,'logEventInfo params: ', logEventInfo);
296
298
  global.info.pageInfo.dataType === BUSINESS_TYPE.ONLINE &&
297
299
  this.clickEventLog(logEventInfo || getResParams).then((res) => {
298
300
  console.log('收到埋点回调,跳转taro dynamic jd 回调结果',res);
299
301
  if (typeof successBack === 'function') {
300
302
  successBack(getResParams);
301
303
  } else {
302
304
  try {
303
305
  const paramsStr = JSON.stringify(otherParams);
304
306
  console.log('跳转taro dynamic jd open协议', `${url}?params=${paramsStr}`);
305
307
  Taro.JDNavigate.navigateTo({
306
308
  url: `${url}?params=${paramsStr}`,
307
309
  }).then(res => {
308
310
  console.log('跳转taro dynamic jd open协议 成功',res);
309
311
  })
310
312
  } catch (e) {
311
313
  console.log('跳转异常', e);
312
314
  }
313
315
  }
314
316
  })
315
317
  .catch(() => {
316
318
  typeof failBack === 'function' && failBack(getResParams);
317
319
  });
318
320
  }
319
321
 
320
322
  clickEventLog(opts: JumpEventReportInterFace.OptEventLogParams = {}, reportKey = 'click') {
321
323
  const { eventId, jsonParam, eventLevel = 3, ...otherParams } = opts;
322
324
  if (eventId && jsonParam) {
323
325
  const { etModelInfo, logBaseInfo } = jsonParam;
324
326
  let getJsonParam = {};
325
327
  if (etModelInfo && logBaseInfo) {
326
328
  getJsonParam = logBaseInfo;
327
329
  } else {
328
330
  if (Array.isArray(jsonParam)) {
329
331
  getJsonParam = jsonParam;
330
332
  } else {
331
333
  getJsonParam = Object.assign(
332
334
  {},
333
335
  {
334
336
  shopid: global.info.queryInfo?.shopId,
335
337
  },
336
338
  jsonParam,
337
339
  );
338
340
  }
339
341
  }
340
342
  if (
341
343
  reportKey === 'exposure' &&
342
344
  /^TerminatorNew/.test(eventId) &&
343
345
  !Array.isArray(getJsonParam)
344
346
  ) {
345
347
  getJsonParam = [getJsonParam];
346
348
  }
347
349
  console.log("eventId",eventId, "jsonParam", jsonParam, "getJsonParam",getJsonParam)
348
350
  const webLogParams = {
349
351
  isExpo: reportKey === 'exposure',
350
352
  eid: eventId,
351
353
  elevel: eventLevel,
352
354
  jsonParam: JSON.stringify(getJsonParam),
353
355
  etModel: JSON.stringify(etModelInfo || {}),
354
356
  pageId: this.logPageId,
355
357
  pageParam: this.logPageParamStr,
356
358
  ...otherParams,
357
359
  };
358
360
  console.log(
359
361
  `jdapp内,taro动态化---埋点参数对象-${reportKey}`,
360
362
  webLogParams,
361
363
  )
362
364
  return new Promise((resolve) => {
363
365
  const {
364
366
  eid,
365
367
  jsonParam,
366
368
  pageParam,
367
369
  pageId = 'TerminatorNew_All',
368
370
  } = webLogParams;
369
371
  const getReportData = {
370
372
  event_id: eid,
371
373
  page_id: pageId,
372
374
  page_name: "",
373
375
  page_param: pageParam,
374
376
  json_param: jsonParam,
375
377
  event_param:"",
376
378
  next_page_name:"",
377
379
  params:{},
378
380
  complete: () => {
379
381
  console.log('日志上报完毕,触发回调')
380
382
  Taro.showToast({
381
383
  title: "日志上报完毕,触发回调",
382
384
  })
383
385
  resolve(true);
384
386
  }
385
387
  }
386
388
  console.log('Taro.JDMTA',Taro.JDMTA,"Taro.JDMTA[reportKey]",Taro.JDMTA[reportKey],"getReportData",getReportData)
387
389
  Taro.JDMTA.click(getReportData).then(res => {
388
390
  console.log("埋点上报成功",res)
389
391
  })
390
392
  resolve(true);
391
393
  });
392
394
  } else {
393
395
  console.log('暂无埋点参数eventId和eventParam');
394
396
  return Promise.resolve(false);
395
397
  }
396
398
  }
397
399
  reportPV(opts){
398
400
  const { pageId, pageParam, isSend = true } = opts;
399
401
  isSend && Taro.JDMTA.pv({
400
402
  page_id: pageId,
401
403
  page_name: "",
402
404
  page_param: pageParam
403
405
  })
404
406
  }
405
407
 
406
408
  exposureEventLog(opts) {
407
409
  return global.info.pageInfo.dataType === BUSINESS_TYPE.ONLINE
408
410
  ? this.clickEventLog(
409
411
  {
410
412
  ...opts,
411
413
  exposureState: true,
412
414
  },
413
415
  'exposure',
414
416
  )
415
417
  : Promise.resolve(false);
416
418
  }
@@ -1 +1 @@
1
- import { isApp, getUrlQuery } from '../utils/jm-common'
2
1
  console.log('h5', isReflexToH5, getUrlQuery(window.location.href, 'reflex'))
3
2
  return new Promise((resolve, reject) => {
4
3
  if (isReflexToH5) {
5
4
  import('./web.base')
6
5
  .then(({ JumpEventWebReport }) => {
7
6
  if (JumpEventWebReport) {
8
7
  console.log('加载普通浏览器h5相关跳转事件js')
9
8
  JumpEventReport = new JumpEventWebReport({})
10
9
  resolve(JumpEventReport)
11
10
  }
12
11
  })
13
12
  .catch((err) => {
14
13
  reject(err)
15
14
  })
16
15
  } else {
17
16
  if (isApp('wx') && isApp('mp') && isH5AdnJxMini) {
18
17
  import('./web.jxwxapp')
19
18
  .then(({ JdJumpWebToJxWxapp }) => {
20
19
  if (JdJumpWebToJxWxapp) {
21
20
  JumpEventReport = new JdJumpWebToJxWxapp({})
22
21
  resolve(JumpEventReport)
23
22
  }
24
23
  })
25
24
  .catch((err) => {
26
25
  reject(err)
27
26
  })
28
27
  } else if (isApp('wx') && isApp('mp')) {
29
28
  import('./web.wxapp')
30
29
  .then(({ JdJumpWebToWxapp }) => {
31
30
  if (JdJumpWebToWxapp) {
32
31
  JumpEventReport = new JdJumpWebToWxapp({})
33
32
  resolve(JumpEventReport)
34
33
  }
35
34
  })
36
35
  .catch((err) => {
37
36
  reject(err)
38
37
  })
39
38
  } else if (isApp('jd') && !isApp('jdharmony')) {
40
39
  import('./web.jd')
41
40
  .then(({ JdJumpWebToJdApp }) => {
42
41
  if (JdJumpWebToJdApp) {
43
42
  JumpEventReport = new JdJumpWebToJdApp({})
44
43
  resolve(JumpEventReport)
45
44
  }
46
45
  })
47
46
  .catch((err) => {
48
47
  reject(err)
49
48
  })
50
49
  } else if (isApp('jdb')) {
51
50
  import('./web.jdb')
52
51
  .then(({ JdbJumpWebToJdbApp }) => {
53
52
  if (JdbJumpWebToJdbApp) {
54
53
  JumpEventReport = new JdbJumpWebToJdbApp({})
55
54
  resolve(JumpEventReport)
56
55
  }
57
56
  })
58
57
  .catch((err) => {
59
58
  reject(err)
60
59
  })
61
60
  } else if (isApp('jdjch')) {
62
61
  import('./web.jdjch')
63
62
  .then(({ JdbJumpWebToJdbApp }) => {
64
63
  if (JdbJumpWebToJdbApp) {
65
64
  JumpEventReport = new JdbJumpWebToJdbApp({})
66
65
  resolve(JumpEventReport)
67
66
  }
68
67
  })
69
68
  .catch((err) => {
70
69
  reject(err)
71
70
  })
72
71
  } else if (isApp('tjapp')) {
73
72
  import('./web.tjapp')
74
73
  .then(({ tjJumpWebTotjApp }) => {
75
74
  if (tjJumpWebTotjApp) {
76
75
  console.log('加载特价app内h5相关跳转事件js')
77
76
  JumpEventReport = new tjJumpWebTotjApp({})
78
77
  resolve(JumpEventReport)
79
78
  }
80
79
  })
81
80
  .catch((err) => {
82
81
  reject(err)
83
82
  })
84
83
  } else if (isPc) {
85
84
  import('./web.pc')
86
85
  .then(({ JumpEventWebReport }) => {
87
86
  if (JumpEventWebReport) {
88
87
  JumpEventReport = new JumpEventWebReport({})
89
88
  resolve(JumpEventReport)
90
89
  }
91
90
  })
92
91
  .catch((err) => {
93
92
  reject(err)
94
93
  })
95
94
  } else if (isTjJxM || isTjM) {
96
95
  import('./web.tjm')
97
96
  .then(({ JumpEventTJWebReport }) => {
98
97
  if (JumpEventTJWebReport) {
99
98
  JumpEventReport = new JumpEventTJWebReport({})
100
99
  resolve(JumpEventReport)
101
100
  }
102
101
  })
103
102
  .catch((err) => {
104
103
  reject(err)
105
104
  })
106
105
  } else {
107
106
  import('./web.base')
108
107
  .then(({ JumpEventWebReport }) => {
109
108
  if (JumpEventWebReport) {
110
109
  JumpEventReport = new JumpEventWebReport({})
111
110
  resolve(JumpEventReport)
112
111
  }
113
112
  })
114
113
  .catch((err) => {
115
114
  reject(err)
116
115
  })
117
116
  }
118
117
  }
119
118
  })
119
+ import { isApp, getUrlQuery } from '../utils/jm-common';
120
120
  console.log('h5', isReflexToH5, getUrlQuery(window.location.href, 'reflex'));
121
121
  return new Promise((resolve, reject) => {
122
122
  if (isReflexToH5) {
123
123
  import('./web.base')
124
124
  .then(({ JumpEventWebReport }) => {
125
125
  if (JumpEventWebReport) {
126
126
  console.log('加载普通浏览器h5相关跳转事件js');
127
127
  JumpEventReport = new JumpEventWebReport({});
128
128
  resolve(JumpEventReport);
129
129
  }
130
130
  })
131
131
  .catch((err) => {
132
132
  reject(err);
133
133
  });
134
134
  } else {
135
135
  if (isApp('wx') && isApp('mp') && isH5AdnJxMini) {
136
136
  import('./web.jxwxapp')
137
137
  .then(({ JdJumpWebToJxWxapp }) => {
138
138
  if (JdJumpWebToJxWxapp) {
139
139
  JumpEventReport = new JdJumpWebToJxWxapp({});
140
140
  resolve(JumpEventReport);
141
141
  }
142
142
  })
143
143
  .catch((err) => {
144
144
  reject(err);
145
145
  });
146
146
  } else if (isApp('wx') && isApp('mp')) {
147
147
  import('./web.wxapp')
148
148
  .then(({ JdJumpWebToWxapp }) => {
149
149
  if (JdJumpWebToWxapp) {
150
150
  JumpEventReport = new JdJumpWebToWxapp({});
151
151
  resolve(JumpEventReport);
152
152
  }
153
153
  })
154
154
  .catch((err) => {
155
155
  reject(err);
156
156
  });
157
157
  } else if (
158
158
  isApp('jd') &&
159
159
  (isNewHarmonyShop || !isApp('jdharmony') || (isApp('jdharmony') && getPageType() === 'member-fast-card'))
160
160
  ) {
161
161
  import('./web.jd')
162
162
  .then(({ JdJumpWebToJdApp }) => {
163
163
  if (JdJumpWebToJdApp) {
164
164
  JumpEventReport = new JdJumpWebToJdApp({});
165
165
  resolve(JumpEventReport);
166
166
  }
167
167
  })
168
168
  .catch((err) => {
169
169
  reject(err);
170
170
  });
171
171
  } else if (isApp('jdb')) {
172
172
  import('./web.jdb')
173
173
  .then(({ JdbJumpWebToJdbApp }) => {
174
174
  if (JdbJumpWebToJdbApp) {
175
175
  JumpEventReport = new JdbJumpWebToJdbApp({});
176
176
  resolve(JumpEventReport);
177
177
  }
178
178
  })
179
179
  .catch((err) => {
180
180
  reject(err);
181
181
  });
182
182
  } else if (isApp('jdjch')) {
183
183
  import('./web.jdjch')
184
184
  .then(({ JdbJumpWebToJdbApp }) => {
185
185
  if (JdbJumpWebToJdbApp) {
186
186
  JumpEventReport = new JdbJumpWebToJdbApp({});
187
187
  resolve(JumpEventReport);
188
188
  }
189
189
  })
190
190
  .catch((err) => {
191
191
  reject(err);
192
192
  });
193
193
  } else if (isApp('tjapp')) {
194
194
  import('./web.tjapp')
195
195
  .then(({ tjJumpWebTotjApp }) => {
196
196
  if (tjJumpWebTotjApp) {
197
197
  console.log('加载特价app内h5相关跳转事件js');
198
198
  JumpEventReport = new tjJumpWebTotjApp({});
199
199
  resolve(JumpEventReport);
200
200
  }
201
201
  })
202
202
  .catch((err) => {
203
203
  reject(err);
204
204
  });
205
205
  } else if (isPc) {
206
206
  import('./web.pc')
207
207
  .then(({ JumpEventWebReport }) => {
208
208
  if (JumpEventWebReport) {
209
209
  JumpEventReport = new JumpEventWebReport({});
210
210
  resolve(JumpEventReport);
211
211
  }
212
212
  })
213
213
  .catch((err) => {
214
214
  reject(err);
215
215
  });
216
216
  } else if (isTjJxM || isTjM) {
217
217
  import('./web.tjm')
218
218
  .then(({ JumpEventTJWebReport }) => {
219
219
  if (JumpEventTJWebReport) {
220
220
  JumpEventReport = new JumpEventTJWebReport({});
221
221
  resolve(JumpEventReport);
222
222
  }
223
223
  })
224
224
  .catch((err) => {
225
225
  reject(err);
226
226
  });
227
227
  } else {
228
228
  import('./web.base')
229
229
  .then(({ JumpEventWebReport }) => {
230
230
  if (JumpEventWebReport) {
231
231
  JumpEventReport = new JumpEventWebReport({});
232
232
  resolve(JumpEventReport);
233
233
  }
234
234
  })
235
235
  .catch((err) => {
236
236
  reject(err);
237
237
  });
238
238
  }
239
239
  }
240
240
  });