@conecli/cone-render 0.10.1-shop3.9 → 0.10.1-shop3.91

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 (114) hide show
  1. package/README.md +1 -1
  2. package/dist/api/index.ts +1 -1
  3. package/dist/common/accessibility.h5.ts +1 -0
  4. package/dist/common/accessibility.ts +0 -0
  5. package/dist/common/const.ts +1 -1
  6. package/dist/common/index.h5.ts +1 -1
  7. package/dist/common/index.jd.ts +1 -1
  8. package/dist/common/index.ts +1 -1
  9. package/dist/common/index.weapp.ts +1 -1
  10. package/dist/common/jdplayerSdk.weapp.tsx +1 -0
  11. package/dist/common/jssdk.ts +1 -1
  12. package/dist/common/jssdk.weapp.ts +1 -0
  13. package/dist/common/pageType.ts +1 -1
  14. package/dist/common/token/index.h5.ts +1 -1
  15. package/dist/common/token/token.jd.ts +1 -1
  16. package/dist/common/wxappApi.ascf.ts +1 -0
  17. package/dist/common/wxappApi.ts +1 -1
  18. package/dist/components/ErrorBoundary.tsx +1 -1
  19. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  20. package/dist/components/base/CountDown/index.tsx +1 -1
  21. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  22. package/dist/components/base/CustomVideo/index.tsx +1 -1
  23. package/dist/components/base/CustomVideo/index.weapp.tsx +1 -0
  24. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  25. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  26. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  27. package/dist/components/base/InOrOutViewObserver/index.weapp.tsx +1 -0
  28. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  29. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  30. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  31. package/dist/components/base/MobileCommonHeader/index.tsx +1 -1
  32. package/dist/components/base/MobileCommonHeader/index.weapp.tsx +1 -0
  33. package/dist/components/base/NetworkDataError/const.ts +1 -1
  34. package/dist/components/base/NetworkDataError/index.module.scss +118 -72
  35. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  36. package/dist/components/base/Price/Base/index.module.scss +12 -0
  37. package/dist/components/base/Price/Base/index.tsx +1 -1
  38. package/dist/components/base/Price/Double/index.module.scss +25 -1
  39. package/dist/components/base/Price/Double/index.tsx +1 -1
  40. package/dist/components/base/ShopLeGaoTag/index.h5.module.scss +35 -0
  41. package/dist/components/base/ShopLeGaoTag/index.h5.tsx +1 -0
  42. package/dist/components/base/ShopLeGaoTag/index.module.scss +33 -0
  43. package/dist/components/base/ShopLeGaoTag/index.tsx +1 -0
  44. package/dist/components/debug/DebugLayout/index.module.scss +2 -2
  45. package/dist/components/floorItem.tsx +1 -1
  46. package/dist/components/isv/Floor/index.tsx +1 -1
  47. package/dist/components/remoteFloorItem.tsx +1 -1
  48. package/dist/config/env.ts +1 -1
  49. package/dist/interface/common.ts +1 -1
  50. package/dist/interface/component.ts +1 -1
  51. package/dist/interface/jumpEventReport.ts +1 -1
  52. package/dist/interface/service.ts +1 -1
  53. package/dist/jumpEventReport/base.ts +1 -1
  54. package/dist/jumpEventReport/const.ts +1 -1
  55. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  56. package/dist/jumpEventReport/index.h5.ts +1 -1
  57. package/dist/jumpEventReport/index.jd.ts +1 -1
  58. package/dist/jumpEventReport/index.weapp.ts +1 -1
  59. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  60. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  61. package/dist/jumpEventReport/logEventConfig.h5.ts +1 -0
  62. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  63. package/dist/jumpEventReport/web/report.ts +1 -1
  64. package/dist/jumpEventReport/web.base.ts +1 -1
  65. package/dist/jumpEventReport/web.jd.ts +1 -1
  66. package/dist/jumpEventReport/web.pc.ts +1 -1
  67. package/dist/jumpEventReport/web.tjm.ts +1 -1
  68. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  69. package/dist/language/en_US.json +309 -0
  70. package/dist/language/zh_CN.json +309 -0
  71. package/dist/language/zh_HK.json +309 -0
  72. package/dist/libs/openShopBridge.js +161 -0
  73. package/dist/libs/openShopBridge.min.js +1 -0
  74. package/dist/libs/taroAppReport.js +2 -2
  75. package/dist/modules/ContainerFloorList/index.h5.module.scss +16 -2
  76. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  77. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  78. package/dist/modules/DecorateContainerFloorList/index.weapp.tsx +1 -0
  79. package/dist/open/api/environment.ts +1 -1
  80. package/dist/open/api/shopMember.ts +1 -1
  81. package/dist/open/api/shopMember.weapp.ts +1 -0
  82. package/dist/open/api/track.ts +1 -1
  83. package/dist/open/api/util.ts +1 -1
  84. package/dist/open/components/index.ts +1 -1
  85. package/dist/open/index.ts +1 -1
  86. package/dist/sass/app.h5.scss +27 -1
  87. package/dist/sass/base.scss +8 -4
  88. package/dist/service/fetchGateway.ts +1 -1
  89. package/dist/service/fetchGateway.weapp.ts +1 -1
  90. package/dist/service/fetchJsonp.weapp.ts +1 -0
  91. package/dist/service/http/const.ts +1 -1
  92. package/dist/service/http/h5Http.ts +1 -1
  93. package/dist/service/http/httpInterceptors.weapp.ts +1 -0
  94. package/dist/service/requestServer.h5.ts +1 -1
  95. package/dist/service/requestServer.ts +1 -1
  96. package/dist/service/requestServer.weapp.ts +1 -1
  97. package/dist/utils/connectNativeJsBridge.ts +1 -1
  98. package/dist/utils/h5Utils.ts +1 -1
  99. package/dist/utils/harmonyCallRouter.h5.ts +1 -0
  100. package/dist/utils/harmonyCallRouter.ts +0 -0
  101. package/dist/utils/index.h5.ts +1 -1
  102. package/dist/utils/index.ts +1 -1
  103. package/dist/utils/index.weapp.ts +1 -1
  104. package/dist/utils/jumpExtMapUtil.ts +1 -0
  105. package/dist/utils/log.ts +1 -0
  106. package/dist/utils/{sColor.js → sColor.ts} +1 -1
  107. package/dist/utils/sColor.weapp.ts +1 -0
  108. package/dist/utils/utils.ts +1 -1
  109. package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
  110. package/dist/wxapp/common/user_info.js +1 -1
  111. package/package.json +162 -141
  112. package/dist/jumpEventReport/web/wqshop.report.ts +0 -1
  113. package/dist/utils/priceUtils.js +0 -1
  114. /package/dist/utils/{jumpExtMapUtil.js → jumpExtMapUtil.h5.ts} +0 -0
@@ -1 +1 @@
1
- import global from '../common'
2
1
  objectToUrlEncode,
3
2
  isH5AndJingGouMini,
4
3
  SECTION_HOME_TAB_TYPE,
5
4
  SECTION_HOME_TAB_NAME_TYPE,
6
5
  public jingGouMiniState: boolean
7
6
  private isH5OpenToWxapp: boolean
8
7
  constructor(opt) {
9
8
  super(opt)
10
9
  this.jingGouMiniState = false
11
10
  this.getConfig(opt)
12
11
  console.log(
13
12
  'window.shopGlobalSwitch:',
14
13
  JSON.stringify(window.shopGlobalSwitch),
15
14
  )
16
15
  this.isH5OpenToWxapp =
17
16
  window.shopGlobalSwitch?.openMobileShopToWxApp == 'true'
18
17
  this.init()
19
18
  }
20
19
  getConfig(opt) {
21
20
  return Object.assign(this, {}, defaultConfig, super.getConfig(opt), opt)
22
21
  }
23
22
 
24
23
 
25
24
  async init() {
26
25
  if (window.isJingGouMiniViewState) {
27
26
  this.jingGouMiniState = true
28
27
  } else {
29
28
  console.log(
30
29
  '初始化进行小程序环境检查, 当前是否是京购小程序里的H5',
31
30
  isH5AndJingGouMini,
32
31
  )
33
32
  if (isH5AndJingGouMini && this.isH5OpenToWxapp) {
34
33
  console.log('进入了 isH5AndJingGouMini && this.isH5OpenToWxapp 的if')
35
34
  this.jingGouMiniState = true
36
35
  window.isJingGouMiniViewState = true
37
36
  console.log('进入了 iwx?.miniProgram then 但是没有继续跳转的逻辑 ')
38
37
  global.info.isJingGouMiniViewState = true
39
38
  } else {
40
39
  console.log('进入了 isH5AndJingGouMini && this.isH5OpenToWxapp 的esle')
41
40
  }
42
41
  }
43
42
  }
44
43
 
45
44
  jdJumpToMiniPage(pageUrl, logEventInfo, type = 'navigateTo') {
46
45
  this.jdNavigateToNative(
47
46
  pageUrl,
48
47
  logEventInfo,
49
48
  () => {
50
49
  console.log('JD.wxappext.goto')
51
50
  wx?.miniProgram[type] &&
52
51
  wx?.miniProgram[type]({
53
52
  url: pageUrl,
54
53
  })
55
54
  },
56
55
  () => {
57
56
  console.log('JD.wxappext.goto2')
58
57
  wx?.miniProgram[type] &&
59
58
  wx?.miniProgram[type]({
60
59
  url: pageUrl,
61
60
  })
62
61
  },
63
62
  )
64
63
  }
65
64
 
66
65
  jdJumpToTabAllProduct(shopId, venderId, logEventInfo = {}) {
67
66
  console.log('web.wxapp.ts - jdJumpToTabAllProduct')
68
67
  if(typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId
69
68
  if(typeof venderId === 'undefined') venderId = global.info.queryInfo.venderId
70
69
  if (this.jingGouMiniState) {
71
70
  const param = {
72
71
  shopId,
73
72
  venderId,
74
73
  tabActive: SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_PRODUCT],
75
74
  }
76
75
  const url = `${this.jumpMiniPath.shopx}?${objectToUrlEncode(param)}`
77
76
  this.jdJumpToMiniPage(url, logEventInfo)
78
77
  } else {
79
78
  super.jdJumpToTabAllProduct(shopId, venderId, logEventInfo)
80
79
  }
81
80
  }
82
81
 
83
82
  jdJumpToTopTabBase(type, shopInfo = {}) {
84
83
  const getInfo = Object.assign(
85
84
  {},
86
85
  {
87
86
  shopId: global.info.queryInfo.shopId,
88
87
  venderId: global.info.queryInfo.venderId,
89
88
  },
90
89
  shopInfo,
91
90
  )
92
91
  if (this.jingGouMiniState) {
93
92
  const {shopId, venderId, ...otherInfo} = getInfo
94
93
  const param = {
95
94
  shopId,
96
95
  venderId,
97
96
  tabActive: type,
98
97
  }
99
98
  const url = `${this.jumpMiniPath.shopx}?${objectToUrlEncode(param)}`
100
99
  this.jdJumpToMiniPage(url, otherInfo)
101
100
  } else {
102
101
  super.jdJumpToTopTabBase(type, shopInfo)
103
102
  }
104
103
  }
105
104
 
106
105
  jdJumpToWeb(url, logEventInfo) {
107
106
  console.log('web.wxapp.ts - jdJumpToWeb', url)
108
107
  console.log('jingGouMiniState', this.jingGouMiniState)
109
108
  if (this.jingGouMiniState) {
110
109
  const encodeUrl = `${
111
110
  this.jumpMiniPath.h5
112
111
  }?encode_url=${encodeURIComponent(url)}`
113
112
  this.jdJumpToMiniPage(encodeUrl, logEventInfo)
114
113
  } else {
115
114
  super.jdJumpToWeb(url, logEventInfo)
116
115
  }
117
116
  }
118
117
 
119
118
  jdJumpToWebInner(url, logEventInfo) {
120
119
  super.jdJumpToWeb(url, logEventInfo)
121
120
  }
122
121
 
123
122
  jdJumpToProduct(skuIds, logEventInfo) {
124
123
  if (this.jingGouMiniState) {
125
124
  const detailUrl = `${this.jumpMiniPath.detail}?sku=${skuIds}`
126
125
  this.jdJumpToMiniPage(detailUrl, logEventInfo)
127
126
  } else {
128
127
  super.jdJumpToProduct(skuIds, logEventInfo)
129
128
  }
130
129
  }
131
130
 
132
131
  jdJumpSkuInfoToProduct(skuInfo: any = {}, logEventInfo) {
133
132
  const getSkuId = skuInfo?.skuId;
134
133
  this.jdJumpToProduct(getSkuId, logEventInfo)
135
134
  }
136
135
 
137
136
  jdJumpToShopHome(params) {
138
137
  console.log('[降级H5] jdJumpToShopHome web.wxapp', params)
139
138
  console.log('global.info.queryInfo.shopId', global.info.queryInfo.shopId, global.info.queryInfo.venderId)
140
139
  const getInfo = Object.assign(
141
140
  {},
142
141
  {
143
142
  shopId: global.info.queryInfo.shopId,
144
143
  venderId: global.info.queryInfo.venderId,
145
144
  },
146
145
  params,
147
146
  )
148
147
  const { type = 'navigateTo', ...otherShopInfo } = getInfo
149
148
  if (this.jingGouMiniState) {
150
149
  let shopUrl = `${this.jumpMiniPath.shopx}${window.location.search}`
151
150
  if (/(\/shop\/(samCenter|samCard))|(\/sale\/home)|(\/favorite)/.test(window.location.pathname)) {
152
151
  shopUrl = `${this.jumpMiniPath.shopx}?${objectToUrlEncode(
153
152
  this.getShopIdsInfo(otherShopInfo),
154
153
  )}`
155
154
  }
156
155
  this.jdJumpToMiniPage(shopUrl, otherShopInfo, type)
157
156
  } else {
158
157
  super.jdJumpToShopHome(otherShopInfo)
159
158
  }
160
159
  }
161
160
 
162
161
  jdJumpToShopCategory(params) {
163
162
  console.log('[降级H5] jdJumpToShopCategory web.wxapp')
164
163
  const { type = 'navigateTo', ...otherShopInfo } = params
165
164
  console.log("获取分类跳转参数", params)
166
165
  if (this.jingGouMiniState) {
167
166
  this.jdJumpToTopTabBase('classify',otherShopInfo)
168
167
  } else {
169
168
  super.jdJumpToShopCategory(otherShopInfo)
170
169
  }
171
170
  }
172
171
 
173
172
  jdJumpToLive(liveInfo, logEventInfo = {}) {
174
173
  if (liveInfo?.liveId) {
175
174
  this.jdJumpToWeb(
176
175
  `${this.jumpWebUrl.mLive}/${liveInfo?.liveId}?${
177
176
  this.jingGouMiniState ? 'origin=0&appid=jdgw' : 'origin=30'
178
177
  }`,
179
178
  logEventInfo,
180
179
  )
181
180
  }
182
181
  }
183
182
 
184
183
  jdJumpToShopLight(shopInfo) {
185
184
  if (this.jingGouMiniState) {
186
185
  this.jdJumpToMiniPage(
187
186
  `${this.jumpMiniPath.shopLight}?${objectToUrlEncode(
188
187
  this.getShopIdOrVenderIdParams(shopInfo),
189
188
  )}`,
190
189
  {
191
190
  ...shopInfo,
192
191
  },
193
192
  )
194
193
  } else {
195
194
  this.jdNavigateToNative(
196
195
  `${this.jumpWebUrl.shopLight}?${objectToUrlEncode(
197
196
  this.getShopIdOrVenderIdParams(shopInfo),
198
197
  )}`,
199
198
  {
200
199
  ...shopInfo,
201
200
  },
202
201
  )
203
202
  }
204
203
  }
205
204
  jdJumpToCouponSearchProductList(couponId, logEventInfo = {}) {
206
205
  if (this.jingGouMiniState) {
207
206
  const detailUrl = `${this.jumpMiniPath.searchCoupon}?batch=${couponId}`
208
207
  this.jdJumpToMiniPage(detailUrl, logEventInfo)
209
208
  } else {
210
209
  super.jdJumpToCouponSearchProductList(couponId, logEventInfo)
211
210
  }
212
211
  }
212
+ import global from '../common';
213
213
  objectToUrlEncode,
214
214
  isH5AndJingGouMini,
215
215
  isAscfApp,
216
216
  public jingGouMiniState: boolean;
217
217
  private isH5OpenToWxapp: boolean;
218
218
  constructor(opt) {
219
219
  super(opt);
220
220
  this.jingGouMiniState = false;
221
221
  this.getConfig(opt);
222
222
  console.log('window.shopGlobalSwitch:', JSON.stringify(window.shopGlobalSwitch));
223
223
  this.isH5OpenToWxapp = window.shopGlobalSwitch?.openMobileShopToWxApp == 'true';
224
224
  this.init();
225
225
  }
226
226
  getConfig(opt) {
227
227
  return Object.assign(this, {}, defaultConfig, super.getConfig(opt), opt);
228
228
  }
229
229
 
230
230
 
231
231
  async init() {
232
232
  if (window.isJingGouMiniViewState) {
233
233
  this.jingGouMiniState = true;
234
234
  } else {
235
235
  console.log('初始化进行小程序环境检查, 当前是否是京购小程序里的H5', isH5AndJingGouMini);
236
236
  if ((isH5AndJingGouMini || isAscfApp) && this.isH5OpenToWxapp) {
237
237
  console.log('进入了 isH5AndJingGouMini && this.isH5OpenToWxapp 的if');
238
238
  this.jingGouMiniState = true;
239
239
  window.isJingGouMiniViewState = true;
240
240
  console.log('进入了 iwx?.miniProgram then 但是没有继续跳转的逻辑 ');
241
241
  global.info.isJingGouMiniViewState = true;
242
242
  } else {
243
243
  console.log('进入了 isH5AndJingGouMini && this.isH5OpenToWxapp 的esle');
244
244
  }
245
245
  }
246
246
  }
247
247
 
248
248
  jdJumpToMiniPage(pageUrl, logEventInfo, type = 'navigateTo') {
249
249
  this.jdNavigateToNative(
250
250
  pageUrl,
251
251
  logEventInfo,
252
252
  () => {
253
253
  console.log('JD.wxappext.goto');
254
254
  if (window?.wx && window?.wx?.miniProgram[type]) {
255
255
  wx?.miniProgram[type]({
256
256
  url: pageUrl,
257
257
  });
258
258
  } else if (window?.has && window?.has.ascfweb && window?.has.ascfweb[type]) {
259
259
  has.ascfweb[type]({
260
260
  url: pageUrl,
261
261
  });
262
262
  }
263
263
  },
264
264
  () => {
265
265
  console.log('JD.wxappext.goto2');
266
266
  if (window?.wx && window?.wx?.miniProgram[type]) {
267
267
  wx?.miniProgram[type]({
268
268
  url: pageUrl,
269
269
  });
270
270
  } else if (window?.has && window?.has.ascfweb && window?.has.ascfweb[type]) {
271
271
  has.ascfweb[type]({
272
272
  url: pageUrl,
273
273
  });
274
274
  }
275
275
  },
276
276
  );
277
277
  }
278
278
 
279
279
  jdJumpToTabAllProduct(shopId, venderId, logEventInfo = {}) {
280
280
  console.log('web.wxapp.ts - jdJumpToTabAllProduct');
281
281
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId;
282
282
  if (typeof venderId === 'undefined') venderId = global.info.queryInfo.venderId;
283
283
  if (this.jingGouMiniState) {
284
284
  const param = {
285
285
  shopId,
286
286
  venderId,
287
287
  tabActive: SECTION_HOME_TAB_NAME_TYPE[SECTION_HOME_TAB_TYPE.HOME_PRODUCT],
288
288
  };
289
289
  const url = `${this.jumpMiniPath.shopx}?${objectToUrlEncode(param)}`;
290
290
  this.jdJumpToMiniPage(url, logEventInfo);
291
291
  } else {
292
292
  super.jdJumpToTabAllProduct(shopId, venderId, logEventInfo);
293
293
  }
294
294
  }
295
295
 
296
296
  jdJumpToTopTabBase(type, shopInfo = {}) {
297
297
  const getInfo = Object.assign(
298
298
  {},
299
299
  {
300
300
  shopId: global.info.queryInfo.shopId,
301
301
  venderId: global.info.queryInfo.venderId,
302
302
  },
303
303
  shopInfo,
304
304
  );
305
305
  if (this.jingGouMiniState) {
306
306
  const { shopId, venderId, ...otherInfo } = getInfo;
307
307
  const param = {
308
308
  shopId,
309
309
  venderId,
310
310
  tabActive: type,
311
311
  };
312
312
  const url = `${this.jumpMiniPath.shopx}?${objectToUrlEncode(param)}`;
313
313
  this.jdJumpToMiniPage(url, otherInfo);
314
314
  } else {
315
315
  super.jdJumpToTopTabBase(type, shopInfo);
316
316
  }
317
317
  }
318
318
 
319
319
  jdJumpToWeb(url, logEventInfo) {
320
320
  console.log('web.wxapp.ts - jdJumpToWeb', url);
321
321
  console.log('jingGouMiniState', this.jingGouMiniState);
322
322
  if (this.jingGouMiniState) {
323
323
  const encodeUrl = `${this.jumpMiniPath.h5}?encode_url=${encodeURIComponent(url)}`;
324
324
  this.jdJumpToMiniPage(encodeUrl, logEventInfo);
325
325
  } else {
326
326
  super.jdJumpToWeb(url, logEventInfo);
327
327
  }
328
328
  }
329
329
 
330
330
  jdJumpToWebInner(url, logEventInfo) {
331
331
  super.jdJumpToWeb(url, logEventInfo);
332
332
  }
333
333
 
334
334
  jdJumpToProduct(skuIds, logEventInfo) {
335
335
  if (this.jingGouMiniState) {
336
336
  const detailUrl = `${this.jumpMiniPath.detail}?sku=${skuIds}`;
337
337
  this.jdJumpToMiniPage(detailUrl, logEventInfo);
338
338
  } else {
339
339
  super.jdJumpToProduct(skuIds, logEventInfo);
340
340
  }
341
341
  }
342
342
 
343
343
  jdJumpSkuInfoToProduct(skuInfo: any = {}, logEventInfo) {
344
344
  const getSkuId = skuInfo?.skuId;
345
345
  this.jdJumpToProduct(getSkuId, logEventInfo);
346
346
  }
347
347
 
348
348
  jdJumpToCartPage(logEventInfo) {
349
349
  console.log('跳转到购物车页面', logEventInfo);
350
350
  }
351
351
 
352
352
  jdJumpToShopHome(shopInfo) {
353
353
  console.log('[降级H5] jdJumpToShopHome web.wxapp', shopInfo);
354
354
  console.log(
355
355
  'global.info.queryInfo.shopId',
356
356
  global.info.queryInfo.shopId,
357
357
  global.info.queryInfo.venderId,
358
358
  );
359
359
  const currentShopInfo = {
360
360
  shopId: global.info.queryInfo.shopId,
361
361
  venderId: global.info.queryInfo.venderId,
362
362
  };
363
363
  const restParams =
364
364
  (shopInfo?.shopId && shopInfo.shopId !== currentShopInfo.shopId) ||
365
365
  (shopInfo?.venderId && shopInfo.venderId !== currentShopInfo.venderId)
366
366
  ? {}
367
367
  : currentShopInfo;
368
368
  const getInfo = Object.assign({}, restParams, shopInfo);
369
369
  const { type = 'navigateTo', ...otherShopInfo } = getInfo;
370
370
  if (this.jingGouMiniState) {
371
371
  let shopUrl = `${this.jumpMiniPath.shopx}${window.location.search}`;
372
372
  if (
373
373
  /(\/shop\/(samCenter|samCard))|(\/sale\/home)|(\/favorite)/.test(window.location.pathname)
374
374
  ) {
375
375
  shopUrl = `${this.jumpMiniPath.shopx}?${objectToUrlEncode(
376
376
  this.getShopIdsInfo(otherShopInfo),
377
377
  )}`;
378
378
  }
379
379
  this.jdJumpToMiniPage(shopUrl, otherShopInfo, type);
380
380
  } else {
381
381
  super.jdJumpToShopHome(otherShopInfo);
382
382
  }
383
383
  }
384
384
 
385
385
  jdJumpToShopCategory(params) {
386
386
  console.log('[降级H5] jdJumpToShopCategory web.wxapp');
387
387
  const { type = 'navigateTo', ...otherShopInfo } = params;
388
388
  console.log('获取分类跳转参数', params);
389
389
  if (this.jingGouMiniState) {
390
390
  this.jdJumpToTopTabBase('classify', otherShopInfo);
391
391
  } else {
392
392
  super.jdJumpToShopCategory(otherShopInfo);
393
393
  }
394
394
  }
395
395
 
396
396
  jdJumpToLive(liveInfo, logEventInfo = {}) {
397
397
  if (liveInfo?.liveId) {
398
398
  if (this.jingGouMiniState && liveInfo?.openWxappToLiveRoom) {
399
399
  this.jdJumpToMiniPage(`${this.jumpMiniPath.jdLive}?liveId=${liveInfo.liveId}&origin=473`, {
400
400
  logEventInfo,
401
401
  });
402
402
  } else {
403
403
  this.jdJumpToWeb(
404
404
  `${this.jumpWebUrl.mLive}/${liveInfo.liveId}?${
405
405
  this.jingGouMiniState ? 'origin=0&appid=jdgw' : 'origin=30'
406
406
  }`,
407
407
  logEventInfo,
408
408
  );
409
409
  }
410
410
  }
411
411
  }
412
412
 
413
413
  jdJumpToShopLight(shopInfo) {
414
414
  if (this.jingGouMiniState) {
415
415
  this.jdJumpToMiniPage(
416
416
  `${this.jumpMiniPath.shopLight}?${objectToUrlEncode(
417
417
  this.getShopIdOrVenderIdParams(shopInfo),
418
418
  )}`,
419
419
  {
420
420
  ...shopInfo,
421
421
  },
422
422
  );
423
423
  } else {
424
424
  this.jdNavigateToNative(
425
425
  `${this.jumpWebUrl.shopLight}?${objectToUrlEncode(
426
426
  this.getShopIdOrVenderIdParams(shopInfo),
427
427
  )}`,
428
428
  {
429
429
  ...shopInfo,
430
430
  },
431
431
  );
432
432
  }
433
433
  }
434
434
  jdJumpToCouponSearchProductList(couponId, logEventInfo = {}) {
435
435
  if (this.jingGouMiniState) {
436
436
  const detailUrl = `${this.jumpMiniPath.searchCoupon}?batch=${couponId}`;
437
437
  this.jdJumpToMiniPage(detailUrl, logEventInfo);
438
438
  } else {
439
439
  super.jdJumpToCouponSearchProductList(couponId, logEventInfo);
440
440
  }
441
441
  }