@conecli/cone-render 0.8.41 → 0.8.42
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/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/base/CustomVideo/index.tsx +1 -1
- package/dist/components/base/ExposureSmart/index.tsx +1 -1
- package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
- package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
- package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
- package/dist/components/base/MobileCommonHeader/index.module.scss +8 -0
- package/dist/components/base/MobileCommonHeader/index.tsx +1 -1
- package/dist/jumpEventReport/logEventConfig.ts +1 -1
- package/dist/jumpEventReport/web.wxapp.ts +1 -1
- package/dist/open/api/device.ts +1 -1
- package/dist/open/api/util.ts +1 -1
- package/dist/sass/app.h5.scss +5 -0
- package/dist/utils/connectNativeJsBridge.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/utils.ts +1 -1
- package/package.json +1 -1
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
|
}
|
|
109
|
+
import Taro from '@tarojs/taro'
|
|
110
110
|
floorVideInfo: {},
|
|
111
111
|
productVideInfo: {},
|
|
112
112
|
isVipShop: false,
|
|
113
113
|
isJdShowNativeImmersivePlayer: false,
|
|
114
114
|
pageIdxHeightInfo: {
|
|
115
115
|
list: []
|
|
116
116
|
},
|
|
117
117
|
jdBottomBarHeight: 0,
|
|
118
118
|
jdNativeHeaderHeight: 0,
|
|
119
119
|
openAppData: {}
|
|
120
120
|
public config: {
|
|
121
121
|
[key: string]: any
|
|
122
122
|
}
|
|
123
123
|
public lazyContainer: CommonInterFace.lazyContainer
|
|
124
124
|
public renderedIsvComponents: CommonInterFace.renderedIsvComponents
|
|
125
125
|
this.config = {}
|
|
126
126
|
this.renderedIsvComponents = {}
|
|
127
127
|
|
|
128
128
|
taskTimeoutPromise(callBack, timeout = 2000){
|
|
129
129
|
return new Promise((resolve) => {
|
|
130
130
|
setTimeout(() => {
|
|
131
131
|
const getCallBackRes = typeof callBack === 'function' && callBack()
|
|
132
132
|
return resolve(getCallBackRes || false)
|
|
133
133
|
}, timeout)
|
|
134
134
|
})
|
|
135
135
|
}
|
|
136
136
|
removeJdAndroidRquestEventForTouchStart(){}
|
|
137
137
|
this.info.sysInfo['wifiVideoAutoPlay'] = false
|
|
138
138
|
checkStatusAndLogin(options = {}) {
|
|
139
139
|
|
|
140
140
|
checkJdStatusAndLogin(options){
|
|
141
141
|
return this.checkStatusAndLogin(options)
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
doLoginForJdPin(options = {}) {
|
|
145
145
|
return this.doLogin(options)
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
getLoginCookie(updateKey = 'wxapp') {
|
|
149
149
|
return new Promise((resolve) => {
|
|
150
150
|
console.log("开始获取更新wxapp中的cookie信息", updateKey)
|
|
151
151
|
if(this.config.wqCookie && this.config.wqCookieStr && this.config.getWqCookieKey === updateKey){
|
|
152
152
|
console.log("已有存储wxapp中的cookie信息,直接返回",this.config)
|
|
153
153
|
resolve({
|
|
154
154
|
wqCookie: this.config.wqCookie,
|
|
155
155
|
wqCookieStr: this.config.wqCookieStr,
|
|
156
156
|
})
|
|
157
157
|
}else {
|
|
158
158
|
if (isPublishToWxapp) {
|
|
159
159
|
const getWxappCookieObj = getTaroStorageKeyValue('cookies') || null
|
|
160
160
|
if (getWxappCookieObj) {
|
|
161
161
|
const getCookieObj = getWxappCookieObj['_data']
|
|
162
162
|
const { wqCookie, wqCookieStr } = getWxAppCookieStr(getCookieObj)
|
|
163
163
|
const { pin = '', visitkey = '-1', wq_unionid = '', wxapp_openid = '' } = wqCookie
|
|
164
164
|
this.info.loginState = true
|
|
165
165
|
this.info.userInfo.wqCookie = wqCookieStr
|
|
166
166
|
this.info.userInfo.wqVisitkey = visitkey
|
|
167
167
|
console.log('获取用户完整cookie信息', getCookieObj)
|
|
168
168
|
const getUserAddress = this.wxAppUserInfoInstance.getAddress()
|
|
169
169
|
console.log('获取微信用户地址信息', getUserAddress)
|
|
170
170
|
if (getUserAddress) {
|
|
171
171
|
this.info.pageInfo.address = getUserAddress?.areaId
|
|
172
172
|
this.info.pageInfo.addressCommaStr = this.info.pageInfo
|
|
173
173
|
.address
|
|
174
174
|
? this.info.pageInfo.address.replace(/_/g, ',')
|
|
175
175
|
: ''
|
|
176
176
|
this.info.pageInfo.un_area = this.info.pageInfo.address
|
|
177
177
|
Taro.eventCenter.trigger(
|
|
178
178
|
TaroEventType.USER_AREA_UPDATE,
|
|
179
179
|
this.info.pageInfo.address,
|
|
180
180
|
)
|
|
181
181
|
}
|
|
182
182
|
if(this.miniAppLogInstance){
|
|
183
183
|
this.miniAppLogInstance.set({
|
|
184
184
|
account: pin,
|
|
185
185
|
unionid: wq_unionid,
|
|
186
186
|
openid: wxapp_openid,
|
|
187
187
|
})
|
|
188
188
|
}
|
|
189
189
|
this.config.wqCookie = wqCookie
|
|
190
190
|
this.config.wqCookieStr = wqCookieStr
|
|
191
191
|
this.config.getWqCookieKey = updateKey
|
|
192
192
|
console.log("解析wxapp中的cookie信息成功,返回后存储",this.config)
|
|
193
193
|
resolve({
|
|
194
194
|
wqCookie,
|
|
195
195
|
wqCookieStr,
|
|
196
196
|
})
|
|
197
197
|
}else {
|
|
198
198
|
console.log("解析wxapp中的cookie信息异常,返回异常结果",this.config)
|
|
199
199
|
resolve({
|
|
200
200
|
wqCookie: false,
|
|
201
201
|
wqCookieStr: false,
|
|
202
202
|
})
|
|
203
203
|
}
|
|
204
204
|
}else {
|
|
205
205
|
resolve({
|
|
206
206
|
wqCookie: false,
|
|
207
207
|
wqCookieStr: false,
|
|
208
208
|
})
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
})
|
|
212
212
|
}
|
|
213
213
|
return this.getLoginCookie()
|
|
214
214
|
|
|
215
215
|
getAddressCachePromise = () => {
|
|
216
216
|
return Promise.reject("该方法只在APP内适用")
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
getDynamicConfig(key: string){
|
|
220
220
|
console.warn('调用默认的 getDynamicConfig(),注意,此方法还未实现!')
|
|
221
221
|
return null
|
|
222
222
|
}
|