@x-edu/live-player 0.0.27 → 0.0.29
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/.gem-mine +11 -11
- package/dist/XEduLivePlayer.common.js +19417 -7313
- package/dist/XEduLivePlayerPre.common.js +19447 -7332
- package/package.json +2 -1
- package/public/JsBridge.js +1602 -1602
- package/src/demo/List.jsx +1 -1
- package/src/list/ListItem/Action/index.jsx +9 -3
- package/src/list/ListItem/img/like-fill.svg +8 -0
- package/src/list/ListItem/img/view-fill.svg +8 -0
- package/src/list/ListItem/index.jsx +8 -7
- package/src/list/ListItem/index.module.less +6 -0
- package/src/list/index.jsx +10 -5
package/src/demo/List.jsx
CHANGED
|
@@ -63,7 +63,7 @@ export default function Action({
|
|
|
63
63
|
handleLogin(data)
|
|
64
64
|
return
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
|
|
67
67
|
await openLiveSubscribe({
|
|
68
68
|
liveId
|
|
69
69
|
})
|
|
@@ -76,9 +76,15 @@ export default function Action({
|
|
|
76
76
|
} else {
|
|
77
77
|
setCurAction(4)
|
|
78
78
|
}
|
|
79
|
-
onSubscribe({
|
|
79
|
+
onSubscribe({
|
|
80
|
+
...data,
|
|
81
|
+
is_subscribe: true
|
|
82
|
+
})
|
|
80
83
|
} catch (error) {
|
|
81
|
-
onSubscribe({
|
|
84
|
+
onSubscribe({
|
|
85
|
+
...data,
|
|
86
|
+
is_subscribe: false
|
|
87
|
+
})
|
|
82
88
|
if (error?.response?.data?.message === '直播开始前15分钟无法预约') {
|
|
83
89
|
setCurAction(3)
|
|
84
90
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="icon_planar/web_icon_点赞_fill">
|
|
3
|
+
<g id="路径">
|
|
4
|
+
<path d="M9.02622 2.08907L5.14744 5.96785C5.03377 6.08149 4.96989 6.23561 4.96986 6.39634V13.4182C4.96986 13.7529 5.2412 14.0242 5.57592 14.0242H12.1396C12.3852 14.0243 12.6066 13.8762 12.7002 13.6491L14.5759 9.09452C14.6361 8.948 14.667 8.7911 14.6668 8.6327V7.35755C14.6668 6.68812 14.1241 6.14543 13.4547 6.14543H9.57592L10.2747 3.39998C10.3654 3.04423 10.2332 2.66887 9.93956 2.44846L9.42259 2.06058C9.30181 1.97003 9.13281 1.98218 9.02622 2.08907Z" fill="#CCCCCC"/>
|
|
5
|
+
<path d="M3.75774 6.75149H1.93956C1.60484 6.75149 1.3335 7.02283 1.3335 7.35755V13.4182C1.3335 13.7529 1.60484 14.0242 1.93956 14.0242H3.75774V6.75149Z" fill="#CCCCCC"/>
|
|
6
|
+
</g>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="icon_planar/web_icon_浏览量_fill">
|
|
3
|
+
<g id="路径">
|
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.0002 13C5.55571 13 3.37488 11.4573 1.46255 8.44367C1.29048 8.17291 1.29048 7.82709 1.46255 7.55633C3.37488 4.54267 5.55571 3 8.0002 3C10.4447 3 12.6255 4.54267 14.5379 7.55633C14.7099 7.82709 14.7099 8.17291 14.5379 8.44367C12.6255 11.4573 10.4447 13 8.0002 13ZM5.33352 8C5.33352 9.47276 6.52743 10.6667 8.00018 10.6667C9.47294 10.6667 10.6669 9.47276 10.6669 8C10.6669 6.52724 9.47294 5.33333 8.00018 5.33333C6.52743 5.33333 5.33352 6.52724 5.33352 8Z" fill="#CCCCCC"/>
|
|
5
|
+
<path d="M9.34553 8C9.34553 8.73633 8.7432 9.33333 8.0002 9.33333C7.2572 9.33333 6.65487 8.73633 6.65487 8C6.65487 7.26367 7.2572 6.66667 8.0002 6.66667C8.7432 6.66667 9.34553 7.26367 9.34553 8Z" fill="#CCCCCC"/>
|
|
6
|
+
</g>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
2
|
import dayjs from 'dayjs'
|
|
3
3
|
import classNames from 'classnames'
|
|
4
|
+
import { find } from 'lodash'
|
|
4
5
|
import Avatar from '@/component/Avatar'
|
|
5
6
|
import Icon from '@/component/Icon'
|
|
6
7
|
import { formatLikesCount, formatUVCount } from '@/util/liveCountUtil'
|
|
7
8
|
import { getResourceLikes } from '@/service/like'
|
|
8
|
-
import { find } from 'lodash'
|
|
9
9
|
import Action from './Action'
|
|
10
10
|
import DefaultCover from './img/live.png'
|
|
11
11
|
import PlayImg from './img/play.svg'
|
|
12
|
-
import dianZan from './img/
|
|
13
|
-
import yiYue from './img/
|
|
12
|
+
import dianZan from './img/like-fill.svg'
|
|
13
|
+
import yiYue from './img/view-fill.svg'
|
|
14
14
|
import videoSvg from './img/video.svg'
|
|
15
15
|
import style from './index.module.less'
|
|
16
16
|
|
|
@@ -23,6 +23,7 @@ const TagName = {
|
|
|
23
23
|
|
|
24
24
|
export default function ListItem({
|
|
25
25
|
data,
|
|
26
|
+
themeName,
|
|
26
27
|
subscription,
|
|
27
28
|
onDetailClick,
|
|
28
29
|
handleLogin,
|
|
@@ -39,7 +40,7 @@ export default function ListItem({
|
|
|
39
40
|
} = data
|
|
40
41
|
const [liveExt, setLiveExt] = useState({})
|
|
41
42
|
const [isSubscribe, setIsSubscribe] = useState(() => {
|
|
42
|
-
if (status===0) {
|
|
43
|
+
if (status === 0) {
|
|
43
44
|
// 开播前15分钟之外
|
|
44
45
|
const subscriptionItem = find(subscription, {
|
|
45
46
|
live_id: liveId
|
|
@@ -76,7 +77,7 @@ export default function ListItem({
|
|
|
76
77
|
|
|
77
78
|
return (
|
|
78
79
|
<div
|
|
79
|
-
className={style.container}
|
|
80
|
+
className={classNames(style.container, themeName)}
|
|
80
81
|
onClick={handleDetailClick}
|
|
81
82
|
>
|
|
82
83
|
<div className={style.right}>
|
|
@@ -104,7 +105,7 @@ export default function ListItem({
|
|
|
104
105
|
</div>
|
|
105
106
|
</div>
|
|
106
107
|
</div>
|
|
107
|
-
|
|
108
|
+
|
|
108
109
|
<Action
|
|
109
110
|
data={data}
|
|
110
111
|
subscription={subscription}
|
|
@@ -115,7 +116,7 @@ export default function ListItem({
|
|
|
115
116
|
setIsSubscribe={setIsSubscribe}
|
|
116
117
|
status={status}
|
|
117
118
|
/>
|
|
118
|
-
|
|
119
|
+
|
|
119
120
|
</div>
|
|
120
121
|
</div>
|
|
121
122
|
<div className={style.left}>
|
package/src/list/index.jsx
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
|
+
import { getXEduThemeName } from '@x-edu/theme'
|
|
2
3
|
import classNames from 'classnames'
|
|
3
4
|
import { Tabs } from 'fish'
|
|
4
5
|
import { OpenLiveSearchFront, getSubscription } from '@/service/live'
|
|
5
6
|
import { setUC } from '@/util/auth/func'
|
|
6
7
|
import config from '@/config/env'
|
|
7
8
|
import Loading from '@/component/status/Loading'
|
|
8
|
-
import Empty from './Empty'
|
|
9
9
|
import Pagination from '@/component/Pagination'
|
|
10
|
+
import Empty from './Empty'
|
|
10
11
|
import ListItem from './ListItem'
|
|
11
12
|
import style from './index.module.less'
|
|
12
13
|
|
|
@@ -77,7 +78,7 @@ export default function PublicLiveList({
|
|
|
77
78
|
offset: (page - 1) * PageSize,
|
|
78
79
|
limit: PageSize
|
|
79
80
|
})
|
|
80
|
-
|
|
81
|
+
|
|
81
82
|
const { items, count } = data
|
|
82
83
|
if (uc) {
|
|
83
84
|
const curIsLogin = await uc.isLogin()
|
|
@@ -169,16 +170,19 @@ export default function PublicLiveList({
|
|
|
169
170
|
// }
|
|
170
171
|
// ])
|
|
171
172
|
// setTotal(1)
|
|
172
|
-
// setLoading(false)
|
|
173
|
+
// setLoading(false)
|
|
173
174
|
}
|
|
174
175
|
getList()
|
|
175
|
-
}, [page, status,refreshPage])
|
|
176
|
+
}, [page, status, refreshPage])
|
|
177
|
+
|
|
178
|
+
const themeName = getXEduThemeName()
|
|
176
179
|
|
|
177
180
|
return (
|
|
178
181
|
<div
|
|
179
182
|
className={classNames(
|
|
180
183
|
containerClassName,
|
|
181
|
-
style.container
|
|
184
|
+
style.container,
|
|
185
|
+
themeName
|
|
182
186
|
)}
|
|
183
187
|
>
|
|
184
188
|
<Tabs
|
|
@@ -201,6 +205,7 @@ export default function PublicLiveList({
|
|
|
201
205
|
<>
|
|
202
206
|
{list.map((listItem) => (
|
|
203
207
|
<ListItem
|
|
208
|
+
themeName={themeName}
|
|
204
209
|
data={listItem}
|
|
205
210
|
key={listItem.live_id}
|
|
206
211
|
subscription={subscription}
|