@conecli/cone-render 0.10.1-shop-beta.24 → 0.10.1-shop-beta.26

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 (44) hide show
  1. package/dist/common/accessibility.h5.ts +1 -1
  2. package/dist/common/const.ts +1 -1
  3. package/dist/common/index.h5.ts +1 -1
  4. package/dist/common/index.jd.ts +1 -1
  5. package/dist/common/index.ts +1 -1
  6. package/dist/common/index.weapp.ts +1 -1
  7. package/dist/common/token/index.h5.ts +1 -1
  8. package/dist/common/wxappApi.ascf.ts +1 -0
  9. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  10. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  11. package/dist/components/base/MobileCommonHeader/index.tsx +1 -1
  12. package/dist/components/base/NetworkDataError/const.ts +1 -1
  13. package/dist/components/base/NetworkDataError/index.module.scss +1 -1
  14. package/dist/components/base/Price/Double/index.module.scss +1 -1
  15. package/dist/components/base/ShopLeGaoTag/index.h5.tsx +1 -1
  16. package/dist/components/floorItem.tsx +1 -1
  17. package/dist/config/env.ts +1 -1
  18. package/dist/interface/component.ts +1 -1
  19. package/dist/interface/jumpEventReport.ts +1 -1
  20. package/dist/jumpEventReport/base.ts +1 -1
  21. package/dist/jumpEventReport/index.h5.ts +1 -1
  22. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  23. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  24. package/dist/jumpEventReport/logEventConfig.h5.ts +1 -1
  25. package/dist/jumpEventReport/web.base.ts +1 -1
  26. package/dist/jumpEventReport/web.jd.ts +1 -1
  27. package/dist/jumpEventReport/web.pc.ts +1 -1
  28. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  29. package/dist/language/en_US.json +55 -1
  30. package/dist/language/zh_CN.json +54 -0
  31. package/dist/language/zh_HK.json +54 -0
  32. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  33. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  34. package/dist/open/api/shopMember.ts +1 -1
  35. package/dist/open/api/util.ts +1 -1
  36. package/dist/sass/base.scss +8 -4
  37. package/dist/service/requestServer.h5.ts +1 -1
  38. package/dist/utils/connectNativeJsBridge.ts +1 -1
  39. package/dist/utils/h5Utils.ts +1 -1
  40. package/dist/utils/index.h5.ts +1 -1
  41. package/dist/utils/index.ts +1 -1
  42. package/dist/utils/index.weapp.ts +1 -1
  43. package/dist/utils/utils.ts +1 -1
  44. package/package.json +1 -1
@@ -1 +1 @@
1
- import global from '../../common';
2
1
  return new Promise((resolve, reject) => {
3
2
  let platform: string = getPlatform();
4
3
  if (platform === TokenPlatform.TYPE_JDAPP) {
5
4
  global
6
5
  .jmfeReayPromise()
7
6
  .then(() => {
8
7
  console.log(
9
8
  'loadTokenAsync window.jmfe已经存在:',
10
9
  window?.jmfe,
11
10
  '当前版本',
12
11
  window?.jmfe?.VERSION,
13
12
  );
14
13
  import('./token.jd')
15
14
  .then((data) => {
16
15
  console.log('data:', data);
17
16
  resolve(data);
18
17
  })
19
18
  .catch((err) => {
20
19
  reject(err);
21
20
  });
22
21
  })
23
22
  .catch((e) => {
24
23
  console.log('window.jmfe不存在');
25
24
  reject(e);
26
25
  });
27
26
  }
28
27
  else if (platform === TokenPlatform.TYPE_WQ) {
29
28
  import('./token.wxapp')
30
29
  .then((data) => {
31
30
  console.log('data:', data);
32
31
  resolve(data);
33
32
  })
34
33
  .catch((err) => {
35
34
  reject(err);
36
35
  });
37
36
  } else {
38
37
  import('./token')
39
38
  .then((data) => {
40
39
  console.log('data:', data);
41
40
  resolve(data);
42
41
  })
43
42
  .catch((err) => {
44
43
  reject(err);
45
44
  });
46
45
  }
47
46
  });
48
47
  console.log(e);
49
48
  return {};
50
49
  return new Promise((resolve) => {
51
50
  loadTokenPromise
52
51
  .then((proxy: any) => {
53
52
  if (proxy?.isLogin) {
54
53
  proxy?.isLogin().then((data: boolean) => {
55
54
  resolve(data);
56
55
  });
57
56
  } else {
58
57
  resolve(false);
59
58
  }
60
59
  })
61
60
  .catch((err) => {
62
61
  console.log(err);
63
62
  resolve(false);
64
63
  });
65
64
  });
66
65
  return new Promise((resolve) => {
67
66
  loadTokenPromise
68
67
  .then((proxy: any) => {
69
68
  if (proxy?.getIsvToken) {
70
69
  proxy?.getIsvToken().then((data: string) => {
71
70
  resolve(data);
72
71
  });
73
72
  } else {
74
73
  resolve('');
75
74
  }
76
75
  })
77
76
  .catch((err) => {
78
77
  console.log(err);
79
78
  resolve('');
80
79
  });
81
80
  });
82
81
  return new Promise((resolve) => {
83
82
  loadTokenPromise
84
83
  .then((proxy: any) => {
85
84
  if (proxy?.toLogin) {
86
85
  proxy?.toLogin(options);
87
86
  resolve(true);
88
87
  } else {
89
88
  resolve(false);
90
89
  }
91
90
  })
92
91
  .catch((err) => {
93
92
  console.log(err);
94
93
  resolve(false);
95
94
  });
96
95
  });
97
96
  let platform = TokenPlatform.TYPE_M;
98
97
  if (isApp('jd')) {
99
98
  platform = TokenPlatform.TYPE_JDAPP;
100
99
  }
101
100
  else if (isApp('wx') && isApp('mp')) {
102
101
  platform = TokenPlatform.TYPE_WQ;
103
102
  }
104
103
  return platform;
105
104
  let platform = getPlatform();
106
105
  let source = platform;
107
106
  if (platform === TokenPlatform.TYPE_M || platform === TokenPlatform.TYPE_WQ) {
108
107
  source = TokenPlatform.TYPE_JDAPP;
109
108
  }
110
109
  return source;
111
110
  return window?.page_data?.pageChannel || '';
111
+ import { isAscfApp } from '../../utils';
112
112
  return new Promise((resolve, reject) => {
113
113
  let platform: string = getPlatform();
114
114
  if (platform === TokenPlatform.TYPE_JDAPP) {
115
115
  global
116
116
  .jmfeReayPromise()
117
117
  .then(() => {
118
118
  console.log(
119
119
  'loadTokenAsync window.jmfe已经存在:',
120
120
  window?.jmfe,
121
121
  '当前版本',
122
122
  window?.jmfe?.VERSION,
123
123
  );
124
124
  import('./token.jd')
125
125
  .then((data) => {
126
126
  console.log('data:', data);
127
127
  resolve(data);
128
128
  })
129
129
  .catch((err) => {
130
130
  reject(err);
131
131
  });
132
132
  })
133
133
  .catch((e) => {
134
134
  console.log('window.jmfe不存在');
135
135
  reject(e);
136
136
  });
137
137
  }
138
138
  else if (platform === TokenPlatform.TYPE_WQ) {
139
139
  import('./token.wxapp')
140
140
  .then((data) => {
141
141
  console.log('data:', data);
142
142
  resolve(data);
143
143
  })
144
144
  .catch((err) => {
145
145
  reject(err);
146
146
  });
147
147
  } else {
148
148
  import('./token')
149
149
  .then((data) => {
150
150
  console.log('data:', data);
151
151
  resolve(data);
152
152
  })
153
153
  .catch((err) => {
154
154
  reject(err);
155
155
  });
156
156
  }
157
157
  });
158
158
  console.log(e);
159
159
  return {};
160
160
  return new Promise((resolve) => {
161
161
  loadTokenPromise
162
162
  .then((proxy: any) => {
163
163
  if (proxy?.isLogin) {
164
164
  proxy?.isLogin().then((data: boolean) => {
165
165
  resolve(data);
166
166
  });
167
167
  } else {
168
168
  resolve(false);
169
169
  }
170
170
  })
171
171
  .catch((err) => {
172
172
  console.log(err);
173
173
  resolve(false);
174
174
  });
175
175
  });
176
176
  return new Promise((resolve) => {
177
177
  loadTokenPromise
178
178
  .then((proxy: any) => {
179
179
  if (proxy?.getIsvToken) {
180
180
  proxy?.getIsvToken().then((data: string) => {
181
181
  resolve(data);
182
182
  });
183
183
  } else {
184
184
  resolve('');
185
185
  }
186
186
  })
187
187
  .catch((err) => {
188
188
  console.log(err);
189
189
  resolve('');
190
190
  });
191
191
  });
192
192
  return new Promise((resolve) => {
193
193
  loadTokenPromise
194
194
  .then((proxy: any) => {
195
195
  if (proxy?.toLogin) {
196
196
  proxy?.toLogin(options);
197
197
  resolve(true);
198
198
  } else {
199
199
  resolve(false);
200
200
  }
201
201
  })
202
202
  .catch((err) => {
203
203
  console.log(err);
204
204
  resolve(false);
205
205
  });
206
206
  });
207
207
  let platform = TokenPlatform.TYPE_M;
208
208
  if (isApp('jd')) {
209
209
  platform = TokenPlatform.TYPE_JDAPP;
210
210
  }
211
211
  else if ((isApp('wx') && isApp('mp')) || isAscfApp) {
212
212
  platform = TokenPlatform.TYPE_WQ;
213
213
  }
214
214
  return platform;
215
215
  let platform = getPlatform();
216
216
  let source = platform;
217
217
  if (platform === TokenPlatform.TYPE_M || platform === TokenPlatform.TYPE_WQ) {
218
218
  source = TokenPlatform.TYPE_JDAPP;
219
219
  }
220
220
  return source;
221
221
  return window?.page_data?.pageChannel || '';
@@ -0,0 +1 @@
1
+ import * as WXAPP_LOGIN from '../wxapp/common/login/login.js';
2
  delayShow: () => {},
1
3
  guide2Setting: () => {},
2
4
  hide: () => {},
3
5
  WXAPP_LOGIN,
4
6
  WXAPP_BIZ,
5
7
  WXAPP_USER_INFO,
6
8
  WXAPP_NAVIGATOR,
7
9
  WXAPP_REPORT_GDT,
8
10
  WXAPP_PARAMS_SIGN,
9
11
  WXAPP_FINGER_REPORT,
10
12
  WXAPP_REPORT_MANAGE,
11
13
  WXAPP_SUBS_GUIDER,
12
14
  WXAPP_ADDRESS_V2_API,
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  const { type, className, reportData, customReportDataKey, customReportDataFn, trackCallback } = props
3
2
  const isViewOnlineState =
4
3
  taroJdBaseInfo.info.pageInfo.dataType === BUSINESS_TYPE.ONLINE
5
4
  const isCustomReport = customReportDataKey && customReportDataFn
6
5
  const checkReportData = Array.isArray(reportData)
7
6
  const [floorData, mInfo] = checkReportData ? reportData : []
8
7
  const showRenderState = isCustomReport ? true : floorData && mInfo
9
8
  const getFloorPointClassName = isCustomReport ? `J_custom_${customReportDataKey}` : `J_floor_${floorData?.uid}_index_${mInfo?.pos}`
10
9
  const getTaroSelector = isCustomReport ? `#J_miniShopRoot >>> .${getFloorPointClassName}` : `#J_floor_${floorData?.uid} >>> .${getFloorPointClassName}`
11
10
  useEffect(() => {
12
11
  if (isViewOnlineState && reportData) {
13
12
  Taro.nextTick(() => {
14
13
  if (
15
14
  !taroJdBaseInfo.info.pageInfo.floorExposureInfo[
16
15
  getFloorPointClassName
17
16
  ]
18
17
  ){
19
18
  const createIntersectionObserver = new intersectionObserver({
20
19
  selector: getTaroSelector,
21
20
  context: this,
22
21
  onFinal: (res) => {
23
22
  taroJdBaseInfo.info.pageInfo.floorExposureInfo[
24
23
  getFloorPointClassName
25
24
  ] = true
26
25
  console.log('小程序曝光埋点收到进入可视区域啦!', getFloorPointClassName, reportData, res)
27
26
  if(!isCustomReport){
28
27
  addReportData(reportData)
29
28
  typeof trackCallback === 'function' && trackCallback(reportData)
30
29
  }else {
31
30
  typeof customReportDataFn === 'function' && customReportDataFn(customReportDataKey)
32
31
  }
33
32
  createIntersectionObserver.disconnect()
34
33
  },
35
34
  })
36
35
  createIntersectionObserver.connect()
37
36
  }
38
37
  })
39
38
  }
40
39
  }, [])
41
40
  return (showRenderState ? (
42
41
  <View
43
42
  className={classNames(
44
43
  {
45
44
  [exposureStyle['d-report-point']]: type === TrackType.point,
46
45
  },
47
46
  {
48
47
  [exposureStyle['d-report-floor']]: type === TrackType.floor,
49
48
  },
50
49
  getFloorPointClassName,
51
50
  className,
52
51
  )}
53
52
  />
54
53
  ) : null
55
54
  )
56
55
  return useMemo(() => {
57
56
  return <ExposureFloor {...props} />
58
57
  }, [])
59
58
  reportData: null,
60
59
  trackCallback: null,
61
60
  type: TrackType.point,
61
+ import Taro from '@tarojs/taro'
62
62
  const { type, className, reportData, customReportDataKey, customReportDataFn, trackCallback, innerRef } = props
63
63
  const isViewOnlineState =
64
64
  taroJdBaseInfo.info.pageInfo.dataType === BUSINESS_TYPE.ONLINE
65
65
  const isCustomReport = customReportDataKey && customReportDataFn
66
66
  const checkReportData = Array.isArray(reportData)
67
67
  const [floorData, mInfo] = checkReportData ? reportData : []
68
68
  const showRenderState = isCustomReport ? true : floorData && mInfo
69
69
  const getFloorPointClassName = isCustomReport ? `J_custom_${customReportDataKey}` : `J_floor_${floorData?.uid}_index_${mInfo?.pos}`
70
70
  const getTaroSelector = isCustomReport ? `#J_miniShopRoot >>> .${getFloorPointClassName}` : `#J_floor_${floorData?.uid} >>> .${getFloorPointClassName}`
71
71
  useEffect(() => {
72
72
  if (isViewOnlineState && reportData) {
73
73
  Taro.nextTick(() => {
74
74
  if (
75
75
  !taroJdBaseInfo.info.pageInfo.floorExposureInfo[
76
76
  getFloorPointClassName
77
77
  ]
78
78
  ){
79
79
  const createIntersectionObserver = new intersectionObserver({
80
80
  selector: getTaroSelector,
81
81
  context: this,
82
82
  onFinal: (res) => {
83
83
  taroJdBaseInfo.info.pageInfo.floorExposureInfo[
84
84
  getFloorPointClassName
85
85
  ] = true
86
86
  console.log('小程序曝光埋点收到进入可视区域啦!', getFloorPointClassName, reportData, res)
87
87
  if(!isCustomReport){
88
88
  addReportData(reportData,null)
89
89
  typeof trackCallback === 'function' && trackCallback(reportData)
90
90
  }else {
91
91
  if (typeof customReportDataFn === 'function') {
92
92
  const getReportData = customReportDataFn(customReportDataKey);
93
93
  if(getReportData){
94
94
  const { eventId, spmAllCode, spmCodeForCD, jsonParam } = getReportData;
95
95
  (eventId || spmAllCode || spmCodeForCD) &&
96
96
  jsonParam &&
97
97
  track.reportExposureEventLog({
98
98
  ...getReportData,
99
99
  target: null,
100
100
  });
101
101
  }
102
102
  }
103
103
  }
104
104
  createIntersectionObserver.disconnect()
105
105
  },
106
106
  })
107
107
  createIntersectionObserver.connect()
108
108
  }
109
109
  })
110
110
  }
111
111
  }, [])
112
112
  return (showRenderState ? (
113
113
  <View
114
114
  className={classNames(
115
115
  {
116
116
  [exposureStyle['d-report-point']]: type === TrackType.point,
117
117
  },
118
118
  {
119
119
  [exposureStyle['d-report-floor']]: type === TrackType.floor,
120
120
  },
121
121
  getFloorPointClassName,
122
122
  className,
123
123
  )}
124
124
  />
125
125
  ) : null
126
126
  )
127
127
  return useMemo(() => {
128
128
  return <ExposureFloor {...props} />
129
129
  }, [])
130
130
  reportData: null,
131
131
  trackCallback: null,
132
132
  type: TrackType.point,