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