@x-edu/live-player 0.0.26 → 0.0.28

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/src/demo/List.jsx CHANGED
@@ -27,7 +27,7 @@ export default function List() {
27
27
  const [refreshPage] = useState('0')
28
28
 
29
29
  const handleSubscribe = (data) => {
30
- console.log(data, 444444)
30
+ console.log(data)
31
31
  }
32
32
 
33
33
  useEffect(() => {
@@ -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({...data, is_subscribe:true})
79
+ onSubscribe({
80
+ ...data,
81
+ is_subscribe: true
82
+ })
80
83
  } catch (error) {
81
- onSubscribe({...data, is_subscribe:false})
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_&#231;&#130;&#185;&#232;&#181;&#158;_fill">
3
+ <g id="&#232;&#183;&#175;&#229;&#190;&#132;">
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_&#230;&#181;&#143;&#232;&#167;&#136;&#233;&#135;&#143;_fill">
3
+ <g id="&#232;&#183;&#175;&#229;&#190;&#132;">
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/dianzan.svg'
13
- import yiYue from './img/yiguankan.svg'
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
 
@@ -39,7 +39,7 @@ export default function ListItem({
39
39
  } = data
40
40
  const [liveExt, setLiveExt] = useState({})
41
41
  const [isSubscribe, setIsSubscribe] = useState(() => {
42
- if (status===0) {
42
+ if (status === 0) {
43
43
  // 开播前15分钟之外
44
44
  const subscriptionItem = find(subscription, {
45
45
  live_id: liveId
@@ -104,7 +104,7 @@ export default function ListItem({
104
104
  </div>
105
105
  </div>
106
106
  </div>
107
-
107
+
108
108
  <Action
109
109
  data={data}
110
110
  subscription={subscription}
@@ -115,7 +115,7 @@ export default function ListItem({
115
115
  setIsSubscribe={setIsSubscribe}
116
116
  status={status}
117
117
  />
118
-
118
+
119
119
  </div>
120
120
  </div>
121
121
  <div className={style.left}>