@conecli/cone-render 0.8.32 → 0.8.34

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.
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  nativePageShowToast, ToastAndroidType,
3
2
  ToastIosType,
4
3
  getAppChannelType, isAndroidDevice, isH5AndJdShopView,
5
4
  isH5AndJdShopViewNativeScroll, isIosDevice, isJdAndAndroidDevice, isJdAndIosDevice, isJdApp,
6
5
  isWxApp, isWxMiniH5View, isH5AndJingGouMini, urlCookie,
7
6
  sgmCustomReport, isMemberPage
8
7
  addHttps,
9
8
  clearTaroStorageKey,
10
9
  countStringify,
11
10
  dateFormat,
12
11
  dealAddress,
13
12
  dealShopContentData as originDealShopContentData,
14
13
  debounce,
15
14
  filterUrlQueryData,
16
15
  formatTabActiveMenuType,
17
16
  getQualityImage,
18
17
  getTaroStorageKeyValue,
19
18
  getWxAppCookieStr,
20
19
  isH5,
21
20
  isJdMin,
22
21
  isWxMin,
23
22
  isWxMinAndWxapp,
24
23
  lodashThrottle,
25
24
  objectToUrlEncode,
26
25
  parseQueryUrlString,
27
26
  removeTaroStorageKey,
28
27
  setLowSmallPicUrl,
29
28
  setTaroStorage,
30
29
  showFailToast,
31
30
  showNormalToast,
32
31
  showSuccessToast,
33
32
  sliceArrToChunkList,
34
33
  throttle,
35
34
  windowWidth: window.innerWidth,
36
35
  screenWidth: window.innerWidth,
37
36
  platform: '',
38
37
  model: '',
39
38
  system: '',
40
39
  getSystemInfo.windowWidth = getSystemInfo.screenWidth
41
40
  const params = Object.assign(
42
41
  {},
43
42
  {
44
43
  title: '',
45
44
  duration: 1500,
46
45
  },
47
46
  options,
48
47
  )
49
48
  params.duration = params.duration / 1000
50
49
  if (isJdApp && isH5AndJdShopView) {
51
50
  const showSuccessType = isIosDevice
52
51
  ? ToastIosType.SUCCESS
53
52
  : ToastAndroidType.SUCCESS
54
53
  const duration = isAndroidDevice ? 0 : params.duration
55
54
  nativePageShowToast(options.title, showSuccessType, duration)
56
55
  console.log('执行原生toast success')
57
56
  } else {
58
57
  showSuccessToast(options)
59
58
  }
60
59
  const params = Object.assign(
61
60
  {},
62
61
  {
63
62
  title: '',
64
63
  duration: 1500,
65
64
  },
66
65
  options,
67
66
  )
68
67
  params.duration = params.duration / 1000
69
68
  console.log(`isJdApp${isJdApp}`)
70
69
  if (isJdApp && isH5AndJdShopView) {
71
70
  const showSuccessType = isIosDevice
72
71
  ? ToastIosType.FAIL
73
72
  : ToastAndroidType.FAIL
74
73
  const duration = isAndroidDevice ? 0 : params.duration
75
74
  nativePageShowToast(options.title, showSuccessType, duration)
76
75
  console.log('执行原生toast fail')
77
76
  } else {
78
77
  console.log('执行H5 toast fail')
79
78
  showFailToast(options)
80
79
  }
81
80
  const params = Object.assign(
82
81
  {},
83
82
  {
84
83
  title: '',
85
84
  duration: 1500,
86
85
  },
87
86
  options,
88
87
  )
89
88
  params.duration = params.duration / 1000
90
89
  if (isJdApp) {
91
90
  const showSuccessType = isIosDevice
92
91
  ? ToastIosType.NORMAL
93
92
  : ToastAndroidType.NORMAL
94
93
  const duration = isAndroidDevice ? 0 : params.duration
95
94
  nativePageShowToast(options.title, showSuccessType, duration)
96
95
  } else {
97
96
  showNormalToast(options)
98
97
  }
99
98
  const createLoadingEle = document.createElement('div')
100
99
  createLoadingEle.id = 'J_shopLoading'
101
100
  createLoadingEle.className = `d-shop-loading flexible-center-box ${customClassName}`
102
101
  createLoadingEle.innerHTML = `<div class='d-loading-content'>
103
102
  <span class='d-shop-loading-icon'></span>
104
103
  <p class='d-shop-text'>${text}</p>
105
104
  </div>`
106
105
  const getEle = document.body ? document.body : document.getElementsByTagName('body')[0]
107
106
  console.log('获取getEle及append及appendChild方法', getEle, getEle?.append, getEle?.appendChild)
108
107
  getEle.appendChild(createLoadingEle)
109
108
  const getEle = document.getElementById('J_shopLoading')
110
109
  getEle && getEle.remove()
111
110
  num,
112
111
  widthSize = 375,
113
112
  layoutWidth = getSystemInfo.windowWidth,
114
113
  const getNum = Number(num)
115
114
  return Math.round((getNum / widthSize) * layoutWidth)
116
115
  const systemInfo: UtilsInterFace.taroGetSystemInfoSyncRes = getSystemInfo
117
116
  if (!systemInfo.system && window) {
118
117
  systemInfo.system = window.navigator.userAgent
119
118
  systemInfo.isChrome = !!systemInfo?.system.match(/chrome/i)
120
119
  }
121
120
  const isIOS = !!systemInfo?.system.match(/ios/i)
122
121
  const isAndroid = !!systemInfo?.system.match(/android/i)
123
122
  systemInfo.navBarHeight = 0
124
123
  systemInfo.statusBarHeight = 0
125
124
  systemInfo.capsulePosition = null
126
125
  systemInfo.isIOS = isIOS
127
126
  systemInfo.isAndroid = isAndroid
128
127
  return systemInfo
129
128
  return originDealShopContentData(pageData, DraJSAgentReport, isvdev)
130
129
  isJdApp,
131
130
  isWxApp,
132
131
  isIosDevice,
133
132
  isAndroidDevice,
134
133
  isJdAndIosDevice,
135
134
  isJdAndAndroidDevice,
136
135
  isWxMin,
137
136
  isWxMinAndWxapp,
138
137
  isJdMin,
139
138
  isH5,
140
139
  isH5AndJdShopView,
141
140
  isH5AndJdShopViewNativeScroll,
142
141
  isH5AndJingGouMini,
143
142
  isWxMiniH5View,
144
143
  urlCookie,
145
144
  sliceArrToChunkList,
146
145
  dealAddress,
147
146
  objectToUrlEncode,
148
147
  parseQueryUrlString,
149
148
  setLowSmallPicUrl,
150
149
  setTaroStorage,
151
150
  getTaroStorageKeyValue,
152
151
  removeTaroStorageKey,
153
152
  clearTaroStorageKey,
154
153
  getQualityImage,
155
154
  countStringify,
156
155
  getWxAppCookieStr,
157
156
  getSystemInfos,
158
157
  pxTransformFromData,
159
158
  dealShopContentDataAndReport as dealShopContentData,
160
159
  dateFormat,
161
160
  throttle,
162
161
  lodashThrottle,
163
162
  debounce,
164
163
  addHttps,
165
164
  commonShowSuccessToast as showSuccessToast,
166
165
  commonShowFailToast as showFailToast,
167
166
  commonShowNormalToast as showNormalToast,
168
167
  showShopLoading,
169
168
  hideShopLoading,
170
169
  getAppChannelType,
171
170
  formatTabActiveMenuType,
172
171
  filterUrlQueryData,
173
172
  sgmCustomReport,
174
173
  isMemberPage,
175
174
  memberFormatUtils
175
+ import Taro from '@tarojs/taro'
176
176
  nativePageShowToast, ToastAndroidType,
177
177
  ToastIosType,
178
178
  getAppChannelType, isAndroidDevice, isH5AndJdShopView,
179
179
  isH5AndJdShopViewNativeScroll, isIosDevice, isJdAndAndroidDevice, isJdAndIosDevice, isJdApp,
180
180
  isWxApp, isWxMiniH5View, isH5AndJingGouMini, urlCookie,
181
181
  sgmCustomReport, isMemberPage
182
182
  addHttps,
183
183
  clearTaroStorageKey,
184
184
  countStringify,
185
185
  dateFormat,
186
186
  dealAddress,
187
187
  dealShopContentData as originDealShopContentData,
188
188
  debounce,
189
189
  filterUrlQueryData,
190
190
  formatTabActiveMenuType,
191
191
  getQualityImage,
192
192
  getTaroStorageKeyValue,
193
193
  getWxAppCookieStr,
194
194
  isH5,
195
195
  isJdMin,
196
196
  isWxMin,
197
197
  isWxMinAndWxapp,
198
198
  lodashThrottle,
199
199
  objectToUrlEncode,
200
200
  parseQueryUrlString,
201
201
  removeTaroStorageKey,
202
202
  setLowSmallPicUrl,
203
203
  setTaroStorage,
204
204
  showFailToast,
205
205
  showNormalToast,
206
206
  showSuccessToast,
207
207
  sliceArrToChunkList,
208
208
  throttle,
209
209
  windowWidth: window.innerWidth,
210
210
  containerWidth: buildType === BUILD_TYPE.CLASSIFY ? window.innerWidth - 100 : window.innerWidth,
211
211
  screenWidth: window.innerWidth,
212
212
  platform: '',
213
213
  model: '',
214
214
  system: '',
215
215
  getSystemInfo.windowWidth = getSystemInfo.screenWidth
216
216
  const params = Object.assign(
217
217
  {},
218
218
  {
219
219
  title: '',
220
220
  duration: 1500,
221
221
  },
222
222
  options,
223
223
  )
224
224
  params.duration = params.duration / 1000
225
225
  if (isJdApp && isH5AndJdShopView) {
226
226
  const showSuccessType = isIosDevice
227
227
  ? ToastIosType.SUCCESS
228
228
  : ToastAndroidType.SUCCESS
229
229
  const duration = isAndroidDevice ? 0 : params.duration
230
230
  nativePageShowToast(options.title, showSuccessType, duration)
231
231
  console.log('执行原生toast success')
232
232
  } else {
233
233
  showSuccessToast(options)
234
234
  }
235
235
  const params = Object.assign(
236
236
  {},
237
237
  {
238
238
  title: '',
239
239
  duration: 1500,
240
240
  },
241
241
  options,
242
242
  )
243
243
  params.duration = params.duration / 1000
244
244
  console.log(`isJdApp${isJdApp}`)
245
245
  if (isJdApp && isH5AndJdShopView) {
246
246
  const showSuccessType = isIosDevice
247
247
  ? ToastIosType.FAIL
248
248
  : ToastAndroidType.FAIL
249
249
  const duration = isAndroidDevice ? 0 : params.duration
250
250
  nativePageShowToast(options.title, showSuccessType, duration)
251
251
  console.log('执行原生toast fail')
252
252
  } else {
253
253
  console.log('执行H5 toast fail')
254
254
  showFailToast(options)
255
255
  }
256
256
  const params = Object.assign(
257
257
  {},
258
258
  {
259
259
  title: '',
260
260
  duration: 1500,
261
261
  },
262
262
  options,
263
263
  )
264
264
  params.duration = params.duration / 1000
265
265
  if (isJdApp) {
266
266
  const showSuccessType = isIosDevice
267
267
  ? ToastIosType.NORMAL
268
268
  : ToastAndroidType.NORMAL
269
269
  const duration = isAndroidDevice ? 0 : params.duration
270
270
  nativePageShowToast(options.title, showSuccessType, duration)
271
271
  } else {
272
272
  showNormalToast(options)
273
273
  }
274
274
  const createLoadingEle = document.createElement('div')
275
275
  createLoadingEle.id = 'J_shopLoading'
276
276
  createLoadingEle.className = `d-shop-loading flexible-center-box ${customClassName}`
277
277
  createLoadingEle.innerHTML = `<div class='d-loading-content'>
278
278
  <span class='d-shop-loading-icon'></span>
279
279
  <p class='d-shop-text'>${text}</p>
280
280
  </div>`
281
281
  const getEle = document.body ? document.body : document.getElementsByTagName('body')[0]
282
282
  console.log('获取getEle及append及appendChild方法', getEle, getEle?.append, getEle?.appendChild)
283
283
  getEle.appendChild(createLoadingEle)
284
284
  const getEle = document.getElementById('J_shopLoading')
285
285
  getEle && getEle.remove()
286
286
  num,
287
287
  widthSize = 375,
288
288
  layoutWidth = getSystemInfo.windowWidth,
289
289
  const getNum = Number(num)
290
290
  return Math.round((getNum / widthSize) * layoutWidth)
291
291
  const systemInfo: UtilsInterFace.taroGetSystemInfoSyncRes = getSystemInfo
292
292
  if (!systemInfo.system && window) {
293
293
  systemInfo.system = window.navigator.userAgent
294
294
  systemInfo.isChrome = !!systemInfo?.system.match(/chrome/i)
295
295
  }
296
296
  const isIOS = !!systemInfo?.system.match(/ios/i)
297
297
  const isAndroid = !!systemInfo?.system.match(/android/i)
298
298
  systemInfo.navBarHeight = 0
299
299
  systemInfo.statusBarHeight = 0
300
300
  systemInfo.capsulePosition = null
301
301
  systemInfo.isIOS = isIOS
302
302
  systemInfo.isAndroid = isAndroid
303
303
  return systemInfo
304
304
  return originDealShopContentData(pageData, sgmCustomReport, isvdev)
305
305
  isJdApp,
306
306
  isWxApp,
307
307
  isIosDevice,
308
308
  isAndroidDevice,
309
309
  isJdAndIosDevice,
310
310
  isJdAndAndroidDevice,
311
311
  isWxMin,
312
312
  isWxMinAndWxapp,
313
313
  isJdMin,
314
314
  isH5,
315
315
  isH5AndJdShopView,
316
316
  isH5AndJdShopViewNativeScroll,
317
317
  isH5AndJingGouMini,
318
318
  isWxMiniH5View,
319
319
  urlCookie,
320
320
  sliceArrToChunkList,
321
321
  dealAddress,
322
322
  objectToUrlEncode,
323
323
  parseQueryUrlString,
324
324
  setLowSmallPicUrl,
325
325
  setTaroStorage,
326
326
  getTaroStorageKeyValue,
327
327
  removeTaroStorageKey,
328
328
  clearTaroStorageKey,
329
329
  getQualityImage,
330
330
  countStringify,
331
331
  getWxAppCookieStr,
332
332
  getSystemInfos,
333
333
  pxTransformFromData,
334
334
  dealShopContentDataAndReport as dealShopContentData,
335
335
  dateFormat,
336
336
  throttle,
337
337
  lodashThrottle,
338
338
  debounce,
339
339
  addHttps,
340
340
  commonShowSuccessToast as showSuccessToast,
341
341
  commonShowFailToast as showFailToast,
342
342
  commonShowNormalToast as showNormalToast,
343
343
  showShopLoading,
344
344
  hideShopLoading,
345
345
  getAppChannelType,
346
346
  formatTabActiveMenuType,
347
347
  filterUrlQueryData,
348
348
  sgmCustomReport,
349
349
  isMemberPage,
350
350
  memberFormatUtils,
351
351
  getFloorDataToDataDefines
@@ -1 +1 @@
1
- import {
2
1
  isMemberPage,
3
2
  sgmCustomReport
4
3
  isH5AndJingGouMini,
5
4
  urlCookie,
6
5
  isMemberPage,
7
6
  sgmCustomReport
7
+ import {
8
8
  isMemberPage,
9
9
  sgmCustomReport
10
10
  isH5AndJingGouMini,
11
11
  urlCookie,
12
12
  isMemberPage,
@@ -1 +1 @@
1
- import {
2
1
  sgmCustomReport
3
2
  isH5AndJingGouMini,
4
3
  urlCookie,
5
4
  sgmCustomReport
5
+ import {
6
6
  sgmCustomReport
7
7
  isH5AndJingGouMini,
8
8
  urlCookie,
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  if(!imgUrl.includes('360buyimg.com')){
3
2
  imgUrl = '//m.360buyimg.com/cms/' + imgUrl
4
3
  }
5
4
  pin?: string
6
5
  visitkey?: string
7
6
  [key: string]: any
8
7
  }
9
8
  jdpin,
10
9
  pinStatus,
11
10
  visitkey,
12
11
  unionid,
13
12
  skey,
14
13
  __jda,
15
14
  __jdv,
16
15
  __wga,
17
16
  wxapp_type
18
17
  } = cookie
19
18
  const getUserCookieObj = {}
20
19
  jdpin,
21
20
  pinStatus,
22
21
  visitkey,
23
22
  unionid,
24
23
  skey,
25
24
  __jda,
26
25
  __jdv,
27
26
  __wga,
28
27
  wid,
29
28
  wq_skey,
30
29
  wq_uin,
31
30
  wq_auth_token,
32
31
  wxapp_scene,
33
32
  wq_unionid,
34
33
  wxapp_openid,
35
34
  wxapp_version,
36
35
  wxapp_type
37
36
  name = name === 'jdpin' ? 'pin' : name;
38
37
  name === 'pin' && (ret.push(`pt_pin=${encodeURIComponent(value)}`))
39
38
  ret.push(`${name}=${encodeURIComponent(value)}`)
40
39
  getUserCookieObj[name] = value
41
40
  }
42
41
  wqCookie: getUserCookieObj
43
42
  exceptionReportFn
44
43
  exceptionReportFn(
45
44
  `店铺首页isv h5楼层隐藏不显示。原因:modularPackResult数据不完备。页面类型-buildType: ${buildType}。楼层顺序-floorIdx: ${floorData?.floorIdx}`,
46
45
  )
47
46
  const isIsvContainer = (containerId, floorListData, containerListData) => {
48
47
  const objContainer = containerListData.find(item => item.containerId === containerId)
49
48
  (itemUid) => {
50
49
  const objectFloor = floorListData.find(floorItem => itemUid === floorItem.uid)
51
50
  return RemoteLoadFloorList.includes(objectFloor?.floorExtInfo?.moduleFlag)
52
51
  }
53
52
  )?? false
54
53
  isMemberPage,
55
54
  sgmCustomReport
55
+ import Taro from '@tarojs/taro'
56
56
  const getValue = `${obj[key]}`.replace(/undefined/,'').replace(/null/,'')
57
57
  paramStr += `${index === 0 ? '' : '&'}${key}=${encodeURIComponent(getValue)}`
58
58
  if(!imgUrl.includes('360buyimg.com')){
59
59
  imgUrl = '//m.360buyimg.com/cms/' + imgUrl
60
60
  }
61
61
  pin?: string
62
62
  visitkey?: string
63
63
  [key: string]: any
64
64
  }
65
65
  jdpin,
66
66
  pinStatus,
67
67
  visitkey,
68
68
  unionid,
69
69
  skey,
70
70
  __jda,
71
71
  __jdv,
72
72
  __wga,
73
73
  wxapp_type,
74
74
  appType
75
75
  } = cookie
76
76
  const getUserCookieObj = {}
77
77
  jdpin,
78
78
  pinStatus,
79
79
  visitkey,
80
80
  unionid,
81
81
  skey,
82
82
  __jda,
83
83
  __jdv,
84
84
  __wga,
85
85
  wid,
86
86
  wq_skey,
87
87
  wq_uin,
88
88
  wq_auth_token,
89
89
  wxapp_scene,
90
90
  wq_unionid,
91
91
  wxapp_openid,
92
92
  wxapp_version,
93
93
  wxapp_type,
94
94
  appType
95
95
  name = name === 'jdpin' ? 'pin' : name;
96
96
  name === 'pin' && (ret.push(`pt_pin=${encodeURIComponent(value)}`))
97
97
  ret.push(`${name}=${encodeURIComponent(value)}`)
98
98
  getUserCookieObj[name] = value
99
99
  }
100
100
  wqCookie: getUserCookieObj
101
101
  exceptionReportFn
102
102
  const isIsvContainer = (containerId, floorListData, containerListData) => {
103
103
  const objContainer = containerListData.find(item => item.containerId === containerId)
104
104
  (itemUid) => {
105
105
  const objectFloor = floorListData.find(floorItem => itemUid === floorItem.uid)
106
106
  return RemoteLoadFloorList.includes(objectFloor?.floorExtInfo?.moduleFlag)
107
107
  }
108
108
  )?? false
109
109
  isMemberPage,
110
110
  sgmCustomReport
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conecli/cone-render",
3
- "version": "0.8.32",
3
+ "version": "0.8.34",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist/"