@conecli/cone-render 0.10.1-shop3.11 → 0.10.1-shop3.110

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 (115) 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.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 +395 -0
  70. package/dist/language/zh_CN.json +395 -0
  71. package/dist/language/zh_HK.json +395 -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 +19 -2
  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/jumpExtMapUtil.weapp.ts +1 -0
  106. package/dist/utils/log.ts +1 -0
  107. package/dist/utils/{sColor.js → sColor.ts} +1 -1
  108. package/dist/utils/sColor.weapp.ts +1 -0
  109. package/dist/utils/utils.ts +1 -1
  110. package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
  111. package/dist/wxapp/common/user_info.js +1 -1
  112. package/package.json +165 -141
  113. package/dist/jumpEventReport/web/wqshop.report.ts +0 -1
  114. package/dist/utils/priceUtils.js +0 -1
  115. /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
  LogPageIdInfo,
115
115
  LogPnameInfo,
116
116
  PcShopSpmA,
117
117
  PcShopSpmBforMap,
118
118
  shopSpmCDforCode,
119
119
  routerInfo: {
120
120
  params: {},
121
121
  },
122
122
  nativeEvent: null,
123
123
  jumpConfig: {
124
124
  venderId: null,
125
125
  shopId: null,
126
126
  sourceValue: '',
127
127
  sourceType: 'M-H5',
128
128
  activityType: 'shopx',
129
129
  moduleId: 'none',
130
130
  entrance: 'none',
131
131
  },
132
132
  logPageParamStr: '',
133
133
  new Promise((resolve, reject) => {
134
134
  if (window.spmPV) {
135
135
  resolve(true);
136
136
  } else {
137
137
  if (isReportReadyError) {
138
138
  reject(false);
139
139
  } else {
140
140
  ready('spmPV', 3000)
141
141
  .then(() => {
142
142
  isReportReadyError = false;
143
143
  resolve(true);
144
144
  })
145
145
  .catch(() => {
146
146
  isReportReadyError = true;
147
147
  reject(false);
148
148
  });
149
149
  }
150
150
  }
151
151
  });
152
152
  public logPageId: string;
153
153
  public jumpConfig: JumpEventReportInterFace.JumpH5ReportConfig;
154
154
  getConfig(opt) {
155
155
  return Object.assign(this, {}, defaultConfig, opt);
156
156
  }
157
157
  updateInfo(routerInfo, logPname = LogPnameInfo.HOME, pageId = LogPageIdInfo.APP) {
158
158
  this.routerInfo = routerInfo;
159
159
  this.logPname = logPname;
160
160
  this.jumpConfig = Object.assign(
161
161
  {},
162
162
  this.jumpConfig,
163
163
  filterUrlQueryData(routerInfo?.params || {}),
164
164
  );
165
165
  this.logPageId = pageId;
166
166
  }
167
167
 
168
168
  jdNavigateToNative(
169
169
  url: string,
170
170
  params: {
171
171
  logEventInfo?: object;
172
172
  } = {},
173
173
  successBack?: Function | undefined,
174
174
  failBack?: Function | undefined,
175
175
  ) {
176
176
  const { logEventInfo } = params;
177
177
  const getEparam = logEventInfo || params;
178
178
  console.log(`url:::::::${url}`);
179
179
  global.info.pageInfo.dataType === BUSINESS_TYPE.ONLINE &&
180
180
  this.clickEventLog(getEparam)
181
181
  .then(() => {
182
182
  typeof successBack === 'function' ? successBack(url) : window.open(url, '_blank');
183
183
  })
184
184
  .catch(() => {
185
185
  typeof failBack === 'function' && failBack(url);
186
186
  });
187
187
  }
188
188
 
189
189
  reportInfoPv(
190
190
  pageId = LogPageIdInfo.APP,
191
191
  opt: {
192
192
  pageParam?: any;
193
193
  } = {},
194
194
  ): Promise<any> {
195
195
  console.log('web.pc.ts - reportInfoPv', pageId, opt);
196
196
  return new Promise((resolve, reject) => {
197
197
  const { pageParam } = opt;
198
198
  const pageParamStr = typeof pageParam === 'object' ? JSON.stringify(pageParam) : pageParam;
199
199
  getReportObjReadyPromise()
200
200
  .then(() => {
201
201
  window.spmPV({
202
202
  spm: `${PcShopSpmA}.${PcShopSpmBforMap[pageId]}`,
203
203
  page_id: pageId,
204
204
  page_param: pageParamStr,
205
205
  });
206
206
  this.logPageId = pageId;
207
207
  this.logPageParamStr = pageParamStr;
208
208
  resolve(true);
209
209
  })
210
210
  .catch((e) => {
211
211
  reject(e);
212
212
  });
213
213
  }).catch((err) => {
214
214
  console.log('pc sgm 浏览pv埋点上报异常', err);
215
215
  });
216
216
  }
217
217
 
218
218
  reportClick(opts,reportKey = 'click'){
219
219
  console.log(`web.pc.ts - ${reportKey}EventLog opts: `, opts);
220
220
  return new Promise((resolve, reject) => {
221
221
  const { spmAll, spmAllCode, spmCodeForCD, spmCd, pageId, pageParam, jsonParam = {}, eventId, target, ...otherParam } = opts;
222
222
  const getSpmAllCode = spmAll || spmAllCode;
223
223
  const getSpmCodeForCD = spmCd || spmCodeForCD;
224
224
  const getPageId = pageId || this.logPageId;
225
225
  const pageParamStr = typeof pageParam === 'object' ? JSON.stringify(pageParam) : pageParam || this.logPageParamStr;
226
226
  const { etModelInfo, logBaseInfo } = jsonParam;
227
227
  let getJsonParam = {};
228
228
  if (etModelInfo && logBaseInfo) {
229
229
  getJsonParam = logBaseInfo;
230
230
  } else {
231
231
  if (Array.isArray(jsonParam)) {
232
232
  getJsonParam = jsonParam;
233
233
  } else {
234
234
  getJsonParam = Object.assign(
235
235
  {},
236
236
  {
237
237
  shopid: global?.info?.queryInfo?.shopId,
238
238
  },
239
239
  jsonParam,
240
240
  );
241
241
  }
242
242
  }
243
243
  if (
244
244
  reportKey === 'exposure' &&
245
245
  /^TerminatorNew/.test(eventId) &&
246
246
  !Array.isArray(getJsonParam)
247
247
  ) {
248
248
  getJsonParam = [getJsonParam];
249
249
  }
250
250
  getReportObjReadyPromise()
251
251
  .then(() => {
252
252
  const getSpmParams = {
253
253
  spm: getSpmAllCode ? getSpmAllCode : `${PcShopSpmA}.${PcShopSpmBforMap[getPageId]}.${getSpmCodeForCD || shopSpmCDforCode[eventId]}`,
254
254
  biz_type: '',
255
255
  page_id: getPageId,
256
256
  page_param: pageParamStr,
257
257
  event_id: eventId,
258
258
  event_param: '',
259
259
  json_param: JSON.stringify(getJsonParam),
260
260
  t1: '',
261
261
  t2: '',
262
262
  p0: '',
263
263
  ...otherParam,
264
264
  }
265
265
  console.log(`pc sgm ${reportKey}埋点最终参数`, getSpmParams);
266
266
  reportKey === 'exposure' ? window.spmExposure(getSpmParams) : window.spmLog(getSpmParams);
267
267
  resolve(true);
268
268
  })
269
269
  .catch((e) => {
270
270
  reject(e);
271
271
  });
272
272
  }).catch((err) => {
273
273
  console.log(`pc sgm ${reportKey === 'exposure' ? '曝光' : '点击'}埋点上报异常`, err);
274
274
  });
275
275
  }
276
276
 
277
277
  clickEventLog(opts): Promise<any> {
278
278
  console.log('web.pc.ts - clickEventLog opts: ', opts);
279
279
  return this.reportClick(opts,"click");
280
280
  }
281
281
 
282
282
  exposureEventLog(opts): Promise<any> {
283
283
  return this.reportClick(opts,"exposure");
284
284
  }
285
285
 
286
286
  jdJumpToProduct(skuIds, logEventInfo) {
287
287
  skuIds = skuIds.toString().trim();
288
288
  const getSkuId = skuIds.indexOf(',') !== -1 ? skuIds.split(',')[0] : skuIds;
289
289
  let url = `${this.jumpWebUrl.pcDetail}${getSkuId}.html`;
290
290
  this.jdNavigateToNative(url, logEventInfo);
291
291
  }
292
292
 
293
293
  jdJumpSkuInfoToProduct(skuInfo: any = {}, logEventInfo) {
294
294
  const getSkuId = skuInfo?.skuId;
295
295
  this.jdJumpToProduct(getSkuId, logEventInfo);
296
296
  }
297
297
 
298
298
  jdJumpToShopHome(shopInfo: JumpEventReportInterFace.ShopIdsInfo = {}) {
299
299
  const currentShopInfo = {
300
300
  shopId: global.info.queryInfo.shopId,
301
301
  venderId: global.info.queryInfo.venderId,
302
302
  };
303
303
  const restParams =
304
304
  (shopInfo?.shopId && shopInfo.shopId !== currentShopInfo.shopId) ||
305
305
  (shopInfo?.venderId && shopInfo.venderId !== currentShopInfo.venderId)
306
306
  ? {}
307
307
  : currentShopInfo;
308
308
  const getInfo = Object.assign({}, restParams, shopInfo);
309
309
  let url = `${this.jumpWebUrl.pages}/index-${getInfo.shopId}.html`;
310
310
  this.jdNavigateToNative(url, {
311
311
  ...getInfo,
312
312
  });
313
313
  }
314
314
 
315
315
  getPcSearchUrl = (searchInfo: { categoryId: string; keyWord: string }) => {
316
316
  const { categoryId, keyWord } = searchInfo;
317
317
  const flag = document.querySelector('#JSHOP_CHANNEL_FLAG')?.value;
318
318
  const appId =
319
319
  document.querySelector('#J_AppId')?.value ||
320
320
  document.querySelector('#pageInstance_appId')?.value;
321
321
  const keywordStr = keyWord && keyWord !== "" ? `?keyword=${keyWord}` : ''
322
322
  const searchUrl = categoryId
323
323
  ? this.jumpWebUrl.pages + '/view_search-' + appId + '-' + categoryId + '-99-1-20-1.html'
324
324
  : `${this.jumpWebUrl.pages}/view_search-${appId}.html${keywordStr}`;
325
325
  return flag === 'yao'
326
326
  ? this.jumpWebUrl.pages + '/view_shop_search-' + appId + '.html'
327
327
  : searchUrl;
328
328
  };
329
329
 
330
330
  jdJumpToShopSearch(shopInfo) {
331
331
  const getInfo = Object.assign(
332
332
  {},
333
333
  {
334
334
  shopId: global.info.queryInfo.shopId,
335
335
  venderId: global.info.queryInfo.venderId,
336
336
  },
337
337
  shopInfo,
338
338
  );
339
339
  const { categoryId = '', keyWord = '' } = getInfo;
340
340
  const url = `${this.getPcSearchUrl({ categoryId, keyWord })}`;
341
341
  this.jdJumpToWeb(url, getInfo);
342
342
  }
343
343
 
344
344
  jdJumpToShopCategory(shopInfo) {
345
345
  this.jdJumpToShopSearch(shopInfo)
346
346
  }
347
347
 
348
348
  jdJumpToTabAllProduct(shopId, venderId, logEventInfo = {}) {
349
349
  console.log('web.base.ts - jdJumpToTabAllProduct');
350
350
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId;
351
351
  if (typeof venderId === 'undefined') venderId = global.info.queryInfo.venderId;
352
352
  const url = `${this.jumpWebUrl.pages}/index-${shopId}.html`;
353
353
  this.jdJumpToWeb(url, logEventInfo);
354
354
  }
355
355
 
356
356
  jdJumpToCouponSearchProductList(couponId, logEventInfo = {}) {
357
357
  const url = `${this.jumpWebUrl.couponSearch}?couponbatch=${couponId}&sceneval=2`;
358
358
  this.jdJumpToWeb(url, logEventInfo);
359
359
  }