@conecli/cone-render 0.8.19 → 0.8.20-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.
- package/dist/api/index.ts +1 -1
- package/dist/common/const.ts +1 -1
- package/dist/common/index.h5.ts +1 -1
- package/dist/common/index.jd.ts +1 -1
- package/dist/common/isvStorage/index.h5.ts +1 -0
- package/dist/common/isvStorage/index.ts +1 -0
- package/dist/common/token/const.ts +1 -0
- package/dist/common/token/index.h5.ts +1 -0
- package/dist/common/token/index.ts +1 -0
- package/dist/common/token/token.jd.ts +1 -0
- package/dist/common/token/token.ts +1 -0
- package/dist/common/token/token.wxapp.ts +1 -0
- package/dist/components/base/CommonFloorHead/index.module.scss +1 -1
- package/dist/components/base/CommonFloorHead/index.tsx +1 -1
- package/dist/components/base/CustomVideo/const.ts +1 -0
- package/dist/components/base/CustomVideo/index.module.scss +40 -64
- package/dist/components/base/CustomVideo/index.tsx +1 -1
- package/dist/components/base/Dialog/index.module.scss +6 -2
- package/dist/components/base/Dialog/index.tsx +1 -1
- package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
- package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
- package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
- package/dist/components/base/NetworkDataError/const.ts +1 -1
- package/dist/components/base/NetworkDataError/index.module.scss +3 -0
- package/dist/components/base/NetworkDataError/index.tsx +1 -1
- package/dist/components/base/Price/{const.ts → Base/const.ts} +0 -0
- package/dist/components/base/Price/Base/index.module.scss +136 -0
- package/dist/components/base/Price/Base/index.tsx +1 -0
- package/dist/components/base/Price/Double/index.module.scss +158 -0
- package/dist/components/base/Price/Double/index.tsx +1 -0
- package/dist/components/base/Price/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 -0
- 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/const.ts +1 -1
- package/dist/jumpEventReport/createReportFloorData.ts +1 -1
- package/dist/jumpEventReport/index.h5.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/report.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 -0
- package/dist/jumpEventReport/web.wxapp.ts +1 -1
- package/dist/libs/taroAppReport.js +2 -2
- package/dist/modules/ContainerFloorList/index.tsx +1 -1
- package/dist/open/api/index.ts +1 -1
- package/dist/open/api/jump/business.ts +1 -0
- package/dist/open/api/jump/index.ts +1 -0
- package/dist/open/api/jump/minPath.ts +1 -0
- package/dist/open/api/jump/side.ts +1 -0
- package/dist/open/api/jump/webUrl.ts +1 -0
- package/dist/open/api/jump copy.ts +1 -0
- package/dist/open/api/moduleUtil.ts +1 -1
- package/dist/open/api/request.ts +1 -0
- package/dist/open/api/shopMember.ts +1 -0
- package/dist/open/api/userToken.ts +1 -0
- package/dist/service/bMallConst.ts +1 -0
- package/dist/service/bMallConst.wxapp.ts +1 -0
- package/dist/service/fetchGateway.ts +1 -0
- package/dist/service/fetchJsonp.ts +1 -0
- package/dist/service/http/colorSign.ts +1 -0
- package/dist/service/http/colorSign.wxapp.ts +1 -0
- package/dist/service/http/const.ts +1 -0
- package/dist/service/http/http.ts +1 -0
- package/dist/service/http/httpInterceptors.jd.ts +1 -0
- package/dist/service/http/httpInterceptors.ts +1 -0
- package/dist/service/http/index.ts +1 -0
- package/dist/service/requestServer.ts +1 -0
- 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/jm-common.js +1 -1
- package/dist/utils/memberFormatUtils.js +1 -0
- package/dist/utils/priceUtils.js +1 -0
- package/dist/utils/ready.ts +1 -0
- package/dist/utils/utils.ts +1 -1
- package/package.json +5 -4
- package/dist/components/base/Price/index.module.scss +0 -136
- package/dist/open/api/jump.ts +0 -1
package/dist/common/index.jd.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import Taro from '@tarojs/taro'
|
|
2
1
|
public config: object
|
|
3
2
|
this.config = {}
|
|
4
3
|
return new Promise((resolve, reject) => {
|
|
5
4
|
if (typeof jd !== 'undefined' && jd.requestWebCookie) {
|
|
6
5
|
jd.requestWebCookie({
|
|
7
6
|
needpin: 1,
|
|
8
7
|
success: (res) => {
|
|
9
8
|
console.log(res)
|
|
10
9
|
const { ticket, pt_pin } = res
|
|
11
10
|
console.log('requestWebCookie.success', res)
|
|
12
11
|
this.info.userInfo = {
|
|
13
12
|
pin: pt_pin,
|
|
14
13
|
encodePin: encodeURIComponent(pt_pin),
|
|
15
14
|
ptkey: ticket,
|
|
16
15
|
}
|
|
17
16
|
this.miniAppLogInstance &&
|
|
18
17
|
this.miniAppLogInstance.set({
|
|
19
18
|
account: pt_pin,
|
|
20
19
|
})
|
|
21
20
|
this.info.loginState = true
|
|
22
21
|
resolve(res)
|
|
23
22
|
},
|
|
24
23
|
fail(res) {
|
|
25
24
|
console.log('requestWebCookie.fail', res)
|
|
26
25
|
reject(res)
|
|
27
26
|
},
|
|
28
27
|
})
|
|
29
28
|
} else {
|
|
30
29
|
resolve({
|
|
31
30
|
pin: '',
|
|
32
31
|
ptkey: '',
|
|
33
32
|
mock: true
|
|
34
33
|
})
|
|
35
34
|
}
|
|
36
35
|
})
|
|
37
36
|
this.checkLoginStatus().then(res => {
|
|
38
37
|
console.log(
|
|
39
38
|
'jdLoadCheckStatusAndLogin hasUserLogined.success: ',
|
|
40
39
|
res,
|
|
41
40
|
)
|
|
42
41
|
resolve(res)
|
|
43
42
|
}).catch(err => {
|
|
44
43
|
console.warn(
|
|
45
44
|
'jdLoadCheckStatusAndLogin hasUserLogined.fail: ',
|
|
46
45
|
err,
|
|
47
46
|
)
|
|
48
47
|
this.toLogin().then(res => {
|
|
49
48
|
resolve(res)
|
|
50
49
|
}).catch(err => {
|
|
51
50
|
reject(err)
|
|
52
51
|
})
|
|
53
52
|
})
|
|
54
53
|
return new Promise((resolve,reject) => {
|
|
55
54
|
if (typeof jd !== 'undefined' && jd.hasUserLogined) {
|
|
56
55
|
jd.hasUserLogined({
|
|
57
56
|
success: (res) => {
|
|
58
57
|
console.log('hasUserLogined.success: ', res)
|
|
59
58
|
if (res.status === 1) {
|
|
60
59
|
this.getLoginCookie()
|
|
61
60
|
resolve(res)
|
|
62
61
|
}else {
|
|
63
62
|
reject(res)
|
|
64
63
|
}
|
|
65
64
|
},
|
|
66
65
|
fail: (res) => {
|
|
67
66
|
console.warn('hasUserLogined.fail: ', res)
|
|
68
67
|
reject(res)
|
|
69
68
|
},
|
|
70
69
|
})
|
|
71
70
|
} else {
|
|
72
71
|
reject(false)
|
|
73
72
|
}
|
|
74
73
|
})
|
|
74
|
+
import Taro from '@tarojs/taro'
|
|
75
75
|
public config: object
|
|
76
76
|
this.config = {}
|
|
77
77
|
return new Promise((resolve, reject) => {
|
|
78
78
|
if (typeof jd !== 'undefined' && jd.requestWebCookie) {
|
|
79
79
|
jd.requestWebCookie({
|
|
80
80
|
needpin: 1,
|
|
81
81
|
success: (res) => {
|
|
82
82
|
console.log(res)
|
|
83
83
|
const { ticket, pt_pin } = res
|
|
84
84
|
console.log('requestWebCookie.success', res)
|
|
85
85
|
this.info.userInfo = {
|
|
86
86
|
pin: pt_pin,
|
|
87
87
|
encodePin: encodeURIComponent(pt_pin),
|
|
88
88
|
ptkey: ticket,
|
|
89
89
|
}
|
|
90
90
|
this.miniAppLogInstance &&
|
|
91
91
|
this.miniAppLogInstance.set({
|
|
92
92
|
account: pt_pin,
|
|
93
93
|
})
|
|
94
94
|
this.info.loginState = true
|
|
95
95
|
resolve(res)
|
|
96
96
|
},
|
|
97
97
|
fail(res) {
|
|
98
98
|
console.log('requestWebCookie.fail', res)
|
|
99
99
|
reject(res)
|
|
100
100
|
},
|
|
101
101
|
})
|
|
102
102
|
} else {
|
|
103
103
|
resolve({
|
|
104
104
|
pin: '',
|
|
105
105
|
ptkey: '',
|
|
106
106
|
mock: true
|
|
107
107
|
})
|
|
108
108
|
}
|
|
109
109
|
})
|
|
110
110
|
this.checkLoginStatus().then(res => {
|
|
111
111
|
console.log(
|
|
112
112
|
'jdLoadCheckStatusAndLogin hasUserLogined.success: ',
|
|
113
113
|
res,
|
|
114
114
|
)
|
|
115
115
|
resolve(res)
|
|
116
116
|
}).catch(err => {
|
|
117
117
|
console.warn(
|
|
118
118
|
'jdLoadCheckStatusAndLogin hasUserLogined.fail: ',
|
|
119
119
|
err,
|
|
120
120
|
)
|
|
121
121
|
this.toLogin().then(res => {
|
|
122
122
|
resolve(res)
|
|
123
123
|
}).catch(err => {
|
|
124
124
|
reject(err)
|
|
125
125
|
})
|
|
126
126
|
})
|
|
127
127
|
return this.checkStatusAndLoginPromise
|
|
128
128
|
return new Promise((resolve,reject) => {
|
|
129
129
|
if (typeof jd !== 'undefined' && jd.hasUserLogined) {
|
|
130
130
|
jd.hasUserLogined({
|
|
131
131
|
success: (res) => {
|
|
132
132
|
console.log('hasUserLogined.success: ', res)
|
|
133
133
|
if (res.status === 1) {
|
|
134
134
|
this.getLoginCookie()
|
|
135
135
|
resolve(res)
|
|
136
136
|
}else {
|
|
137
137
|
reject(res)
|
|
138
138
|
}
|
|
139
139
|
},
|
|
140
140
|
fail: (res) => {
|
|
141
141
|
console.warn('hasUserLogined.fail: ', res)
|
|
142
142
|
reject(res)
|
|
143
143
|
},
|
|
144
144
|
})
|
|
145
145
|
} else {
|
|
146
146
|
reject(false)
|
|
147
147
|
}
|
|
148
148
|
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const ISV_GLOBAL_CACHE_KEY = '_isvGlobalStorage'
|
|
2
|
if (!key) {
|
|
1
3
|
console.error('setItem key cannot be empty or null')
|
|
2
4
|
return
|
|
3
5
|
}
|
|
4
6
|
console.log('setItem key:', key, value)
|
|
5
7
|
let globalCache = window[ISV_GLOBAL_CACHE_KEY]
|
|
6
8
|
if (!globalCache) {
|
|
7
9
|
globalCache = {}
|
|
8
10
|
window[ISV_GLOBAL_CACHE_KEY] = globalCache
|
|
9
11
|
}
|
|
10
12
|
globalCache[key] = value
|
|
11
13
|
if (!key) {
|
|
12
14
|
console.error('getItem key cannot be empty or null')
|
|
13
15
|
return
|
|
14
16
|
}
|
|
15
17
|
console.log('getItem key:', key)
|
|
16
18
|
let globalCache = window[ISV_GLOBAL_CACHE_KEY] || {}
|
|
17
19
|
const value: any = globalCache[key]
|
|
18
20
|
return value
|
|
19
21
|
if (!key) {
|
|
20
22
|
console.error('removeItem key cannot be empty or null')
|
|
21
23
|
return
|
|
22
24
|
}
|
|
23
25
|
console.log('removeItem key:', key)
|
|
24
26
|
let globalCache = window[ISV_GLOBAL_CACHE_KEY]
|
|
25
27
|
if (globalCache) {
|
|
26
28
|
delete globalCache[key]
|
|
27
29
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { isApp } from '../../utils/jm-common'
|
|
2
|
return new Promise((resolve, reject) => {
|
|
1
3
|
let platform: string = getPlatform()
|
|
2
4
|
if (platform === TokenPlatform.TYPE_JDAPP) {
|
|
3
5
|
ready('jmfe', 3000)
|
|
4
6
|
.then(() => {
|
|
5
7
|
console.log('window.jmfe已经存在:', jmfe)
|
|
6
8
|
import('./token.jd')
|
|
7
9
|
.then((data) => {
|
|
8
10
|
console.log('data:', data)
|
|
9
11
|
resolve(data)
|
|
10
12
|
})
|
|
11
13
|
.catch((err) => {
|
|
12
14
|
reject(err)
|
|
13
15
|
})
|
|
14
16
|
})
|
|
15
17
|
.catch((e) => {
|
|
16
18
|
console.log('window.jmfe不存在')
|
|
17
19
|
reject(e)
|
|
18
20
|
})
|
|
19
21
|
}
|
|
20
22
|
else if (platform === TokenPlatform.TYPE_WQ) {
|
|
21
23
|
import('./token.wxapp')
|
|
22
24
|
.then((data) => {
|
|
23
25
|
console.log('data:', data)
|
|
24
26
|
resolve(data)
|
|
25
27
|
})
|
|
26
28
|
.catch((err) => {
|
|
27
29
|
reject(err)
|
|
28
30
|
})
|
|
29
31
|
} else {
|
|
30
32
|
import('./token')
|
|
31
33
|
.then((data) => {
|
|
32
34
|
console.log('data:', data)
|
|
33
35
|
resolve(data)
|
|
34
36
|
})
|
|
35
37
|
.catch((err) => {
|
|
36
38
|
reject(err)
|
|
37
39
|
})
|
|
38
40
|
}
|
|
39
41
|
})
|
|
40
42
|
console.log(e);
|
|
41
43
|
return {}
|
|
42
44
|
return new Promise((resolve) => {
|
|
43
45
|
loadTokenPromise
|
|
44
46
|
.then((proxy: any) => {
|
|
45
47
|
if (proxy?.isLogin) {
|
|
46
48
|
proxy?.isLogin().then((data: boolean) => {
|
|
47
49
|
resolve(data)
|
|
48
50
|
})
|
|
49
51
|
} else {
|
|
50
52
|
resolve(false)
|
|
51
53
|
}
|
|
52
54
|
})
|
|
53
55
|
.catch((err) => {
|
|
54
56
|
resolve(false)
|
|
55
57
|
})
|
|
56
58
|
})
|
|
57
59
|
return new Promise((resolve) => {
|
|
58
60
|
loadTokenPromise
|
|
59
61
|
.then((proxy: any) => {
|
|
60
62
|
if (proxy?.getIsvToken) {
|
|
61
63
|
proxy?.getIsvToken().then((data: string) => {
|
|
62
64
|
resolve(data)
|
|
63
65
|
})
|
|
64
66
|
} else {
|
|
65
67
|
resolve('')
|
|
66
68
|
}
|
|
67
69
|
})
|
|
68
70
|
.catch((err) => {
|
|
69
71
|
resolve('')
|
|
70
72
|
})
|
|
71
73
|
})
|
|
72
74
|
return new Promise((resolve) => {
|
|
73
75
|
loadTokenPromise
|
|
74
76
|
.then((proxy: any) => {
|
|
75
77
|
if (proxy?.toLogin) {
|
|
76
78
|
proxy?.toLogin(options)
|
|
77
79
|
resolve(true)
|
|
78
80
|
} else {
|
|
79
81
|
resolve(false)
|
|
80
82
|
}
|
|
81
83
|
})
|
|
82
84
|
.catch((err) => {
|
|
83
85
|
resolve(false)
|
|
84
86
|
})
|
|
85
87
|
})
|
|
86
88
|
let platform = TokenPlatform.TYPE_M
|
|
87
89
|
if (isApp('jd')) {
|
|
88
90
|
platform = TokenPlatform.TYPE_JDAPP
|
|
89
91
|
}
|
|
90
92
|
else if (isApp('wx') && isApp('mp')) {
|
|
91
93
|
platform = TokenPlatform.TYPE_WQ
|
|
92
94
|
}
|
|
93
95
|
return platform
|
|
94
96
|
let platform = getPlatform()
|
|
95
97
|
let source = platform
|
|
96
98
|
if (platform === TokenPlatform.TYPE_M || platform === TokenPlatform.TYPE_WQ) {
|
|
97
99
|
source = TokenPlatform.TYPE_JDAPP
|
|
98
100
|
}
|
|
99
101
|
return source
|
|
100
102
|
return window?.page_data?.pageChannel || ''
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { TokenPlatform } from './const'
|
|
2
|
return new Promise((resolve) => {
|
|
1
3
|
console.log('isLogin暂未实现')
|
|
2
4
|
resolve(false)
|
|
3
5
|
})
|
|
4
6
|
return new Promise((resolve) => {
|
|
5
7
|
console.log('getIsvToken暂未实现')
|
|
6
8
|
resolve('')
|
|
7
9
|
})
|
|
8
10
|
return new Promise((resolve) => {
|
|
9
11
|
console.log('toLogin暂未实现')
|
|
10
12
|
resolve(false)
|
|
11
13
|
})
|
|
12
14
|
return TokenPlatform.TYPE_OTHER
|
|
13
15
|
return ''
|
|
14
16
|
return ''
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.log('load token.jd')
|
|
2
|
return new Promise((resolve) => {
|
|
1
3
|
if (jmfe) {
|
|
2
4
|
jmfe.isJDAppLogin().then(({ data }) => {
|
|
3
5
|
if (data === '1') {
|
|
4
6
|
resolve(true)
|
|
5
7
|
} else if (data === '0') {
|
|
6
8
|
resolve(false)
|
|
7
9
|
}
|
|
8
10
|
})
|
|
9
11
|
} else {
|
|
10
12
|
console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js')
|
|
11
13
|
resolve(false)
|
|
12
14
|
}
|
|
13
15
|
})
|
|
14
16
|
return requestIsvToken(window.location.href)
|
|
15
17
|
if (jmfe) {
|
|
16
18
|
jmfe.toLogin(options)
|
|
17
19
|
} else {
|
|
18
20
|
console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js')
|
|
19
21
|
}
|
|
20
22
|
if (jmfe) {
|
|
21
23
|
console.log('registerCode:', code)
|
|
22
24
|
jmfe.registerCode(code)
|
|
23
25
|
} else {
|
|
24
26
|
console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js')
|
|
25
27
|
}
|
|
26
28
|
return new Promise((resolve) => {
|
|
27
29
|
console.log('requestIsvToken:', url)
|
|
28
30
|
if (jmfe) {
|
|
29
31
|
jmfe
|
|
30
32
|
.requestIsvToken(url)
|
|
31
33
|
.then((result: any) => {
|
|
32
34
|
console.log('requestIsvToken result:' + JSON.stringify(result))
|
|
33
35
|
const { status, data, msg } = result
|
|
34
36
|
if (status === '0') {
|
|
35
37
|
resolve(data || '')
|
|
36
38
|
} else {
|
|
37
39
|
resolve('')
|
|
38
40
|
}
|
|
39
41
|
})
|
|
40
42
|
.catch((e: any) => {
|
|
41
43
|
console.log('requestIsvToken error:' + JSON.stringify(e))
|
|
42
44
|
resolve('')
|
|
43
45
|
})
|
|
44
46
|
} else {
|
|
45
47
|
console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js')
|
|
46
48
|
resolve('')
|
|
47
49
|
}
|
|
48
50
|
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import global from '../../common'
|
|
2
|
return window?.page_data?.pageChannel || ''
|
|
1
3
|
return new Promise((resolve) => {
|
|
2
4
|
const channel = getPageChannel()
|
|
3
5
|
if (
|
|
4
6
|
channel === PageChannel.TYPE_ISVDEV ||
|
|
5
7
|
channel === PageChannel.TYPE_ISV_PACK_SAMPLE
|
|
6
8
|
) {
|
|
7
9
|
getIsvToken().then((token) => {
|
|
8
10
|
console.log('isLogin token:' + token)
|
|
9
11
|
if (token) {
|
|
10
12
|
resolve(true)
|
|
11
13
|
} else {
|
|
12
14
|
resolve(false)
|
|
13
15
|
}
|
|
14
16
|
})
|
|
15
17
|
} else {
|
|
16
18
|
global.checkLoginStatus().then(res => {
|
|
17
19
|
resolve(res)
|
|
18
20
|
}).catch(() => {
|
|
19
21
|
resolve(false)
|
|
20
22
|
})
|
|
21
23
|
}
|
|
22
24
|
})
|
|
23
25
|
let token = ''
|
|
24
26
|
const result: any = await getIsvTokenInner()
|
|
25
27
|
if (!result.success) {
|
|
26
28
|
const channel = getPageChannel()
|
|
27
29
|
if (channel === PageChannel.TYPE_ISV_PACK_SAMPLE) {
|
|
28
30
|
console.log('getIsvToken打包校验中获取token失败')
|
|
29
31
|
if (window['isvTokenFailCallback']) {
|
|
30
32
|
window['isvTokenFailCallback'](result.error)
|
|
31
33
|
console.log('浏览器中调用isvTokenFailCallback结束')
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
36
|
} else {
|
|
35
37
|
token = result.data
|
|
36
38
|
}
|
|
37
39
|
return token
|
|
38
40
|
return new Promise((resolve) => {
|
|
39
41
|
fetchGateway(
|
|
40
42
|
'isvObfuscator',
|
|
41
43
|
{
|
|
42
44
|
url: window.location.href,
|
|
43
45
|
id: 'shopisv',
|
|
44
46
|
},
|
|
45
47
|
{},
|
|
46
48
|
)
|
|
47
49
|
.then((data: any) => {
|
|
48
50
|
console.log('fetchGateway isvObfuscator data:' + JSON.stringify(data))
|
|
49
51
|
if (
|
|
50
52
|
data?.statusCode == 200 &&
|
|
51
53
|
data?.data?.errcode === 0 &&
|
|
52
54
|
data?.data?.token
|
|
53
55
|
) {
|
|
54
56
|
resolve({
|
|
55
57
|
success: true,
|
|
56
58
|
data: data?.data?.token,
|
|
57
59
|
})
|
|
58
60
|
} else {
|
|
59
61
|
resolve({
|
|
60
62
|
success: false,
|
|
61
63
|
error: data,
|
|
62
64
|
})
|
|
63
65
|
}
|
|
64
66
|
})
|
|
65
67
|
.catch((error: { message: any }) => {
|
|
66
68
|
console.log('fetchGateway isvObfuscator error:' + error.message)
|
|
67
69
|
resolve({
|
|
68
70
|
success: false,
|
|
69
71
|
error,
|
|
70
72
|
})
|
|
71
73
|
})
|
|
72
74
|
})
|
|
73
75
|
const defaultParams = {
|
|
74
76
|
appid: '100',
|
|
75
77
|
returnurl: window.location.href,
|
|
76
78
|
}
|
|
77
79
|
const params = Object.assign({}, defaultParams, options)
|
|
78
80
|
params.returnurl = encodeURIComponent(params.returnurl)
|
|
79
81
|
const loginUrl = `${domain.mobileLogin}/user/login.action?${serialize(
|
|
80
82
|
params,
|
|
81
83
|
)}`
|
|
82
84
|
console.log('loginUrl:', loginUrl)
|
|
83
85
|
window.location.href = loginUrl
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import cookie from '../../utils/jm-cookie'
|
|
2
|
return new Promise((resolve) => {
|
|
1
3
|
const token = cookie.get('wq_auth_token')
|
|
2
4
|
resolve(!!token)
|
|
3
5
|
})
|
|
4
6
|
return new Promise((resolve) => {
|
|
5
7
|
const token = cookie.get('wq_auth_token') || ''
|
|
6
8
|
resolve(token)
|
|
7
9
|
})
|
|
8
10
|
return new Promise((resolve) => {
|
|
9
11
|
fetchGateway(
|
|
10
12
|
'isvObfuscator',
|
|
11
13
|
{
|
|
12
14
|
url: window.location.href,
|
|
13
15
|
id: 'shopisv',
|
|
14
16
|
},
|
|
15
17
|
{ loginType: 1, loginWQBiz: WXAPP_BIZ_KEY },
|
|
16
18
|
)
|
|
17
19
|
.then((data: any) => {
|
|
18
20
|
console.warn('fetchGateway isvObfuscator data:' + JSON.stringify(data))
|
|
19
21
|
if (
|
|
20
22
|
data?.statusCode == 200 &&
|
|
21
23
|
data?.data?.errcode === 0 &&
|
|
22
24
|
data?.data?.token
|
|
23
25
|
) {
|
|
24
26
|
resolve(data?.data?.token)
|
|
25
27
|
} else {
|
|
26
28
|
resolve('')
|
|
27
29
|
}
|
|
28
30
|
})
|
|
29
31
|
.catch((e: { message: any }) => {
|
|
30
32
|
console.warn('fetchGateway isvObfuscator error:' + e.message)
|
|
31
33
|
resolve('')
|
|
32
34
|
})
|
|
33
35
|
})
|
|
34
36
|
const returnurl = options?.returnurl || window.location.href
|
|
35
37
|
pinTokenRedirect(WXAPP_BIZ_KEY, returnurl)
|
|
36
38
|
const url = `
|
|
37
39
|
${domain.wq}/pinbind/pintokenredirect?biz=${biz}&url=${encodeURIComponent(
|
|
38
40
|
targetUrl,
|
|
39
41
|
)}`
|
|
40
42
|
console.log('pinTokenRedirect:', url)
|
|
41
43
|
window.location.href = url
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React, { useMemo } from 'react'
|
|
1
|
+
import React, { useMemo } from 'react'
|
|
@@ -1,66 +1,42 @@
|
|
|
1
|
-
.d-video-wrap{
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
.d-video-wrap {
|
|
2
|
+
// 便于静音按钮 相对视频 定位
|
|
3
|
+
position: relative;
|
|
4
|
+
}
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
.d-video-play {
|
|
7
|
+
display: block;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 100%;
|
|
11
|
+
background-color: transparent;
|
|
12
|
+
-webkit-backface-visibility: hidden;
|
|
13
|
+
-webkit-transform: translate3d(0, 0, 0);
|
|
14
|
+
object-fit: fill;
|
|
15
|
+
}
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
.d-not-muted{
|
|
44
|
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGAGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9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height: 120px;
|
|
51
|
-
background-repeat: no-repeat;
|
|
52
|
-
background-position: 50% 50%;
|
|
53
|
-
background-size: 50%;
|
|
54
|
-
top: 50%;
|
|
55
|
-
left: 50%;
|
|
56
|
-
transform: translateX(-50%) translateY(-50%);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.d-is-pause{
|
|
60
|
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAYAAAAy2w7YAAAAAXNSR0IArs4c6QAAAWhJREFUSA1j+P///0cgBoHjQGzCQCsAtgJB/AMy5wCxGNXtQ9iBwvoA5BUCMQvVLEQxHpNzDSjkRhXLMM3GKrIeKKpEkYVYjcUu+AMo3ALE3GRZiN1MvKKPgbIRJFuG10j8koeA0gZEW4jfLIKyf4EqpgOxMEELCRpFnIJ3QGU5QMyM00LizCFa1SWgSkeslhFtBGkKVwGVy6FYSJp+klR/A6quB2JOkIWMIK0oNlOf8xBoZDE9LAI7nYn6HsBq4l96WHQEaLUpAyiOaASeAM2NgvuPBpaACt82IEYtfKls0UagecpwXyAzqGTRdaA57sjmYrAptAjUsCkGYlYMg9EFyLQI1IiZB8Ti6Obh5JNh0QmgHlOcBuKSIMGi50C18UDMiMssvOJEWPQLqKYbiHnxGkRIkoBF24DyaoTMIEoeh0W3geI+RBlArCI0iz4D+RVAzEasfqLVAQ19AcSg5LoYiKWI1kiiQgCMBLnEEcfDSgAAAABJRU5ErkJggg==");
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.d-not-pause{
|
|
64
|
-
background-image: none;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
17
|
+
.d-video-mute-btn {
|
|
18
|
+
position: absolute;
|
|
19
|
+
background-repeat: no-repeat;
|
|
20
|
+
background-position: center center;
|
|
21
|
+
background-size: 100%;
|
|
22
|
+
z-index: 20;
|
|
23
|
+
transform: translateZ(20px);
|
|
24
|
+
width: 24px;
|
|
25
|
+
height: 24px;
|
|
26
|
+
}
|
|
27
|
+
.d-mute-btn-topLeft {
|
|
28
|
+
left: 20px;
|
|
29
|
+
top: 20px;
|
|
30
|
+
}
|
|
31
|
+
.d-mute-btn-topRight {
|
|
32
|
+
right: 20px;
|
|
33
|
+
top: 20px;
|
|
34
|
+
}
|
|
35
|
+
.d-mute-btn-bottomLeft {
|
|
36
|
+
left: 20px;
|
|
37
|
+
bottom: 20px;
|
|
38
|
+
}
|
|
39
|
+
.d-mute-btn-bottomRight {
|
|
40
|
+
right: 20px;
|
|
41
|
+
bottom: 20px;
|
|
42
|
+
}
|