courseSection.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  1. <template>
  2. <view style="display: flex;justify-content: space-between;align-items: center;" @click="getVideo">
  3. <view style="display: flex;justify-content: space-between;margin: 20rpx 0;width: 100%;">
  4. <view style="display: flex;align-items: center;flex:1;">
  5. <view class="tag tagColor1" v-if="menuItem.sectionType==1">录播</view>
  6. <view class="tag tagColor2" v-if="menuItem.sectionType==2">直播</view>
  7. <view class="tag tagColor3" v-if="menuItem.sectionType==3">回放</view>
  8. <view class="t_content">
  9. <view v-if="menuItem.sectionType==1" :class="playSectionId==newId && playNextId==playId?'color1':''">{{menuItem.name || ''}}</view>
  10. <view v-if="menuItem.sectionType==2" :class="playSectionId==newId && playNextId==playId?'color2':''">{{menuItem.name || ''}}</view>
  11. <view v-if="menuItem.sectionType==3" :class="playSectionId==newId && playNextId==playId?'color3':''">{{menuItem.name || ''}}</view>
  12. <view style="font-size: 20rpx;color: #FF3B30;" v-if="menuItem.sectionType==2 && menuItem.liveStartTime">
  13. <view v-if="menuItem.liveStartTime>nowTime || !isBuy">
  14. <text>{{$method.timestampToTime(menuItem.liveStartTime, isDay =false)}}</text>-
  15. <text>{{$method.timestampToTime(menuItem.liveEndTime, isDay =false)}}</text>
  16. </view>
  17. <template v-if="isLast()">
  18. <view v-if="liveLast.watchStatus == 'live'">
  19. <text>直播中</text>
  20. </view>
  21. <view v-if="liveLast.watchStatus == 'end'">
  22. <text>当前直播回放视频请稍后再查看</text>
  23. </view>
  24. </template>
  25. <!-- <view v-if="menuItem.liveStartTime<=nowTime&&menuItem.liveEndTime>nowTime">
  26. <text>直播中</text>
  27. </view>
  28. <view v-if="menuItem.liveEndTime<nowTime">
  29. <text>回放</text>
  30. </view> -->
  31. </view>
  32. <view style="font-size: 20rpx;color: #FF3B30;" v-if="menuItem.sectionType == 3">
  33. <view v-if="!menuItem.recordingUrl">
  34. <text>当前直播回放视频请稍后再查看</text>
  35. </view>
  36. <view v-else>
  37. 回放中
  38. </view>
  39. </view>
  40. </view>
  41. <view v-if="menuItem.sectionType==null">{{menuItem.name || ''}}</view>
  42. </view>
  43. <view style="font-size: 20rpx;color: #FF3B30;" v-if="menuItem.liveStartTime && menuItem.sectionType != 3 && isBuy">
  44. <template v-if="!isLast() && !isLive">
  45. <view class="tagWillPlay" v-if="menuItem.liveStartTime>nowTime">
  46. <text>待开播</text>
  47. </view>
  48. <view class="tagPlaying" v-if="menuItem.liveStartTime<=nowTime&&menuItem.liveEndTime>nowTime">
  49. <text>直播中</text>
  50. </view>
  51. <view class="tagPlayed" v-if="menuItem.liveEndTime<nowTime">
  52. <text>已结束</text>
  53. </view>
  54. </template>
  55. </view>
  56. <!-- 直播课程没有学习状态 -->
  57. <template v-if="!isLive">
  58. <view v-if="(isRebuild||menuItem.rebuild>0)" class="tagRe">待重修</view>
  59. <view v-else>
  60. <view v-if="menuItem.learning==1" class="tagGreen">已看完</view>
  61. </view>
  62. </template>
  63. <view v-if="checkTest()">习题</view>
  64. </view>
  65. <view v-if="menuItem.tryListen&&!isBuy" class="tryBox">
  66. 试看
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. import { mapGetters } from 'vuex';
  72. import eventHub from '@/common/eventHub.js'
  73. import {WEBVIEW_URL} from '@/common/request.js'
  74. import { some } from '../../pages3/static/polyv-sdk/common/chat/emotionList';
  75. export default {
  76. name: 'courseSection',
  77. props: {
  78. isLive:false, //是否是直播课
  79. orderGoodsId:{
  80. default:0
  81. },
  82. preItem:{
  83. default:undefined,
  84. },
  85. learningOrder:{ //是否设置学习顺序 1 章节顺序 0不设置 2从头学到尾顺序
  86. type:Number,
  87. default:0
  88. },
  89. courseId: {
  90. type: Number,
  91. default: 0
  92. },
  93. goodsId: {
  94. type: Number,
  95. default: 0
  96. },
  97. menuItem: {
  98. type: Object,
  99. default: {}
  100. },
  101. isBuy: {
  102. type: Boolean,
  103. default: false
  104. },
  105. levelId: {
  106. type: String,
  107. default: ""
  108. },
  109. isRebuild: {
  110. type: Boolean,
  111. default: false
  112. },
  113. gradeId: {
  114. type: Number,
  115. default: 0
  116. },
  117. nextMenuItem: {
  118. type: Object,
  119. default: {}
  120. },
  121. sectionMaxNum:{
  122. default:undefined,
  123. },
  124. // 章->所有节试卷列表
  125. sectionExam: {
  126. type: Array,
  127. default: () => [],
  128. },
  129. // 区分是模块试卷还是章试卷,3是模块试卷
  130. testType: {
  131. type: Number,
  132. default: 0,
  133. }
  134. },
  135. watch:{
  136. menuItem(val) {
  137. console.log(val,'val')
  138. }
  139. },
  140. data() {
  141. return {
  142. nowTime:0,
  143. newId:0,
  144. playId:'',
  145. clickLock:false, //点击锁,防止连续点击多次
  146. moduleSectionExam: [], // 模块下的所有节试卷列表
  147. };
  148. },
  149. onLoad() {
  150. },
  151. created() {
  152. },
  153. mounted() {
  154. console.log('testType', this.testType)
  155. this.nowTime = Number(new Date().getTime()/1000).toFixed(0)
  156. this.newId= this.menuItem.sectionId>0?this.menuItem.sectionId:this.menuItem.menuId
  157. // console.log(this.newId,'this.newId', this.playNextId)
  158. // console.log(this.playSectionId,'this.playSectionId')
  159. // console.log(this.isRebuild)
  160. // console.log(this.nextMenuItem,'nextMenuItem')
  161. // console.log(this.menuItem,'this.menuItem=======>',this.menuItem.recordingUrl, this.nowTime)
  162. let moduleId = this.menuItem.moduleId || 0;
  163. let chapterId = this.menuItem.chapterId || 0;
  164. let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
  165. let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}${this.isRebuild?'isRebuild':''}`;
  166. this.playId = playNextId;
  167. console.log('this.playId:', this.playId)
  168. uni.$off('playNext'+playNextId) //绑定前先移除之前的事件
  169. uni.$once('playNext'+playNextId, (data) => {
  170. //到时会触发每个节的监听事件,只允许当前节的接收
  171. let self = this
  172. if(this.nextMenuItem.recordingUrl&&this.isRebuild&&(this.newId==this.playSectionId) && data.fromRebuild){ // fromRebuild 来自重修目录的点击才弹出播放下一节
  173. //重修存在下一节
  174. uni.showModal({
  175. title: '提示',
  176. content: '是否播放下一节',
  177. success: function (res) {
  178. if (res.confirm) {
  179. let nextId= self.nextMenuItem.sectionId>0?self.nextMenuItem.sectionId:self.nextMenuItem.menuId
  180. //设置播放的节ID
  181. self.$store.commit('setPlaySectionId', {playSectionId :nextId});
  182. self.$store.commit('setPlayVID', {playVID :self.nextMenuItem.recordingUrl});
  183. let ids = self.levelId.split('-');
  184. ids[2] = nextId
  185. uni.$emit('levelId', ids.join('-'))
  186. uni.$emit('getSection', self.nextMenuItem)
  187. self.$emit('playEnd',{isRebuild:self.isRebuild})
  188. // uni.$off('playend')
  189. // uni.$on('playend',res => {
  190. // console.log('playend2')
  191. // this.$emit('playEnd',{isRebuild:this.isRebuild})
  192. // })
  193. } else {
  194. let nextId= self.nextMenuItem.sectionId>0?self.nextMenuItem.sectionId:self.nextMenuItem.menuId
  195. //设置播放的节ID
  196. self.$store.commit('setPlaySectionId', {playSectionId :nextId});
  197. self.$store.commit('setPlayVID', {playVID :self.nextMenuItem.recordingUrl});
  198. let ids = self.levelId.split('-');
  199. ids[2] = nextId
  200. self.$emit('playEnd',{isRebuild:self.isRebuild})
  201. }
  202. }
  203. });
  204. } else {
  205. this.$emit('playEnd',{isRebuild:this.isRebuild})
  206. }
  207. });
  208. },
  209. methods: {
  210. isLast() {
  211. // console.log(this.liveLast,'this.liveLast')
  212. if(this.liveLast) {
  213. let sectionASame = this.liveLast.sectionId == (this.menuItem.sectionId || this.menuItem.menuId)
  214. let chapterSame = this.liveLast.chapterId == (this.menuItem.chapterId || 0)
  215. let moduleSame = this.liveLast.moduleId == (this.menuItem.moduleId || 0);
  216. console.log(sectionASame && chapterSame && moduleSame,'sectionASame && chapterSame && moduleSame')
  217. return sectionASame && chapterSame && moduleSame
  218. } else {
  219. return false;
  220. }
  221. },
  222. checkTest() {
  223. console.log(this.menuItem)
  224. if (!this.sectionExam.length) {
  225. return false
  226. }
  227. if (this.sectionExam.some((e) => e.sectionId == this.menuItem.sectionId)) {
  228. return true
  229. } else {
  230. return false
  231. }
  232. },
  233. ChapterExam() {
  234. let item = this.sectionExam.find((e) => e.sectionId == this.menuItem.sectionId)
  235. console.log('item', item)
  236. },
  237. ModuleExam() {
  238. },
  239. studyRecordMenuAllList() {
  240. return new Promise(resolve => {
  241. this.$api.studyRecordMenuAllList({
  242. courseId:this.courseId,
  243. gradeId:this.gradeId,
  244. goodsId:this.goodsId
  245. }).then(res => {
  246. if(res.data.code == 200) {
  247. resolve(res.data.data)
  248. }
  249. })
  250. })
  251. },
  252. gradeCheckGoodsStudy() {
  253. let moduleId = this.menuItem.moduleId || 0;
  254. let chapterId = this.menuItem.chapterId || 0;
  255. let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
  256. return new Promise(resolve => {
  257. this.$api.gradeCheckGoodsStudy({
  258. goodsId:this.goodsId,
  259. gradeId:this.gradeId,
  260. moduleId:this.menuItem.moduleId || 0,
  261. chapterId:this.menuItem.chapterId || 0,
  262. sectionId:this.menuItem.sectionId || this.menuItem.menuId
  263. }).then( res => {
  264. resolve(res.data.data)
  265. })
  266. })
  267. },
  268. goodsTodayStudySectionNum() {
  269. return new Promise(resolve => {
  270. this.$api.goodsTodayStudySectionNum({goodsId:this.goodsId,gradeId:this.gradeId}).then(res => {
  271. if(res.data.code == 200) {
  272. resolve(res.data.data)
  273. }
  274. })
  275. })
  276. },
  277. async getVideo(){
  278. console.log('---点击节', )
  279. this.$emit('togoBack', 1)
  280. return
  281. if(this.clickLock) {
  282. return;
  283. }
  284. this.clickLock = true;
  285. if(this.learningOrder == 2 && !this.menuItem.isRebuild && !this.isLive) { //要按从头到尾顺序学习, 且不是重修课程
  286. if(this.preItem) {
  287. let rows = await this.studyRecordMenuAllList();
  288. let newRows = [];
  289. for(let i = 0; i < rows.length; i++ ) {
  290. let moduleTrue = rows[i].moduleId == this.menuItem.moduleId || rows[i].moduleId == 0
  291. let chapterTrue = rows[i].chapterId == this.menuItem.chapterId || rows[i].chapterId == 0;
  292. let sectionTrue = (rows[i].sectionId == this.menuItem.sectionId) || (rows[i].sectionId == this.menuItem.menuId);
  293. if(moduleTrue && chapterTrue && sectionTrue) {
  294. break;
  295. } else {
  296. if(rows[i].sectionType != 2) {
  297. newRows.push(rows[i])
  298. }
  299. }
  300. }
  301. let isAllLearn = newRows.every(item => {
  302. return item.studyStatus == 1;
  303. })
  304. if(isAllLearn) {
  305. this.playVideo();
  306. } else {
  307. uni.showToast({
  308. icon:'none',
  309. title:'请按顺序学习视频课程'
  310. })
  311. }
  312. // if(this.preItem.menuType == 3) { //上一个是节
  313. // if(this.preItem.learning == 1) { //上一节学完
  314. // this.playVideo();
  315. // } else {
  316. // uni.showToast({
  317. // icon:'none',
  318. // title:'请按顺序学习视频课程'
  319. // })
  320. // }
  321. // } else if(this.preItem.menuType == 2) { //上一个是章
  322. // this.$api.reSectionList({chapterId: this.preItem.menuId || this.preItem.chapterId,gradeId:this.gradeId,courseId:this.courseId,moduleId:this.preItem.moduleId || 0}).then(res => {
  323. // if(res.data.code==200){
  324. // let lastItem = res.data.data[res.data.data.length -1];
  325. // if(lastItem.learning == 1) {
  326. // this.playVideo();
  327. // } else {
  328. // uni.showToast({
  329. // icon:'none',
  330. // title:'请按顺序学习视频课程'
  331. // })
  332. // }
  333. // }
  334. // });
  335. // } else if(this.preItem.menuType == 1) { //上一个是模块
  336. // this.$api.reChapterList({moduleId:this.preItem.menuId,gradeId:this.gradeId,courseId:this.courseId}).then(res => {
  337. // if(res.data.code==200){
  338. // let lastChapterItem = res.data.data[res.data.data.length -1];
  339. // this.$api.reSectionList({chapterId:lastChapterItem.chapterId,gradeId:this.gradeId,courseId:this.courseId,moduleId:this.menuItem.menuId || this.menuItem.moduleId}).then(res => {
  340. // if(res.data.code==200){
  341. // let lastSectionItem = res.data.data[res.data.data.length -1];
  342. // if(lastSectionItem.learning == 1) {
  343. // this.playVideo();
  344. // } else {
  345. // uni.showToast({
  346. // icon:'none',
  347. // title:'请按顺序学习视频课程'
  348. // })
  349. // }
  350. // }
  351. // });
  352. // }
  353. // });
  354. // }
  355. } else { //第一章第一节
  356. this.playVideo();
  357. }
  358. } else {
  359. this.playVideo();
  360. }
  361. setTimeout(() => {
  362. this.clickLock = false;
  363. },3000)
  364. },
  365. studyRecordGetChannelBasicInfo(channelId) {
  366. return new Promise((resolve) => {
  367. this.$api
  368. .studyRecordGetChannelBasicInfo({
  369. channelId,
  370. })
  371. .then((res) => {
  372. resolve(res.data.data);
  373. });
  374. });
  375. },
  376. async playVideo() {
  377. // console.log('直播的课程:',this.menuItem,this.menuItem.recordingUrl)
  378. if(this.menuItem.sectionType==1 || this.menuItem.sectionType == 3){
  379. //1录播 3回放
  380. if(!this.isBuy){
  381. //非购买
  382. if(!this.menuItem.tryListen){
  383. //不允许试听
  384. this.clickLock = false;
  385. return
  386. } else {
  387. this.$store.commit('setPlaySectionId', {playSectionId :this.newId});
  388. this.$store.commit('setPlayVID', {playVID :this.menuItem.recordingUrl});
  389. this.menuItem.courseId = this.courseId;
  390. uni.$emit('getSection', this.menuItem)
  391. return;
  392. }
  393. }
  394. let learnNum = await this.goodsTodayStudySectionNum()
  395. let hasLearn = await this.gradeCheckGoodsStudy();
  396. // console.log(this.sectionMaxNum,'this.sectionMaxNum')
  397. // console.log(learnNum,'learnNum')
  398. if(this.sectionMaxNum > 0) {
  399. if(learnNum >= this.sectionMaxNum && !hasLearn) {
  400. uni.showToast({
  401. icon:'none',
  402. title:`每天最多学习${this.sectionMaxNum}节`
  403. })
  404. this.clickLock = false;
  405. return;
  406. }
  407. }
  408. if(!this.menuItem.recordingUrl){
  409. uni.showToast({
  410. title: '暂无播放地址数据',
  411. icon: 'none'
  412. });
  413. this.clickLock = false;
  414. return;
  415. }
  416. /* if(this.playSectionId==this.newId){
  417. //切换为同一节
  418. return
  419. } */
  420. // 回放
  421. if (this.menuItem.sectionType == 3) {
  422. // return
  423. let moduleId = this.menuItem.moduleId || 0;
  424. let chapterId = this.menuItem.chapterId || 0;
  425. let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
  426. let uuid = new Date().valueOf() + ""
  427. // buyCourse 是否购买课程:1是 0否,type=vod是回放
  428. let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+
  429. '&channelId='+this.menuItem.liveUrl+'&gradeId='+this.gradeId+'&courseId='+this.courseId+'&goodsId='+this.goodsId+'&orderGoodsId='+this.orderGoodsId+
  430. '&sectionId='+sectionId+'&chapterId='+chapterId+'&moduleId='+moduleId+'&buyCourse=1'+'&ident='+uuid+'&sectionType=3'+'&vid='+this.menuItem.recordingUrl)
  431. uni.navigateTo({
  432. url:`../../pages/webview/index?url=`+encode
  433. })
  434. return
  435. }
  436. if(this.playSectionId>0){
  437. //切换视频
  438. let oldSectionId = this.playSectionId
  439. uni.$emit('changeSection', oldSectionId)
  440. }
  441. //设置播放的节ID
  442. this.$store.commit('setPlaySectionId', {playSectionId :this.newId});
  443. this.$store.commit('setPlayVID', {playVID :this.menuItem.recordingUrl});
  444. this.$store.commit('updatePlayNextId',this.playId)
  445. uni.$emit('levelId', this.levelId)
  446. uni.$emit('getSection', this.menuItem)
  447. uni.$emit('isRebuild',this.isRebuild)
  448. // console.log(this.menuItem,'menuItem')
  449. // uni.$off('playend')
  450. // uni.$on('playend',res => {
  451. // console.log('playend2')
  452. // this.$emit('playEnd',{isRebuild:this.isRebuild})
  453. // })
  454. }
  455. if(this.menuItem.sectionType==2){
  456. //直播
  457. if(!this.isBuy){
  458. //非购买
  459. this.clickLock = false;
  460. return
  461. }
  462. let learnNum = await this.goodsTodayStudySectionNum()
  463. let hasLearn = await this.gradeCheckGoodsStudy();
  464. console.log(this.sectionMaxNum,'this.sectionMaxNum')
  465. console.log(learnNum,'learnNum')
  466. if(this.sectionMaxNum > 0 && !this.isLive) {
  467. if(learnNum >= this.sectionMaxNum && !hasLearn) {
  468. uni.showToast({
  469. icon:'none',
  470. title:`每天最多学习${this.sectionMaxNum}节`
  471. })
  472. this.clickLock = false;
  473. return;
  474. }
  475. }
  476. if(!this.menuItem.liveUrl){
  477. uni.showToast({
  478. title: '暂无直播地址数据',
  479. icon: 'error'
  480. });
  481. return;
  482. }
  483. let data = await this.studyRecordGetChannelBasicInfo(this.menuItem.liveUrl);
  484. let nowTime = +this.$method.timest();
  485. if (this.menuItem.liveStartTime > nowTime) {
  486. if (data.watchStatus == "end" || data.watchStatus == "playback") {
  487. this.clickLock = false;
  488. uni.showToast({
  489. title: '直播未开始',
  490. icon: 'none'
  491. });
  492. return;
  493. }
  494. } else if (
  495. this.menuItem.liveStartTime < nowTime &&
  496. this.menuItem.liveEndTime > nowTime
  497. ) {
  498. if (data.watchStatus == "end" || data.watchStatus == "playback") {
  499. this.clickLock = false;
  500. uni.showToast({
  501. title: '暂无直播',
  502. icon: 'none'
  503. });
  504. return;
  505. }
  506. } else if (this.menuItem.liveEndTime < nowTime) {
  507. if (!data) {
  508. uni.showToast({
  509. title: '直播已结束',
  510. icon: 'none'
  511. });
  512. return;
  513. }
  514. if (data.watchStatus == "end" || data.watchStatus == "playback") {
  515. this.clickLock = false;
  516. uni.showToast({
  517. title: '直播已结束',
  518. icon: 'none'
  519. });
  520. return;
  521. }
  522. }
  523. // if (data.watchStatus == "end" || data.watchStatus == "playback") {
  524. // this.clickLock = false;
  525. // uni.showToast({
  526. // title: '直播已结束',
  527. // icon: 'none'
  528. // });
  529. // return;
  530. // }
  531. // if (data.watchStatus == "waiting") {
  532. // this.clickLock = false;
  533. // uni.showToast({
  534. // title: '直播未开始',
  535. // icon: 'none'
  536. // });
  537. // return;
  538. // }
  539. // if(this.playSectionId==this.newId){
  540. // //切换为同一频道
  541. // this.clickLock = false;
  542. // return
  543. // }
  544. let moduleId = this.menuItem.moduleId || 0;
  545. let chapterId = this.menuItem.chapterId || 0;
  546. let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
  547. let uuid = new Date().valueOf() + ""
  548. // buyCourse 是否购买课程:1是 0否
  549. let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+
  550. '&channelId='+this.menuItem.liveUrl+'&gradeId='+this.gradeId+'&courseId='+this.courseId+'&goodsId='+this.goodsId+'&orderGoodsId='+this.orderGoodsId+
  551. '&sectionId='+sectionId+'&chapterId='+chapterId+'&moduleId='+moduleId+'&buyCourse=1'+'&ident='+uuid+'&sectionType=2')
  552. uni.navigateTo({
  553. url:`../../pages/webview/index?url=`+encode
  554. })
  555. return;
  556. //设置播放的节ID
  557. // this.$store.commit('setPlaySectionId', {playSectionId :this.newId});
  558. // this.$store.commit('setPlayChannelId', {playChannelId :this.menuItem.liveUrl});
  559. // this.$store.commit('updatePlayNextId',this.playId)
  560. // uni.$emit('levelId', this.levelId)
  561. // uni.$emit('getChannel', this.menuItem)
  562. // uni.$emit('isRebuild',this.isRebuild)
  563. // console.log(this.menuItem,'menuItem')
  564. // uni.$off('playend')
  565. // uni.$on('playend',res => {
  566. // console.log('playend1')
  567. // this.$emit('playEnd',{isRebuild:this.isRebuild})
  568. // })
  569. }
  570. }
  571. },
  572. computed: { ...mapGetters(['playSectionId','playChannelId','playVID','playNextId','userInfo','liveLast']) }
  573. };
  574. </script>
  575. <style scoped lang="scss">
  576. .tagGreen{
  577. width: 80rpx;
  578. height: 28rpx;
  579. background: #34C759;
  580. border-radius: 8rpx;
  581. font-size: 20rpx;
  582. color: #FFFFFF;
  583. text-align: center;
  584. }
  585. .tagWillPlay{
  586. width: 80rpx;
  587. height: 28rpx;
  588. background: #EBF4FF;
  589. border-radius: 8rpx;
  590. font-size: 20rpx;
  591. color: #007AFF;
  592. text-align: center;
  593. }
  594. .tagPlaying{
  595. width: 80rpx;
  596. height: 28rpx;
  597. background: #FFF7EB;
  598. border-radius: 8rpx;
  599. font-size: 20rpx;
  600. color: #FF9500;
  601. text-align: center;
  602. }
  603. .tagPlayed{
  604. width: 80rpx;
  605. height: 28rpx;
  606. background: #EEEEEE;
  607. border-radius: 8rpx;
  608. font-size: 20rpx;
  609. color: #666666;
  610. text-align: center;
  611. }
  612. .tagRe{
  613. width: 80rpx;
  614. height: 28rpx;
  615. background: #FF3B30;
  616. border-radius: 8rpx;
  617. font-size: 20rpx;
  618. color: #FFFFFF;
  619. text-align: center;
  620. }
  621. .tryBox{
  622. width: 103rpx;
  623. height: 48rpx;
  624. background: #fff;
  625. border-radius: 24rpx;
  626. color: #3577E8;
  627. font-size: 24rpx;
  628. line-height: 48rpx;
  629. text-align: center;
  630. border: 1rpx solid #3577E8;
  631. }
  632. .icon_up{
  633. width: 24rpx;
  634. height: 24rpx;
  635. }
  636. .t_content3{
  637. color: #007AFF;
  638. }
  639. .t_content2{
  640. color: #007AFF;
  641. }
  642. .t_content1{
  643. color: #007AFF;
  644. }
  645. .t_content{
  646. font-size: 30rpx;
  647. margin-left: 10rpx;
  648. color: #666666;
  649. flex:1;
  650. }
  651. .tagColor3{
  652. border: 2rpx solid #FF9500;
  653. color: #FF9500;
  654. }
  655. .tagColor2{
  656. border: 2rpx solid #FF3B30;
  657. color: #FF3B30;
  658. }
  659. .tagColor1{
  660. border: 2rpx solid #007AFF;
  661. color: #007AFF;
  662. }
  663. .color3{
  664. color: #FF9500;
  665. }
  666. .color2{
  667. color: #FF3B30;
  668. }
  669. .color1{
  670. color: #007AFF;
  671. }
  672. .tag{
  673. border-radius: 8rpx;
  674. font-size: 20rpx;
  675. padding: 5rpx;
  676. }
  677. </style>