@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
  BUSINESS_TYPE,
3
2
  SHOP_MENU_ID_TYPE,
4
3
  SHOP_MENU_ID_NAME,
5
4
  SECTION_HOME_TAB_TYPE,
6
5
  SECTION_HOME_TAB_NAME_TYPE,
7
6
  objectToUrlEncode,
8
7
  parseQueryUrlString,
9
8
  filterUrlQueryData,
10
9
  routerInfo: {
11
10
  params: {},
12
11
  },
13
12
  nativeEvent: null,
14
13
  jumpConfig: {
15
14
  venderId: null,
16
15
  shopId: null,
17
16
  sourceValue: '',
18
17
  sourceType: 'M-H5',
19
18
  activityType: 'shopx',
20
19
  moduleId: 'none',
21
20
  entrance: 'none',
22
21
  },
23
22
  logPageParamStr: '',
24
23
  public logPageId: string
25
24
  public jumpConfig: JumpEventReportInterFace.JumpH5ReportConfig
26
25
  getConfig(opt) {
27
26
  return Object.assign(this, {}, defaultConfig, opt)
28
27
  }
29
28
  updateInfo(
30
29
  routerInfo,
31
30
  logPname = LogPnameInfo.HOME,
32
31
  pageId = LogPageIdInfo.APP,
33
32
  ) {
34
33
  this.routerInfo = routerInfo
35
34
  this.logPname = logPname
36
35
  this.jumpConfig = Object.assign(
37
36
  {},
38
37
  this.jumpConfig,
39
38
  filterUrlQueryData(routerInfo?.params || {}),
40
39
  )
41
40
  this.logPageId = pageId
42
41
  }
43
42
 
44
43
  jdJumpToProduct(skuIds, logEventInfo) {
45
44
  skuIds = skuIds.toString().trim()
46
45
  const getSkuId = skuIds.indexOf(',') !== -1 ? skuIds.split(',')[0] : skuIds
47
46
  let url = `${this.jumpWebUrl.pcDetail}${getSkuId}.html`
48
47
  this.jdNavigateToNative(url, logEventInfo)
49
48
  }
50
49
 
51
50
  jdJumpSkuInfoToProduct(skuInfo: any = {}, logEventInfo) {
52
51
  const getSkuId = skuInfo?.skuId;
53
52
  this.jdJumpToProduct(getSkuId, logEventInfo)
54
53
  }
55
54
 
56
55
  jdJumpToShopHome(shopInfo: JumpEventReportInterFace.ShopIdsInfo = {}) {
57
56
  const getInfo = Object.assign(
58
57
  {},
59
58
  {
60
59
  shopId: global.info.queryInfo.shopId,
61
60
  venderId: global.info.queryInfo.venderId,
62
61
  },
63
62
  shopInfo,
64
63
  )
65
64
  let url = `${this.jumpWebUrl.pages}/index-${global.info.queryInfo.shopId}.html`
66
65
  this.jdNavigateToNative(url, {
67
66
  ...getInfo,
68
67
  })
69
68
  }
70
69
 
71
70
  getPcSearchUrl = (cateId) => {
72
71
  const flag = document.querySelector('#JSHOP_CHANNEL_FLAG')?.value
73
72
  const appId =
74
73
  document.querySelector('#J_AppId')?.value ||
75
74
  document.querySelector('#pageInstance_appId')?.value
76
75
  return flag === 'yao'
77
76
  ? this.jumpWebUrl.pages + '/view_shop_search-' + appId + '.html'
78
77
  : this.jumpWebUrl.pages +
79
78
  '/view_search-' +
80
79
  appId +
81
80
  '-' +
82
81
  cateId +
83
82
  '-99-1-20-1.html'
84
83
  }
85
84
 
86
85
  jdJumpToShopSearch(shopInfo) {
87
86
  const getInfo = Object.assign(
88
87
  {},
89
88
  {
90
89
  shopId: global.info.queryInfo.shopId,
91
90
  venderId: global.info.queryInfo.venderId,
92
91
  },
93
92
  shopInfo,
94
93
  )
95
94
  const { categoryId } = getInfo
96
95
  const url = `${this.getPcSearchUrl(categoryId)}`
97
96
  this.jdJumpToWeb(url, getInfo)
98
97
  }
99
98
 
100
99
  jdJumpToTabAllProduct(shopId, venderId, logEventInfo = {}) {
101
100
  console.log('web.base.ts - jdJumpToTabAllProduct')
102
101
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId
103
102
  if (typeof venderId === 'undefined')
104
103
  venderId = global.info.queryInfo.venderId
105
104
  const url = `${this.jumpWebUrl.pages}/index-${shopId}.html`
106
105
  this.jdJumpToWeb(url, logEventInfo)
107
106
  }
108
107
 
109
108
  jdJumpToCouponSearchProductList(couponId, logEventInfo = {}) {
110
109
  const url = `${this.jumpWebUrl.couponSearch}?couponbatch=${couponId}&sceneval=2`
111
110
  this.jdJumpToWeb(url, logEventInfo)
112
111
  }
112
+ import global from '../common';
113
113
  BUSINESS_TYPE,
114
114
  SHOP_MENU_ID_TYPE,
115
115
  SHOP_MENU_ID_NAME,
116
116
  SECTION_HOME_TAB_TYPE,
117
117
  SECTION_HOME_TAB_NAME_TYPE,
118
118
  LogPageIdInfo,
119
119
  LogPnameInfo,
120
120
  PcShopSpmA,
121
121
  PcShopSpmBforMap,
122
122
  routerInfo: {
123
123
  params: {},
124
124
  },
125
125
  nativeEvent: null,
126
126
  jumpConfig: {
127
127
  venderId: null,
128
128
  shopId: null,
129
129
  sourceValue: '',
130
130
  sourceType: 'M-H5',
131
131
  activityType: 'shopx',
132
132
  moduleId: 'none',
133
133
  entrance: 'none',
134
134
  },
135
135
  logPageParamStr: '',
136
136
  new Promise((resolve, reject) => {
137
137
  if (window.spmPV) {
138
138
  resolve(true);
139
139
  } else {
140
140
  if (isReportReadyError) {
141
141
  reject(false);
142
142
  } else {
143
143
  ready('spmPV', 3000)
144
144
  .then(() => {
145
145
  isReportReadyError = false;
146
146
  resolve(true);
147
147
  })
148
148
  .catch(() => {
149
149
  isReportReadyError = true;
150
150
  reject(false);
151
151
  });
152
152
  }
153
153
  }
154
154
  });
155
155
  public logPageId: string;
156
156
  public jumpConfig: JumpEventReportInterFace.JumpH5ReportConfig;
157
157
  getConfig(opt) {
158
158
  return Object.assign(this, {}, defaultConfig, opt);
159
159
  }
160
160
  updateInfo(routerInfo, logPname = LogPnameInfo.HOME, pageId = LogPageIdInfo.APP) {
161
161
  this.routerInfo = routerInfo;
162
162
  this.logPname = logPname;
163
163
  this.jumpConfig = Object.assign(
164
164
  {},
165
165
  this.jumpConfig,
166
166
  filterUrlQueryData(routerInfo?.params || {}),
167
167
  );
168
168
  this.logPageId = pageId;
169
169
  }
170
170
 
171
171
  jdNavigateToNative(
172
172
  url: string,
173
173
  params: {
174
174
  logEventInfo?: object;
175
175
  } = {},
176
176
  successBack?: Function | undefined,
177
177
  failBack?: Function | undefined,
178
178
  ) {
179
179
  const { logEventInfo } = params;
180
180
  const getEparam = logEventInfo || params;
181
181
  console.log(`url:::::::${url}`);
182
182
  global.info.pageInfo.dataType === BUSINESS_TYPE.ONLINE &&
183
183
  this.clickEventLog(getEparam)
184
184
  .then(() => {
185
185
  typeof successBack === 'function' ? successBack(url) : window.open(url, '_blank');
186
186
  })
187
187
  .catch(() => {
188
188
  typeof failBack === 'function' && failBack(url);
189
189
  });
190
190
  }
191
191
 
192
192
  reportInfoPv(
193
193
  pageId = LogPageIdInfo.APP,
194
194
  opt: {
195
195
  pageParam?: any;
196
196
  } = {},
197
197
  ): Promise<any> {
198
198
  console.log('web.pc.ts - reportInfoPv', pageId, opt);
199
199
  return new Promise((resolve, reject) => {
200
200
  const { pageParam } = opt;
201
201
  const pageParamStr = typeof pageParam === 'object' ? JSON.stringify(pageParam) : pageParam;
202
202
  getReportObjReadyPromise()
203
203
  .then(() => {
204
204
  window.spmPV({
205
205
  spm: `${PcShopSpmA}.${PcShopSpmBforMap[pageId]}`,
206
206
  page_id: pageId,
207
207
  page_param: pageParamStr,
208
208
  });
209
209
  resolve(true);
210
210
  })
211
211
  .catch((e) => {
212
212
  reject(e);
213
213
  });
214
214
  }).catch((err) => {
215
215
  console.log('pc sgm 浏览pv埋点上报异常', err);
216
216
  });
217
217
  }
218
218
 
219
219
  clickEventLog(opts): Promise<any> {
220
220
  console.log('web.pc.ts - clickEventLog opts: ', opts);
221
221
  return new Promise((resolve, reject) => {
222
222
  const { spmAll, spmCd, pageId, pageParam, ...otherParam } = opts;
223
223
  const pageParamStr = typeof pageParam === 'object' ? JSON.stringify(pageParam) : pageParam;
224
224
  getReportObjReadyPromise()
225
225
  .then(() => {
226
226
  window.spmLog({
227
227
  spm: spmAll ? spmAll : `${PcShopSpmA}.${PcShopSpmBforMap[pageId]}.${spmCd}`,
228
228
  biz_type: '',
229
229
  page_id: pageId,
230
230
  event_param: '',
231
231
  json_param: pageParamStr,
232
232
  t1: '',
233
233
  t2: '',
234
234
  p0: '',
235
235
  ...otherParam,
236
236
  });
237
237
  resolve(true);
238
238
  })
239
239
  .catch((e) => {
240
240
  reject(e);
241
241
  });
242
242
  }).catch((err) => {
243
243
  console.log('pc sgm 点击埋点上报异常', err);
244
244
  });
245
245
  }
246
246
 
247
247
  exposureEventLog(opts): Promise<any> {
248
248
  console.log('web.pc.ts - exposureEventLog opts: ', opts);
249
249
  return new Promise((resolve, reject) => {
250
250
  const { spmAll, spmCd, pageId, pageParam, ...otherParam } = opts;
251
251
  const pageParamStr = typeof pageParam === 'object' ? JSON.stringify(pageParam) : pageParam;
252
252
  getReportObjReadyPromise()
253
253
  .then(() => {
254
254
  window.spmExposure({
255
255
  spm: spmAll ? spmAll : `${PcShopSpmA}.${PcShopSpmBforMap[pageId]}.${spmCd}`,
256
256
  biz_type: '',
257
257
  page_id: pageId,
258
258
  event_param: '',
259
259
  json_param: pageParamStr,
260
260
  t1: '',
261
261
  t2: '',
262
262
  p0: '',
263
263
  ...otherParam,
264
264
  });
265
265
  resolve(true);
266
266
  })
267
267
  .catch((e) => {
268
268
  reject(e);
269
269
  });
270
270
  }).catch((err) => {
271
271
  console.log('pc sgm 曝光埋点上报异常', err);
272
272
  });
273
273
  }
274
274
 
275
275
  jdJumpToProduct(skuIds, logEventInfo) {
276
276
  skuIds = skuIds.toString().trim();
277
277
  const getSkuId = skuIds.indexOf(',') !== -1 ? skuIds.split(',')[0] : skuIds;
278
278
  let url = `${this.jumpWebUrl.pcDetail}${getSkuId}.html`;
279
279
  this.jdNavigateToNative(url, logEventInfo);
280
280
  }
281
281
 
282
282
  jdJumpSkuInfoToProduct(skuInfo: any = {}, logEventInfo) {
283
283
  const getSkuId = skuInfo?.skuId;
284
284
  this.jdJumpToProduct(getSkuId, logEventInfo);
285
285
  }
286
286
 
287
287
  jdJumpToShopHome(shopInfo: JumpEventReportInterFace.ShopIdsInfo = {}) {
288
288
  const currentShopInfo = {
289
289
  shopId: global.info.queryInfo.shopId,
290
290
  venderId: global.info.queryInfo.venderId,
291
291
  };
292
292
  const restParams =
293
293
  (shopInfo?.shopId && shopInfo.shopId !== currentShopInfo.shopId) ||
294
294
  (shopInfo?.venderId && shopInfo.venderId !== currentShopInfo.venderId)
295
295
  ? {}
296
296
  : currentShopInfo;
297
297
  const getInfo = Object.assign({}, restParams, shopInfo);
298
298
  let url = `${this.jumpWebUrl.pages}/index-${getInfo.shopId}.html`;
299
299
  this.jdNavigateToNative(url, {
300
300
  ...getInfo,
301
301
  });
302
302
  }
303
303
 
304
304
  getPcSearchUrl = (cateId) => {
305
305
  const flag = document.querySelector('#JSHOP_CHANNEL_FLAG')?.value;
306
306
  const appId =
307
307
  document.querySelector('#J_AppId')?.value ||
308
308
  document.querySelector('#pageInstance_appId')?.value;
309
309
  return flag === 'yao'
310
310
  ? this.jumpWebUrl.pages + '/view_shop_search-' + appId + '.html'
311
311
  : this.jumpWebUrl.pages + '/view_search-' + appId + '-' + cateId + '-99-1-20-1.html';
312
312
  };
313
313
 
314
314
  jdJumpToShopSearch(shopInfo) {
315
315
  const getInfo = Object.assign(
316
316
  {},
317
317
  {
318
318
  shopId: global.info.queryInfo.shopId,
319
319
  venderId: global.info.queryInfo.venderId,
320
320
  },
321
321
  shopInfo,
322
322
  );
323
323
  const { categoryId } = getInfo;
324
324
  const url = `${this.getPcSearchUrl(categoryId)}`;
325
325
  this.jdJumpToWeb(url, getInfo);
326
326
  }
327
327
 
328
328
  jdJumpToTabAllProduct(shopId, venderId, logEventInfo = {}) {
329
329
  console.log('web.base.ts - jdJumpToTabAllProduct');
330
330
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId;
331
331
  if (typeof venderId === 'undefined') venderId = global.info.queryInfo.venderId;
332
332
  const url = `${this.jumpWebUrl.pages}/index-${shopId}.html`;
333
333
  this.jdJumpToWeb(url, logEventInfo);
334
334
  }
335
335
 
336
336
  jdJumpToCouponSearchProductList(couponId, logEventInfo = {}) {
337
337
  const url = `${this.jumpWebUrl.couponSearch}?couponbatch=${couponId}&sceneval=2`;
338
338
  this.jdJumpToWeb(url, logEventInfo);
339
339
  }