courseSection.vue 23 KB

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