@conecli/cone-render 0.9.1-shop2.8 → 0.10.1-beta.0

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 (56) hide show
  1. package/dist/api/index.ts +1 -1
  2. package/dist/assets/icon_blue_info.svg +1 -0
  3. package/dist/common/const.ts +1 -1
  4. package/dist/common/environmentType.ts +1 -0
  5. package/dist/common/index.h5.ts +1 -1
  6. package/dist/common/index.jd.ts +1 -1
  7. package/dist/common/index.ts +1 -1
  8. package/dist/common/index.weapp.ts +1 -1
  9. package/dist/common/jdplayerSdk.ts +1 -0
  10. package/dist/common/sgmCustomCode.ts +1 -0
  11. package/dist/common/wxappApi.jd.ts +1 -0
  12. package/dist/components/ErrorBoundary.tsx +1 -1
  13. package/dist/components/base/CustomScrollView/index.jd.tsx +1 -0
  14. package/dist/components/base/CustomScrollView/index.module.scss +7 -0
  15. package/dist/components/base/CustomVideo/index.tsx +1 -1
  16. package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
  17. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  18. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  19. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  20. package/dist/components/debug/DebugLayout/index.module.scss +67 -0
  21. package/dist/components/debug/DebugLayout/index.tsx +1 -0
  22. package/dist/components/debug/DebugLayout/utils.ts +1 -0
  23. package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
  24. package/dist/components/floorItem.jd.tsx +1 -1
  25. package/dist/components/floorItem.weapp.tsx +1 -1
  26. package/dist/components/isv/Floor/index.tsx +1 -1
  27. package/dist/components/remoteFloorItem.tsx +1 -1
  28. package/dist/interface/common.ts +1 -1
  29. package/dist/interface/component.ts +1 -1
  30. package/dist/interface/jumpEventReport.ts +1 -1
  31. package/dist/interface/service.ts +1 -1
  32. package/dist/interface/utils.ts +1 -1
  33. package/dist/jumpEventReport/base.ts +1 -1
  34. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  35. package/dist/jumpEventReport/index.h5.ts +1 -1
  36. package/dist/jumpEventReport/index.jd.ts +1 -1
  37. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  38. package/dist/jumpEventReport/web.jxwxapp.ts +1 -0
  39. package/dist/jumpEventReport/web.tjapp.ts +1 -0
  40. package/dist/jumpEventReport/web.tjm.ts +1 -0
  41. package/dist/open/api/environment.ts +1 -1
  42. package/dist/open/api/index.ts +1 -1
  43. package/dist/open/api/track.ts +1 -1
  44. package/dist/sass/app.h5.scss +5 -0
  45. package/dist/service/requestServer.ts +1 -1
  46. package/dist/utils/connectNativeJsBridge.ts +1 -1
  47. package/dist/utils/draExceptionAndProfile.ts +1 -1
  48. package/dist/utils/h5Utils.ts +1 -1
  49. package/dist/utils/index.h5.ts +1 -1
  50. package/dist/utils/index.ts +1 -1
  51. package/dist/utils/index.weapp.ts +1 -1
  52. package/dist/utils/jm-common.js +1 -1
  53. package/dist/utils/sgmCodeUtils.ts +1 -0
  54. package/dist/utils/utils.ts +1 -1
  55. package/package.json +42 -39
  56. package/dist/customHooks/useDocumentVisibilitychange.ts +0 -1
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  floorVideInfo: {},
3
2
  productVideInfo: {},
4
3
  isVipShop: false,
5
4
  isJdShowNativeImmersivePlayer: false,
6
5
  pageIdxHeightInfo: {
7
6
  list: []
8
7
  },
9
8
  jdBottomBarHeight: 0,
10
9
  jdNativeHeaderHeight: 0,
11
10
  openAppData: {}
12
11
  public config: {
13
12
  [key: string]: any
14
13
  }
15
14
  public lazyContainer: CommonInterFace.lazyContainer
16
15
  public renderedIsvComponents: CommonInterFace.renderedIsvComponents
17
16
  this.config = {}
18
17
  this.renderedIsvComponents = {}
19
18
  removeJdAndroidRquestEventForTouchStart(){}
20
19
 
21
20
  doLoginForJdPin(options = {}) {
22
21
  return this.doLogin(options)
23
22
  }
24
23
 
25
24
  getLoginCookie(updateKey = 'wxapp') {
26
25
  return new Promise((resolve) => {
27
26
  console.log("开始获取更新wxapp中的cookie信息", updateKey)
28
27
  if(this.config.wqCookie && this.config.wqCookieStr && this.config.getWqCookieKey === updateKey){
29
28
  console.log("已有存储wxapp中的cookie信息,直接返回",this.config)
30
29
  resolve({
31
30
  wqCookie: this.config.wqCookie,
32
31
  wqCookieStr: this.config.wqCookieStr,
33
32
  })
34
33
  }else {
35
34
  if (isPublishToWxapp) {
36
35
  const getWxappCookieObj = getTaroStorageKeyValue('cookies') || null
37
36
  if (getWxappCookieObj) {
38
37
  const getCookieObj = getWxappCookieObj['_data']
39
38
  const { wqCookie, wqCookieStr } = getWxAppCookieStr(getCookieObj)
40
39
  const { pin = '', visitkey = '-1', wq_unionid = '', wxapp_openid = '' } = wqCookie
41
40
  this.info.loginState = true
42
41
  this.info.userInfo.wqCookie = wqCookieStr
43
42
  this.info.userInfo.wqVisitkey = visitkey
44
43
  console.log('获取用户完整cookie信息', getCookieObj)
45
44
  const getUserAddress = this.wxAppUserInfoInstance.getAddress()
46
45
  console.log('获取微信用户地址信息', getUserAddress)
47
46
  if (getUserAddress) {
48
47
  this.info.pageInfo.address = getUserAddress?.areaId
49
48
  this.info.pageInfo.addressCommaStr = this.info.pageInfo
50
49
  .address
51
50
  ? this.info.pageInfo.address.replace(/_/g, ',')
52
51
  : ''
53
52
  this.info.pageInfo.un_area = this.info.pageInfo.address
54
53
  Taro.eventCenter.trigger(
55
54
  TaroEventType.USER_AREA_UPDATE,
56
55
  this.info.pageInfo.address,
57
56
  )
58
57
  }
59
58
  if(this.miniAppLogInstance){
60
59
  this.miniAppLogInstance.set({
61
60
  account: pin,
62
61
  unionid: wq_unionid,
63
62
  openid: wxapp_openid,
64
63
  })
65
64
  }
66
65
  this.config.wqCookie = wqCookie
67
66
  this.config.wqCookieStr = wqCookieStr
68
67
  this.config.getWqCookieKey = updateKey
69
68
  console.log("解析wxapp中的cookie信息成功,返回后存储",this.config)
70
69
  resolve({
71
70
  wqCookie,
72
71
  wqCookieStr,
73
72
  })
74
73
  }else {
75
74
  console.log("解析wxapp中的cookie信息异常,返回异常结果",this.config)
76
75
  resolve({
77
76
  wqCookie: false,
78
77
  wqCookieStr: false,
79
78
  })
80
79
  }
81
80
  }else {
82
81
  resolve({
83
82
  wqCookie: false,
84
83
  wqCookieStr: false,
85
84
  })
86
85
  }
87
86
  }
88
87
  })
89
88
  }
90
89
  return this.getLoginCookie()
91
90
 
92
91
  getAddressCachePromise = () => {
93
92
  return Promise.reject("该方法只在APP内适用")
94
93
  }
94
+ import Taro from '@tarojs/taro'
95
95
  floorVideInfo: {},
96
96
  productVideInfo: {},
97
97
  isVipShop: false,
98
98
  isJdShowNativeImmersivePlayer: false,
99
99
  pageIdxHeightInfo: {
100
100
  list: []
101
101
  },
102
102
  jdBottomBarHeight: 0,
103
103
  jdNativeHeaderHeight: 0,
104
104
  openAppData: {}
105
105
  public config: {
106
106
  [key: string]: any
107
107
  }
108
108
  public lazyContainer: CommonInterFace.lazyContainer
109
109
  public renderedIsvComponents: CommonInterFace.renderedIsvComponents
110
110
  this.config = {}
111
111
  this.renderedIsvComponents = {}
112
112
 
113
113
  taskTimeoutPromise(callBack, timeout = 2000){
114
114
  return new Promise((resolve) => {
115
115
  setTimeout(() => {
116
116
  const getCallBackRes = typeof callBack === 'function' && callBack()
117
117
  return resolve(getCallBackRes || false)
118
118
  }, timeout)
119
119
  })
120
120
  }
121
121
  removeJdAndroidRquestEventForTouchStart(){}
122
122
  this.info.sysInfo['wifiVideoAutoPlay'] = false
123
123
  checkStatusAndLogin(options = {}) {
124
124
 
125
125
  checkJdStatusAndLogin(options){
126
126
  return this.checkStatusAndLogin(options)
127
127
  }
128
128
 
129
129
  doLoginForJdPin(options = {}) {
130
130
  return this.doLogin(options)
131
131
  }
132
132
 
133
133
  getLoginCookie(updateKey = 'wxapp') {
134
134
  return new Promise((resolve) => {
135
135
  console.log("开始获取更新wxapp中的cookie信息", updateKey)
136
136
  if(this.config.wqCookie && this.config.wqCookieStr && this.config.getWqCookieKey === updateKey){
137
137
  console.log("已有存储wxapp中的cookie信息,直接返回",this.config)
138
138
  resolve({
139
139
  wqCookie: this.config.wqCookie,
140
140
  wqCookieStr: this.config.wqCookieStr,
141
141
  })
142
142
  }else {
143
143
  if (isPublishToWxapp) {
144
144
  const getWxappCookieObj = getTaroStorageKeyValue('cookies') || null
145
145
  if (getWxappCookieObj) {
146
146
  const getCookieObj = getWxappCookieObj['_data']
147
147
  const { wqCookie, wqCookieStr } = getWxAppCookieStr(getCookieObj)
148
148
  const { pin = '', visitkey = '-1', wq_unionid = '', wxapp_openid = '' } = wqCookie
149
149
  this.info.loginState = true
150
150
  this.info.userInfo.wqCookie = wqCookieStr
151
151
  this.info.userInfo.wqVisitkey = visitkey
152
152
  console.log('获取用户完整cookie信息', getCookieObj)
153
153
  const getUserAddress = this.wxAppUserInfoInstance.getAddress()
154
154
  console.log('获取微信用户地址信息', getUserAddress)
155
155
  if (getUserAddress) {
156
156
  this.info.pageInfo.address = getUserAddress?.areaId
157
157
  this.info.pageInfo.addressCommaStr = this.info.pageInfo
158
158
  .address
159
159
  ? this.info.pageInfo.address.replace(/_/g, ',')
160
160
  : ''
161
161
  this.info.pageInfo.un_area = this.info.pageInfo.address
162
162
  Taro.eventCenter.trigger(
163
163
  TaroEventType.USER_AREA_UPDATE,
164
164
  this.info.pageInfo.address,
165
165
  )
166
166
  }
167
167
  if(this.miniAppLogInstance){
168
168
  this.miniAppLogInstance.set({
169
169
  account: pin,
170
170
  unionid: wq_unionid,
171
171
  openid: wxapp_openid,
172
172
  })
173
173
  }
174
174
  this.config.wqCookie = wqCookie
175
175
  this.config.wqCookieStr = wqCookieStr
176
176
  this.config.getWqCookieKey = updateKey
177
177
  console.log("解析wxapp中的cookie信息成功,返回后存储",this.config)
178
178
  resolve({
179
179
  wqCookie,
180
180
  wqCookieStr,
181
181
  })
182
182
  }else {
183
183
  console.log("解析wxapp中的cookie信息异常,返回异常结果",this.config)
184
184
  resolve({
185
185
  wqCookie: false,
186
186
  wqCookieStr: false,
187
187
  })
188
188
  }
189
189
  }else {
190
190
  resolve({
191
191
  wqCookie: false,
192
192
  wqCookieStr: false,
193
193
  })
194
194
  }
195
195
  }
196
196
  })
197
197
  }
198
198
  return this.getLoginCookie()
199
199
 
200
200
  getAddressCachePromise = () => {
201
201
  return Promise.reject("该方法只在APP内适用")
202
202
  }
203
203
 
204
204
  getDynamicConfig(key: string){
205
205
  console.warn('调用默认的 getDynamicConfig(),注意,此方法还未实现!')
206
206
  return null
207
207
  }