@conecli/cone-render 0.8.15-alpha.12 → 0.8.15-alpha.13

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.
package/dist/api/index.ts CHANGED
@@ -1 +1 @@
1
- import { protocol, isBetaServer, isH5 } from '../config/env'
2
1
  mobileLogin: `${protocol}//conecli.com`,
2
+ import { protocol, isBetaServer, isH5 } from '../config/env'
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  urlCookie
2
+ import Taro from '@tarojs/taro'
3
3
  urlCookie
@@ -1 +1 @@
1
- import React from 'react'
1
+ import React from 'react'
@@ -1,6 +1,5 @@
1
1
 
2
2
  .d-floor-exposure {
3
- position: absolute;
4
3
  height: 0;
5
4
  width: 100%;
6
5
  opacity: 0;
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  (
3
2
  <View
4
3
  className={classNames(
5
4
  exposureStyle['d-floor-exposure'],
6
5
  className,
7
6
  floorName,
8
7
  )}
9
8
  id={`J_floor_${floorName}`}
10
9
  />
11
10
  )
11
+ import Taro from '@tarojs/taro'
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  <View
3
2
  className={classNames(
4
3
  exposureStyle['d-floor-exposure'],
5
4
  className,
6
5
  floorName,
7
6
  )}
8
7
  id={floorName}
9
8
  />
10
9
  ): null
10
+ import Taro from '@tarojs/taro'
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  inViewCallback
3
2
  if (isH5AndJdShopView) {
4
3
  useEffect(() => {
5
4
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
6
5
  !componentShowStateRef.current && dealPageScrollInfo(latestRes)
7
6
  Taro.eventCenter.on(TaroEventType.PAGE_SCROLL, (res) => {
8
7
  !componentShowStateRef.current && dealPageScrollInfo(res)
9
8
  })
10
9
  }, [])
11
10
  useEffect(() => {
12
11
  if(componentShowState){
13
12
  typeof inViewCallback === 'function' && inViewCallback()
14
13
  console.log('InViewRender -- 店铺H5 展示啦!')
15
14
  }
16
15
  }, [componentShowState])
17
16
 
18
17
  const dealPageScrollInfo = (res) => {
19
18
  if (componentLazyRef.current) {
20
19
  const eleClientRect =
21
20
  componentLazyRef.current.getBoundingClientRect()
22
21
  const getContainerHeightOffSetY = res.displayHeight + res.offSetY
23
22
  const eleOffsetTop = Math.ceil(eleClientRect.top)
24
23
  if (!componentShowStateRef.current) {
25
24
  if (getContainerHeightOffSetY > eleOffsetTop) {
26
25
  componentShowStateRef.current = true
27
26
  setComponentShowState(true)
28
27
  Taro.nextTick(() => {
29
28
  setComponentRenderShowState(true)
30
29
  })
31
30
  }
32
31
  }
33
32
  }
34
33
  }
35
34
  return (
36
35
  <View
37
36
  ref={componentLazyRef}
38
37
  className={classNames(
39
38
  lazyLayoutLoadStyle['d-app-floor-lazy-layout-load'],
40
39
  'd-app-floor-lazy-load',
41
40
  )}
42
41
  style={{
43
42
  minHeight: `${
44
43
  componentRenderShowState ? 'auto' : height + (typeof height === 'number'? 'px': '')
45
44
  }`,
46
45
  backgroundColor: componentRenderShowState
47
46
  ? 'transparent'
48
47
  : '#ffffff',
49
48
  }}
50
49
  >
51
50
  {componentShowState ? children : placeholder}
52
51
  </View>
53
52
  )
54
53
  } else {
55
54
  const rootDom = document.querySelector('#J_shopHomeRoot')
56
55
  const { ref, inView } = useInView({
57
56
  threshold: 0,
58
57
  triggerOnce: true,
59
58
  root: rootDom,
60
59
  rootMargin: `0px 0px 0px 0px`,
61
60
  })
62
61
  useEffect(() => {
63
62
  if(inView){
64
63
  typeof inViewCallback === 'function' && inViewCallback()
65
64
  console.log('InViewRender -- 其它H5 展示啦!')
66
65
  }
67
66
  }, [inView])
68
67
  return (
69
68
  <View
70
69
  ref={ref}
71
70
  style={{
72
71
  minHeight: `${inView ? 'auto' : height + 'px'}`,
73
72
  backgroundColor: 'transparent',
74
73
  }}
75
74
  >
76
75
  {inView ? children : placeholder}
77
76
  </View>
78
77
  )
79
78
  }
80
79
  inViewCallback: null,
80
+ import Taro from '@tarojs/taro'
81
81
  inViewCallback
82
82
  if (isH5AndJdShopView) {
83
83
  useEffect(() => {
84
84
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
85
85
  !componentShowStateRef.current && dealPageScrollInfo(latestRes)
86
86
  Taro.eventCenter.on(TaroEventType.PAGE_SCROLL, (res) => {
87
87
  !componentShowStateRef.current && dealPageScrollInfo(res)
88
88
  })
89
89
  }, [])
90
90
  useEffect(() => {
91
91
  if(componentShowState){
92
92
  typeof inViewCallback === 'function' && inViewCallback()
93
93
  console.log('InViewRender -- 店铺H5 展示啦!')
94
94
  }
95
95
  }, [componentShowState])
96
96
 
97
97
  const dealPageScrollInfo = (res) => {
98
98
  if (componentLazyRef.current) {
99
99
  const eleClientRect =
100
100
  componentLazyRef.current.getBoundingClientRect()
101
101
  const getContainerHeightOffSetY = res.displayHeight + res.offSetY
102
102
  const eleOffsetTop = Math.ceil(eleClientRect.top)
103
103
  if (!componentShowStateRef.current) {
104
104
  if (getContainerHeightOffSetY > eleOffsetTop) {
105
105
  componentShowStateRef.current = true
106
106
  setComponentShowState(true)
107
107
  Taro.nextTick(() => {
108
108
  setComponentRenderShowState(true)
109
109
  })
110
110
  }
111
111
  }
112
112
  }
113
113
  }
114
114
  return (
115
115
  <View
116
116
  ref={componentLazyRef}
117
117
  className={classNames(
118
118
  lazyLayoutLoadStyle['d-app-floor-lazy-layout-load'],
119
119
  'd-app-floor-lazy-load',
120
120
  )}
121
121
  style={{
122
122
  minHeight: `${
123
123
  componentRenderShowState ? 'auto' : height + (typeof height === 'number'? 'px': '')
124
124
  }`,
125
125
  backgroundColor: componentRenderShowState
126
126
  ? 'transparent'
127
127
  : '#ffffff',
128
128
  }}
129
129
  >
130
130
  {componentShowState ? children : placeholder}
131
131
  </View>
132
132
  )
133
133
  } else {
134
134
  const rootDom = document.getElementById('#J_shopHomeRoot')
135
135
  const { ref, inView } = useInView({
136
136
  threshold: 0,
137
137
  triggerOnce: true,
138
138
  root: rootDom,
139
139
  rootMargin: `0px 0px 0px 0px`,
140
140
  })
141
141
  useEffect(() => {
142
142
  if(inView){
143
143
  typeof inViewCallback === 'function' && inViewCallback()
144
144
  console.log('InViewRender -- 其它H5 展示啦!')
145
145
  }
146
146
  }, [inView])
147
147
  return (
148
148
  <View
149
149
  ref={ref}
150
150
  style={{
151
151
  minHeight: `${inView ? 'auto' : height + 'px'}`,
152
152
  backgroundColor: 'transparent',
153
153
  }}
154
154
  >
155
155
  {inView ? children : placeholder}
156
156
  </View>
157
157
  )
158
158
  }
159
159
  inViewCallback: null,
@@ -1 +1 @@
1
- import Taro, { useRouter } from '@tarojs/taro'
2
1
  floorData = {},
3
2
  const rootDom = document.querySelector('#J_shopHomeRoot')
4
3
  root: rootDom,
5
4
  rootMargin: `0px 0px ${window.innerHeight}px 0px`,
6
5
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
7
6
  !componentShowStateRef.current && dealPageScrollInfo(latestRes)
8
7
  useEffect(() => {
9
8
  if(componentShowState === true){
10
9
  console.log('>>>>>>>>>>>>>>>>>>> 楼层【id=' + containerId + '】已经渲染!')
11
10
  const modularPackResult = floorData?.floorExtInfo?.modularPackResult
12
11
  nativePageRegisterMessage(
13
12
  Message_Type.NATIVE_INJECT_JS_FILE,
14
13
  {
15
14
  data: {
16
15
  "bundleUrl": [bundleUrl]
17
16
  },
18
17
  },
19
18
  )
20
19
  }
21
20
  }
22
21
  }, [componentShowState])
23
22
  ref={ref}
23
+ import Taro, { useRouter } from '@tarojs/taro'
24
24
  floorData = {},
25
25
  const rootDom = document.getElementById('#J_shopHomeRoot')
26
26
  root: rootDom,
27
27
  rootMargin: `0px 0px ${window.innerHeight}px 0px`,
28
28
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
29
29
  !componentShowStateRef.current && dealPageScrollInfo(latestRes)
30
30
  useEffect(() => {
31
31
  if(componentShowState === true){
32
32
  console.log('>>>>>>>>>>>>>>>>>>> 楼层【id=' + containerId + '】已经渲染!')
33
33
  const modularPackResult = floorData?.floorExtInfo?.modularPackResult
34
34
  nativePageRegisterMessage(
35
35
  Message_Type.NATIVE_INJECT_JS_FILE,
36
36
  {
37
37
  data: {
38
38
  "bundleUrl": [bundleUrl]
39
39
  },
40
40
  },
41
41
  )
42
42
  }
43
43
  }
44
44
  }, [componentShowState])
45
45
  ref={ref}
@@ -1 +1 @@
1
- import React, { Suspense, lazy } from 'react'
1
+ import React, { Suspense, lazy } from 'react'
@@ -1 +1 @@
1
- import { ComponentInterFace } from './component'
2
1
  mobileLogin: string
2
+ import { ComponentInterFace } from './component'
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
1
+ import Taro from '@tarojs/taro'
@@ -1 +1 @@
1
- import { isH5 } from '../utils'
1
+ import { isH5 } from '../utils'
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  console.log('京购商详页跳转:', this.jumpMiniPath.detail)
3
2
  if(global){
4
3
  if(global.miniAppLogInstance){
5
4
  }else{
6
5
  console.log('global.miniAppLogInstance为空!')
7
6
  }
8
7
  }else{
9
8
  console.log('global为空!')
10
9
  }
10
+ import Taro from '@tarojs/taro'
11
11
  console.log('京购商详页跳转:', this.jumpMiniPath.detail)
12
12
  if(global){
13
13
  if(global.miniAppLogInstance){
14
14
  }else{
15
15
  console.log('global.miniAppLogInstance为空!')
16
16
  }
17
17
  }else{
18
18
  console.log('global为空!')
19
19
  }
@@ -1 +1 @@
1
- import global from '../common'
1
+ import global from '../common'
@@ -1 +1 @@
1
- import { JdJumpJdApp } from './jdJumpJdApp'
1
+ import { JdJumpJdApp } from './jdJumpJdApp'
@@ -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
  addHttps, clearTaroStorageKey, countStringify, dateFormat, dealAddress, dealShopContentData as originDealShopContentData, debounce, filterUrlQueryData, formatTabActiveMenuType, getQualityImage, getTaroStorageKeyValue,
8
7
  getWxAppCookieStr, isH5, isJdMin, isWxMin,
9
8
  isWxMinAndWxapp, lodashThrottle, objectToUrlEncode, parseQueryUrlString, removeTaroStorageKey, setLowSmallPicUrl,
10
9
  setTaroStorage, showFailToast,
11
10
  showNormalToast, showSuccessToast, sliceArrToChunkList, throttle
12
11
  <span class="d-shop-loading-icon"></span>
13
12
  <p class="d-shop-text">${text}</p>
14
13
  </div>`
15
14
  return originDealShopContentData(pageData, DraJSAgentReport)
16
15
  isJdApp,
17
16
  isWxApp,
18
17
  isIosDevice,
19
18
  isAndroidDevice,
20
19
  isJdAndIosDevice,
21
20
  isJdAndAndroidDevice,
22
21
  isWxMin,
23
22
  isWxMinAndWxapp,
24
23
  isJdMin,
25
24
  isH5,
26
25
  isH5AndJdShopView,
27
26
  isH5AndJdShopViewNativeScroll,
28
27
  isH5AndJingGouMini,
29
28
  isWxMiniH5View,
30
29
  urlCookie,
31
30
  sliceArrToChunkList,
32
31
  dealAddress,
33
32
  objectToUrlEncode,
34
33
  parseQueryUrlString,
35
34
  setLowSmallPicUrl,
36
35
  setTaroStorage,
37
36
  getTaroStorageKeyValue,
38
37
  removeTaroStorageKey,
39
38
  clearTaroStorageKey,
40
39
  getQualityImage,
41
40
  countStringify,
42
41
  getWxAppCookieStr,
43
42
  getSystemInfos,
44
43
  pxTransformFromData,
45
44
  dateFormat,
46
45
  throttle,
47
46
  lodashThrottle,
48
47
  debounce,
49
48
  addHttps,
50
49
  commonShowSuccessToast as showSuccessToast,
51
50
  commonShowFailToast as showFailToast,
52
51
  commonShowNormalToast as showNormalToast,
53
52
  showShopLoading,
54
53
  hideShopLoading,
55
54
  getAppChannelType,
56
55
  formatTabActiveMenuType,
57
56
  filterUrlQueryData,
57
+ import Taro from '@tarojs/taro'
58
58
  nativePageShowToast, ToastAndroidType,
59
59
  ToastIosType
60
60
  getAppChannelType, isAndroidDevice, isH5AndJdShopView,
61
61
  isH5AndJdShopViewNativeScroll, isIosDevice, isJdAndAndroidDevice, isJdAndIosDevice, isJdApp,
62
62
  isWxApp, isWxMiniH5View, isH5AndJingGouMini, urlCookie
63
63
  addHttps, clearTaroStorageKey, countStringify, dateFormat, dealAddress, dealShopContentData as originDealShopContentData, debounce, filterUrlQueryData, formatTabActiveMenuType, getQualityImage, getTaroStorageKeyValue,
64
64
  getWxAppCookieStr, isH5, isJdMin, isWxMin,
65
65
  isWxMinAndWxapp, lodashThrottle, objectToUrlEncode, parseQueryUrlString, removeTaroStorageKey, setLowSmallPicUrl,
66
66
  setTaroStorage, showFailToast,
67
67
  showNormalToast, showSuccessToast, sliceArrToChunkList, throttle
68
68
  <span class="d-shop-loading-icon"></span>
69
69
  <p class="d-shop-text">${text}</p>
70
70
  </div>`
71
71
  return originDealShopContentData(pageData, () => {})
72
72
  isJdApp,
73
73
  isWxApp,
74
74
  isIosDevice,
75
75
  isAndroidDevice,
76
76
  isJdAndIosDevice,
77
77
  isJdAndAndroidDevice,
78
78
  isWxMin,
79
79
  isWxMinAndWxapp,
80
80
  isJdMin,
81
81
  isH5,
82
82
  isH5AndJdShopView,
83
83
  isH5AndJdShopViewNativeScroll,
84
84
  isH5AndJingGouMini,
85
85
  isWxMiniH5View,
86
86
  urlCookie,
87
87
  sliceArrToChunkList,
88
88
  dealAddress,
89
89
  objectToUrlEncode,
90
90
  parseQueryUrlString,
91
91
  setLowSmallPicUrl,
92
92
  setTaroStorage,
93
93
  getTaroStorageKeyValue,
94
94
  removeTaroStorageKey,
95
95
  clearTaroStorageKey,
96
96
  getQualityImage,
97
97
  countStringify,
98
98
  getWxAppCookieStr,
99
99
  getSystemInfos,
100
100
  pxTransformFromData,
101
101
  dateFormat,
102
102
  throttle,
103
103
  lodashThrottle,
104
104
  debounce,
105
105
  addHttps,
106
106
  commonShowSuccessToast as showSuccessToast,
107
107
  commonShowFailToast as showFailToast,
108
108
  commonShowNormalToast as showNormalToast,
109
109
  showShopLoading,
110
110
  hideShopLoading,
111
111
  getAppChannelType,
112
112
  formatTabActiveMenuType,
113
113
  filterUrlQueryData,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conecli/cone-render",
3
- "version": "0.8.15-alpha.12",
3
+ "version": "0.8.15-alpha.13",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist/"
@@ -11,7 +11,6 @@
11
11
  "./modules": "./dist/open/modules/index.ts",
12
12
  "./_api": "./dist/api",
13
13
  "./_common/": "./dist/common/",
14
- "./_components/": "./dist/components/",
15
14
  "./_interface": "./dist/interface",
16
15
  "./_jumpEventReport": "./dist/jumpEventReport",
17
16
  "./_jumpEventReport/": "./dist/jumpEventReport/",