courseSection.vue 23 KB

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