@conecli/cone-render 0.10.1-beta.5 → 0.10.1-beta.6
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/pageType.ts +1 -1
- package/dist/common/sgmCustomCode.ts +1 -1
- package/dist/components/base/CountDown/index.module.scss +49 -44
- package/dist/components/base/CountDown/index.tsx +1 -1
- package/dist/components/base/CustomVideo/common.ts +1 -0
- package/dist/components/base/CustomVideo/index.tsx +1 -1
- package/dist/components/base/LazyLoadImage/index.h5.module.scss +11 -6
- package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
- package/dist/components/base/Price/Base/index.tsx +1 -1
- package/dist/components/base/Price/Double/index.module.scss +8 -0
- package/dist/components/base/Price/Double/index.tsx +1 -1
- package/dist/components/floorItem.tsx +1 -1
- package/dist/components/isv/Floor/index.tsx +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/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.jdb.ts +1 -1
- package/dist/jumpEventReport/web.jdjch.ts +1 -1
- package/dist/jumpEventReport/web.jxwxapp.ts +1 -1
- package/dist/jumpEventReport/web.pc.ts +1 -1
- package/dist/jumpEventReport/web.tjapp.ts +1 -1
- package/dist/jumpEventReport/web.tjm.ts +1 -1
- package/dist/jumpEventReport/web.wxapp.ts +1 -1
- package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
- package/dist/modules/ContainerFloorList/index.tsx +1 -1
- package/dist/open/api/util.ts +1 -1
- package/dist/sass/base.scss +142 -141
- package/dist/service/fetchGateway.ts +1 -1
- package/dist/service/http/colorSign.ts +1 -1
- package/dist/service/http/h5Http.ts +1 -0
- package/dist/service/http/index.h5.ts +1 -0
- package/dist/service/requestServer.h5.ts +1 -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/utils.ts +1 -1
- package/package.json +35 -29
- package/dist/utils/memberFormatUtils.js +0 -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
|
}
|
|
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
|
getAPPUseStraightCorner () {
|
|
148
148
|
return Promise.resolve(false)
|
|
149
149
|
}
|
|
150
150
|
checkStatusAndLogin(options = {}) {
|
|
151
151
|
|
|
152
152
|
checkJdStatusAndLogin(options){
|
|
153
153
|
return this.checkStatusAndLogin(options)
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
doLoginForJdPin(options = {}) {
|
|
157
157
|
return this.doLogin(options)
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
getLoginCookie(updateKey = 'wxapp') {
|
|
161
161
|
return new Promise((resolve) => {
|
|
162
162
|
console.log("开始获取更新wxapp中的cookie信息", updateKey)
|
|
163
163
|
if(this.config.wqCookie && this.config.wqCookieStr && this.config.getWqCookieKey === updateKey){
|
|
164
164
|
console.log("已有存储wxapp中的cookie信息,直接返回",this.config)
|
|
165
165
|
resolve({
|
|
166
166
|
wqCookie: this.config.wqCookie,
|
|
167
167
|
wqCookieStr: this.config.wqCookieStr,
|
|
168
168
|
})
|
|
169
169
|
}else {
|
|
170
170
|
if (isPublishToWxapp) {
|
|
171
171
|
const getWxappCookieObj = getTaroStorageKeyValue('cookies') || null
|
|
172
172
|
if (getWxappCookieObj) {
|
|
173
173
|
const getCookieObj = getWxappCookieObj['_data']
|
|
174
174
|
const { wqCookie, wqCookieStr } = getWxAppCookieStr(getCookieObj)
|
|
175
175
|
const { pin = '', visitkey = '-1', wq_unionid = '', wxapp_openid = '' } = wqCookie
|
|
176
176
|
this.info.loginState = true
|
|
177
177
|
this.info.userInfo.wqCookie = wqCookieStr
|
|
178
178
|
this.info.userInfo.wqVisitkey = visitkey
|
|
179
179
|
console.log('获取用户完整cookie信息', getCookieObj)
|
|
180
180
|
const getUserAddress = this.wxAppUserInfoInstance.getAddress()
|
|
181
181
|
console.log('获取微信用户地址信息', getUserAddress)
|
|
182
182
|
if (getUserAddress) {
|
|
183
183
|
this.info.pageInfo.address = getUserAddress?.areaId
|
|
184
184
|
this.info.pageInfo.addressCommaStr = this.info.pageInfo
|
|
185
185
|
.address
|
|
186
186
|
? this.info.pageInfo.address.replace(/_/g, ',')
|
|
187
187
|
: ''
|
|
188
188
|
this.info.pageInfo.un_area = this.info.pageInfo.address
|
|
189
189
|
Taro.eventCenter.trigger(
|
|
190
190
|
TaroEventType.USER_AREA_UPDATE,
|
|
191
191
|
this.info.pageInfo.address,
|
|
192
192
|
)
|
|
193
193
|
}
|
|
194
194
|
if(this.miniAppLogInstance){
|
|
195
195
|
this.miniAppLogInstance.set({
|
|
196
196
|
account: pin,
|
|
197
197
|
unionid: wq_unionid,
|
|
198
198
|
openid: wxapp_openid,
|
|
199
199
|
})
|
|
200
200
|
}
|
|
201
201
|
this.config.wqCookie = wqCookie
|
|
202
202
|
this.config.wqCookieStr = wqCookieStr
|
|
203
203
|
this.config.getWqCookieKey = updateKey
|
|
204
204
|
console.log("解析wxapp中的cookie信息成功,返回后存储",this.config)
|
|
205
205
|
resolve({
|
|
206
206
|
wqCookie,
|
|
207
207
|
wqCookieStr,
|
|
208
208
|
})
|
|
209
209
|
}else {
|
|
210
210
|
console.log("解析wxapp中的cookie信息异常,返回异常结果",this.config)
|
|
211
211
|
resolve({
|
|
212
212
|
wqCookie: false,
|
|
213
213
|
wqCookieStr: false,
|
|
214
214
|
})
|
|
215
215
|
}
|
|
216
216
|
}else {
|
|
217
217
|
resolve({
|
|
218
218
|
wqCookie: false,
|
|
219
219
|
wqCookieStr: false,
|
|
220
220
|
})
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
})
|
|
224
224
|
}
|
|
225
225
|
return this.getLoginCookie()
|
|
226
226
|
|
|
227
227
|
getAddressCachePromise = () => {
|
|
228
228
|
return Promise.reject("该方法只在APP内适用")
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
getDynamicConfig(key: string){
|
|
232
232
|
console.warn('调用默认的 getDynamicConfig(),注意,此方法还未实现!')
|
|
233
233
|
return null
|
|
234
234
|
}
|
|
235
235
|
renderNextTickLoadSdk(){
|
|
236
236
|
console.warn("暂未实现 index.ts")
|
|
237
237
|
}
|
|
238
238
|
loadOtherSdk(){
|
|
239
239
|
console.warn("暂未实现 index.ts")
|
|
240
240
|
}
|
|
241
241
|
loadItemSdkPromise(jsInfo = {}) {
|
|
242
242
|
console.warn('暂未实现 index.ts')
|
|
243
243
|
}
|