@conecli/cone-render 0.8.21-shop-beta.2 → 0.8.21-shop-beta.5

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