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