@conecli/cone-render 0.10.1-shop3.1 → 0.10.1-shop3.100

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