catalogue.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023
  1. <template>
  2. <!-- <div> -->
  3. <div class="container">
  4. <div class="con_header">
  5. <div
  6. v-for="(item, index) in subList"
  7. :key="index"
  8. class="con_item"
  9. :class="{ nactive: subIndex == index }"
  10. @click="toChangeCou(item, index)"
  11. >
  12. {{ item.subjectName }}
  13. </div>
  14. </div>
  15. <div class="course_info">
  16. <div
  17. class="video_box"
  18. :style="{
  19. backgroundImage: `url(${$tools.splitImgHost(
  20. goodsDetail.coverUrl,
  21. false
  22. )})`,
  23. }"
  24. >
  25. <div v-show="vid" id="player" class="video"></div>
  26. <div v-show="vidzb" id="playerzb" class="video"></div>
  27. </div>
  28. <div class="right-box">
  29. <div class="right-box__header">
  30. <div class="tabs">
  31. <el-tabs v-model="courseTabIndex">
  32. <el-tab-pane
  33. :name="tab.name"
  34. v-for="(tab, index) in menuTab"
  35. :key="index"
  36. >
  37. <div slot="label">
  38. <span class="label">{{ tab.label }}</span>
  39. </div>
  40. <!-- 章节目录 -->
  41. <template v-if="tab.name == '1'">
  42. <div class="mulu_body">
  43. <div class="left-box">
  44. <div
  45. v-for="(courseItem, tindex) in goodsTeacher"
  46. :key="tindex + 'one'"
  47. >
  48. <div class="left-box__body">
  49. <template
  50. v-for="(course, cindex) in courseItem.courseList"
  51. >
  52. <!-- v-for="(course, cindex) in s_courseList" -->
  53. <div v-if="course.show == 1" :key="cindex + 'two'">
  54. <div
  55. class="course-list-item"
  56. v-show="
  57. course.subjectId === newActiveSubjectId ||
  58. !newActiveSubjectId
  59. "
  60. >
  61. <div
  62. class="course-list-item_title"
  63. @click="openCourse(course)"
  64. >
  65. <i
  66. :class="{
  67. 'el-icon-caret-right': !course.showList,
  68. 'el-icon-caret-bottom': course.showList,
  69. }"
  70. ></i>
  71. {{ course.courseName }}
  72. </div>
  73. <div
  74. v-if="
  75. courseItem.teaList &&
  76. courseItem.teaList.length > 0
  77. "
  78. class="teacher_names"
  79. >
  80. <div
  81. v-for="(tea, index) in courseItem.teaList"
  82. :key="index + 'three'"
  83. class="names"
  84. :class="{
  85. nactive: States[tindex] == index,
  86. }"
  87. @click="switchTeacher(tea, index, tindex)"
  88. >
  89. {{ tea.aliasName }}
  90. </div>
  91. </div>
  92. <template v-if="course.showList">
  93. <div
  94. class="item"
  95. v-for="(item, index) in course.list"
  96. :key="index"
  97. >
  98. <template v-if="item.type == 1">
  99. <div
  100. class="item__title"
  101. @click="openModule(item)"
  102. >
  103. <i
  104. :class="{
  105. 'el-icon-caret-right':
  106. !item.showList,
  107. 'el-icon-caret-bottom':
  108. item.showList,
  109. }"
  110. ></i>
  111. {{ item.name }}
  112. </div>
  113. <div class="item__content">
  114. <div
  115. class="bank-chapter"
  116. v-if="item.showList"
  117. >
  118. <div
  119. class="bank-chapter__item"
  120. v-for="(
  121. chapter, chapterIndex
  122. ) in item.list"
  123. :key="chapterIndex"
  124. >
  125. <div
  126. class="bank-chapter__item__text"
  127. @click="openChapter(chapter)"
  128. >
  129. <i
  130. :class="{
  131. 'el-icon-caret-right':
  132. !chapter.showList,
  133. 'el-icon-caret-bottom':
  134. chapter.showList,
  135. }"
  136. ></i
  137. >{{ chapter.name }}
  138. </div>
  139. <div
  140. class="bank-section"
  141. v-if="chapter.showList"
  142. >
  143. <div
  144. class="bank-section__item"
  145. v-for="(
  146. section, sectionIndex
  147. ) in chapter.list"
  148. :key="sectionIndex"
  149. >
  150. <div
  151. class="
  152. bank-section__item__text
  153. "
  154. >
  155. {{ section.name }}
  156. </div>
  157. <div
  158. v-if="section.tryListen"
  159. @click="
  160. toDo(section, item.courseId)
  161. "
  162. class="btn"
  163. >
  164. 试看
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. </template>
  172. <template v-if="item.type == 2">
  173. <div class="item__content">
  174. <div class="bank-chapter">
  175. <div class="bank-chapter__item">
  176. <div
  177. class="bank-chapter__item__text"
  178. @click="openChapter(item)"
  179. >
  180. <i
  181. :class="{
  182. 'el-icon-caret-right':
  183. !item.showList,
  184. 'el-icon-caret-bottom':
  185. item.showList,
  186. }"
  187. ></i
  188. >{{ item.name }}
  189. </div>
  190. <div
  191. class="bank-section"
  192. v-if="item.showList"
  193. >
  194. <div
  195. class="bank-section__item"
  196. v-for="(
  197. section, sectionIndex
  198. ) in item.list"
  199. :key="sectionIndex"
  200. >
  201. <div
  202. class="
  203. bank-section__item__text
  204. "
  205. >
  206. {{ section.name }}
  207. </div>
  208. <div
  209. v-if="section.tryListen"
  210. @click="
  211. toDo(section, item.courseId)
  212. "
  213. class="btn"
  214. >
  215. 试看
  216. </div>
  217. </div>
  218. </div>
  219. </div>
  220. </div>
  221. </div>
  222. </template>
  223. <template v-if="item.type == 3">
  224. <div class="item__content">
  225. <div class="bank-section">
  226. <div class="bank-section__item">
  227. <div
  228. class="bank-section__item__text"
  229. >
  230. {{ item.name }}
  231. </div>
  232. <div
  233. v-if="item.tryListen"
  234. @click="toDo(item, item.courseId)"
  235. class="btn"
  236. >
  237. 试看
  238. </div>
  239. </div>
  240. </div>
  241. </div>
  242. </template>
  243. </div>
  244. </template>
  245. </div>
  246. </div>
  247. </template>
  248. </div>
  249. </div>
  250. </div>
  251. </div>
  252. <div class="down_bottons">
  253. <!-- <div class="asks">
  254. <div class="ask_manage" @click="toAskManage()">咨询管理</div>
  255. <div class="apply_ask">
  256. <div class="ask_titles">报名咨询</div>
  257. <div class="ask_time">{{ header.serviceTel.time }}</div>
  258. <div class="phones" v-for="(item, index) in getTel(header.serviceTel.tel)" :key="index">
  259. <img class="icon_phone" src="@/assets/topic/ask_phone.png" alt="" />
  260. <span>{{ item }}</span>
  261. </div>
  262. </div>
  263. </div> -->
  264. <el-popover placement="top" width="202" trigger="hover">
  265. <div class="apply_ask">
  266. <div class="ask_titles">报名咨询</div>
  267. <div class="ask_time">{{ header.serviceTel.time }}</div>
  268. <div
  269. class="phones"
  270. v-for="(item, index) in getTel(header.serviceTel.tel)"
  271. :key="index"
  272. >
  273. <img
  274. class="icon_phone"
  275. src="@/assets/topic/ask_phone.png"
  276. alt=""
  277. />
  278. <span>{{ item }}</span>
  279. </div>
  280. </div>
  281. <div slot="reference">
  282. <div class="ask_manage" @click="toAskManage()">
  283. 咨询管理
  284. </div>
  285. </div>
  286. </el-popover>
  287. <div class="ask_buy" @click="togoBuy()">立即购买</div>
  288. </div>
  289. </template>
  290. </el-tab-pane>
  291. </el-tabs>
  292. </div>
  293. </div>
  294. </div>
  295. </div>
  296. <!-- 弹窗 -->
  297. <buy-dialog
  298. :buyModal.sync="buyModal"
  299. :topicId="topicId"
  300. :subjectType="1"
  301. :type="3"
  302. ></buy-dialog>
  303. </div>
  304. <!-- </div> -->
  305. </template>
  306. <script>
  307. import { mapGetters } from "vuex";
  308. import buyDialog from "./buyDialog.vue";
  309. export default {
  310. name: "boxs",
  311. components: { buyDialog },
  312. props: {
  313. goodsId: {
  314. type: [String, Number],
  315. default: "",
  316. },
  317. topicId: {
  318. type: [String, Number],
  319. default: "",
  320. },
  321. },
  322. data() {
  323. return {
  324. vid: "",
  325. vidzb: "",
  326. player: "",
  327. playerzb: "",
  328. activeId: "", //当前选中ID
  329. vodPlayerJs: "https://player.polyv.net/script/player.js",
  330. playerJs:
  331. "https://player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js",
  332. uidzb: "egsxlptzdq",
  333. menuTab: [
  334. {
  335. name: "1",
  336. label: "章节目录",
  337. },
  338. ],
  339. courseTabIndex: "1",
  340. param: {
  341. pageNum: 1,
  342. pageSize: 100,
  343. total: 0,
  344. },
  345. needOpen: true, //是否需要一进来展开第一章节
  346. menuIndex: [], //需要展开的章节索引值
  347. courseList: [],
  348. s_courseList: [],
  349. goodsAuditionConfigIdList: [],
  350. listenConfigList: [],
  351. courserIndex: 0,
  352. goodsDetail: {},
  353. goodsExamConfig: [],
  354. subList: [],
  355. subIndex: 0,
  356. playCourseId: 0, // 播放课程id
  357. showAsk: false,
  358. buyModal: false,
  359. goodsTeacher: [],
  360. teaIndex: 0,
  361. States: { 0: 0 },
  362. newActiveSubjectId: "",
  363. };
  364. },
  365. watch: {
  366. async goodsId(newV, oldV) {
  367. if (newV) {
  368. await this.getGoodsDetail();
  369. this.goodsCourseList();
  370. }
  371. },
  372. },
  373. computed: {
  374. ...mapGetters(["header"]),
  375. },
  376. methods: {
  377. getTel(tel) {
  378. return tel ? tel.split(";") : [];
  379. },
  380. toAskManage() {
  381. this.showAsk = !this.showAsk;
  382. },
  383. toChangeCou(item, index) {
  384. this.newActiveSubjectId = item.subjectId;
  385. this.subIndex = index;
  386. // this.s_courseList = this.courseList.filter(e => e.subjectId == item.subjectId)
  387. },
  388. togoBuy() {
  389. this.buyModal = true;
  390. },
  391. /**
  392. * 获取商品详情
  393. */
  394. getGoodsDetail() {
  395. this.$request.commonGoodsDetail(this.goodsId).then((res) => {
  396. if (res.data.pcDetailHtml) {
  397. res.data.pcDetailHtml =
  398. res.data.pcDetailHtml &&
  399. res.data.pcDetailHtml.replace(
  400. /<img/gi,
  401. '<img style="max-width:100%;height:100%;display:block;margin:0px auto;"'
  402. );
  403. }
  404. this.goodsDetail = res.data;
  405. this.goodsExamConfig = JSON.parse(res.data.goodsExamConfig);
  406. if (this.goodsDetail.goodsAuditionConfig) {
  407. this.listenConfigList = JSON.parse(
  408. this.goodsDetail.goodsAuditionConfig
  409. );
  410. for (var itemChild of this.listenConfigList) {
  411. this.goodsAuditionConfigIdList.push(itemChild.sectionId); //存储试听节ID
  412. }
  413. console.log(
  414. this.goodsAuditionConfigIdList,
  415. "this.goodsAuditionConfigIdList"
  416. );
  417. }
  418. });
  419. },
  420. //切换老师
  421. switchTeacher(data, index, tindex) {
  422. console.log(data, "data", index, tindex);
  423. this.States[tindex] = index;
  424. this.teaIndex = index;
  425. this.goodsTeacher.forEach((item, index) => {
  426. if (item.teaList && item.teaList.length > 0) {
  427. let list = item.teaList.filter((x) => x.courseId == data.courseId);
  428. if (list && list.length > 0) {
  429. item.courseList.forEach((course, courseIndex) => {
  430. if (course.courseId == data.courseId) {
  431. this.$set(
  432. this.goodsTeacher[index].courseList[courseIndex],
  433. "show",
  434. 1
  435. );
  436. } else {
  437. this.$set(
  438. this.goodsTeacher[index].courseList[courseIndex],
  439. "show",
  440. 0
  441. );
  442. }
  443. });
  444. }
  445. }
  446. });
  447. },
  448. /**
  449. * 获取课程章节列表,/app/common/goods/course/list/' + data,
  450. */
  451. goodsCourseList() {
  452. this.$request.goodsCourseList(this.goodsId).then(async (res) => {
  453. if (res.code == 200) {
  454. res.rows.forEach((item) => {
  455. item.showList = false;
  456. item.list = [];
  457. });
  458. // 获取双师制
  459. this.getCourseTeacher(res.rows);
  460. this.courseList = res.rows || [];
  461. // 筛选科目名称
  462. let ids = [];
  463. const newArr = [];
  464. this.courseList.forEach((item) => {
  465. if (ids.indexOf(item.subjectId) == -1) {
  466. ids.push(item.subjectId);
  467. newArr.push(item);
  468. }
  469. });
  470. this.subList = [...newArr];
  471. this.subList = this.subList.filter((item) => item.subjectName);
  472. console.log("this.subList", this.subList);
  473. this.subList.length &&
  474. (this.newActiveSubjectId = this.subList[0].subjectId);
  475. if (this.needOpen) {
  476. for (let i = 0; i < this.courseList.length; i++) {
  477. let menuIndexOrFalse = await this.getCourseMenus(
  478. this.courseList[i]
  479. );
  480. // console.log('111menuIndexOrFalse', menuIndexOrFalse)
  481. if (menuIndexOrFalse !== false) {
  482. this.menuIndex = [i, menuIndexOrFalse];
  483. this.openCourse(this.courseList[i]);
  484. break;
  485. }
  486. }
  487. this.s_courseList = this.courseList.filter(
  488. (item) => item.subjectId == this.subList[0].subjectId
  489. );
  490. }
  491. console.log("s_courseList", this.s_courseList);
  492. }
  493. });
  494. },
  495. getCourseTeacher(rows) {
  496. //获取商品双师资模板
  497. this.$request
  498. .getGoodsCourseTeacher({
  499. goodsId: this.goodsId,
  500. })
  501. .then((res1) => {
  502. console.log(res1, "res1");
  503. if (res1.data && res1.data.length > 0) {
  504. //课程老师模板
  505. let teacherTel = res1.data;
  506. //商品课程
  507. let courses = rows;
  508. teacherTel.forEach((tea) => {
  509. let dataList = [];
  510. let teacherList = [];
  511. courses.forEach((item) => {
  512. let data = tea.courseList.filter(
  513. (x) => x.courseId == item.courseId
  514. );
  515. if (data && data.length > 0) {
  516. dataList.push(item);
  517. teacherList = tea.courseList;
  518. }
  519. });
  520. let result = {
  521. teaList: teacherList,
  522. courseList: dataList,
  523. };
  524. this.goodsTeacher.push(result);
  525. });
  526. if (this.goodsTeacher && this.goodsTeacher.length > 0) {
  527. let courseIds = [];
  528. this.goodsTeacher.forEach((item) => {
  529. item.courseList.forEach((course) => {
  530. courseIds.push(course.courseId);
  531. });
  532. });
  533. if (courseIds.length > 0) {
  534. courses.forEach((item) => {
  535. if (!courseIds.includes(item.courseId)) {
  536. let data = {
  537. teaList: [],
  538. courseList: [],
  539. };
  540. data.courseList.push(item);
  541. this.goodsTeacher.push(data);
  542. }
  543. });
  544. }
  545. this.goodsTeacher.forEach((item) => {
  546. if (item.courseList && item.courseList.length > 0) {
  547. item.courseList[0].show = 1;
  548. }
  549. });
  550. }
  551. } else {
  552. //没有双师资模板
  553. rows.forEach((item) => {
  554. item.show = 1;
  555. let data = {
  556. teaList: [],
  557. courseList: [],
  558. };
  559. data.courseList.push(item);
  560. this.goodsTeacher.push(data);
  561. });
  562. }
  563. });
  564. console.log(this.goodsTeacher, "this.goodsTeacher");
  565. },
  566. // 获取课程目录,/app/common/course/menuList
  567. getCourseMenus(item) {
  568. return new Promise((resolve) => {
  569. this.$request.menuList({ courseId: item.courseId }).then((res) => {
  570. if (res.code == 200) {
  571. for (let i = 0; i < res.rows.length; i++) {
  572. // 1模块 2章 3节
  573. if (res.rows[i].type == 1 || res.rows[i].type == 2) {
  574. resolve(i);
  575. break;
  576. }
  577. }
  578. }
  579. });
  580. });
  581. },
  582. /**
  583. * 点击课程大目录
  584. */
  585. openCourse(course) {
  586. course.showList = !course.showList;
  587. if (!course.list.length) {
  588. this.getMenuList(course);
  589. }
  590. },
  591. /**
  592. * 获取模块列表
  593. */
  594. getMenuList(item) {
  595. this.$request.menuList({ courseId: item.courseId }).then((res) => {
  596. for (let i = 0; i < res.rows.length; i++) {
  597. let item = res.rows[i];
  598. item.showList = false;
  599. item.id = item.menuId;
  600. item.name = item.menuName;
  601. if (item.type == 3) {
  602. //判断是否试听
  603. item.tryListen = false;
  604. if (this.goodsAuditionConfigIdList.indexOf(item.id) !== -1) {
  605. item.tryListen = true;
  606. }
  607. } else {
  608. item.list = [];
  609. }
  610. }
  611. item.list = res.rows;
  612. if (this.needOpen) {
  613. if (item.list[this.menuIndex[1]].type == 1) {
  614. this.openModule(item.list[this.menuIndex[1]]);
  615. } else if (item.list[this.menuIndex[1]].type == 2) {
  616. this.needOpen = false;
  617. this.openChapter(item.list[this.menuIndex[1]]);
  618. }
  619. }
  620. });
  621. },
  622. /**
  623. * 展开模块卷
  624. */
  625. openModule(Module) {
  626. console.log("点击模块卷");
  627. this.$set(Module, "showList", !Module.showList);
  628. if (!Module.list.length) {
  629. this.getChapterList(Module);
  630. }
  631. },
  632. getChapterList(Module) {
  633. this.$request.chapterList(Module.id).then((res) => {
  634. for (let i = 0; i < res.data.length; i++) {
  635. let item = res.data[i];
  636. item.id = item.chapterId;
  637. item.showList = false;
  638. item.list = [];
  639. item.menuType = 2;
  640. }
  641. Module.list = res.data;
  642. if (this.needOpen) {
  643. this.needOpen = false;
  644. this.openChapter(Module.list[0]);
  645. }
  646. });
  647. },
  648. /**
  649. * 展开章卷
  650. */
  651. openChapter(chapter) {
  652. console.log("点开章卷");
  653. this.$set(chapter, "showList", !chapter.showList);
  654. if (!chapter.list.length) {
  655. this.getSectionList(chapter);
  656. }
  657. },
  658. getSectionList(chapter) {
  659. this.$request.sectionList(chapter.id).then((res) => {
  660. for (let i = 0; i < res.data.length; i++) {
  661. let item = res.data[i];
  662. item.id = item.sectionId;
  663. item.menuType = 3;
  664. //判断是否试听
  665. item.tryListen = false;
  666. if (this.goodsAuditionConfigIdList.indexOf(item.id) !== -1) {
  667. item.tryListen = true;
  668. }
  669. }
  670. chapter.list = res.data;
  671. });
  672. },
  673. /**
  674. * 试看
  675. */
  676. toDo(section, courseId) {
  677. console.log("section, courseId", section, courseId);
  678. this.playCourseId = courseId;
  679. console.log(this.playCourseId, "playCourseId");
  680. this.initVideo(section);
  681. },
  682. async initVideo(option) {
  683. await this.clears();
  684. console.log("option:", option);
  685. this.sectionItem = option;
  686. if (option.sectionType === 2) {
  687. this.vidzb = option.liveUrl;
  688. this.loadPlayerScriptzb(this.loadPlayerzb);
  689. } else {
  690. this.vid = option.recordingUrl;
  691. this.loadPlayerScript(this.loadPlayer);
  692. }
  693. },
  694. /**
  695. * @param {String} 关闭视频窗口-销毁实例
  696. */
  697. clears() {
  698. return new Promise((resolve, reject) => {
  699. this.vid = "";
  700. this.vidzb = "";
  701. if (this.player) {
  702. this.player.destroy();
  703. }
  704. if (this.playerzb) {
  705. this.playerzb.destroy();
  706. }
  707. resolve();
  708. });
  709. },
  710. loadPlayerzb() {
  711. const polyvLivePlayer = window.polyvLivePlayer;
  712. this.playerzb = polyvLivePlayer({
  713. wrap: "#playerzb",
  714. // width: 700,
  715. height: 484,
  716. uid: this.uidzb,
  717. vid: this.vidzb,
  718. });
  719. },
  720. loadPlayer() {
  721. const polyvPlayer = window.polyvPlayer;
  722. let auditionMinute = this.listenConfigList.find((item) => {
  723. if (
  724. item.sectionId ==
  725. (this.sectionItem.sectionId || this.sectionItem.menuId) &&
  726. item.courseId == this.playCourseId
  727. ) {
  728. return true;
  729. }
  730. }).auditionMinute;
  731. this.$request.obtainpolyvvideosign(this.vid).then((res) => {
  732. this.player = polyvPlayer({
  733. wrap: "#player",
  734. // width: 700,
  735. height: 484,
  736. vid: this.vid,
  737. start: 0,
  738. end: auditionMinute,
  739. teaser_show: 0,
  740. ts: res.data.ts,
  741. sign: res.data.sign,
  742. playsafe: function (vid, next) {
  743. self.$request.obtainpolyvvideopcsign(vid).then((res) => {
  744. next(res.data);
  745. });
  746. },
  747. });
  748. this.player.on("s2j_onPlayOver", () => {
  749. this.$confirm("试看结束,购买课程可学习全部", "提示", {
  750. closeOnClickModal: false,
  751. showCancelButton: false,
  752. closeOnPressEscape: false,
  753. distinguishCancelAndClose: false,
  754. showClose: false,
  755. }).then((res) => {
  756. // this.videoModalShow = false;
  757. });
  758. });
  759. });
  760. },
  761. /**
  762. * @param {String} 直播预览
  763. */
  764. loadPlayerScriptzb(callback) {
  765. if (!window.polyvLivePlayer) {
  766. const myScript = document.createElement("script");
  767. myScript.setAttribute("src", this.playerJs);
  768. myScript.onload = callback;
  769. document.body.appendChild(myScript);
  770. } else {
  771. callback();
  772. }
  773. },
  774. loadPlayerScript(callback) {
  775. if (!window.polyvPlayer) {
  776. const myScript = document.createElement("script");
  777. myScript.setAttribute("src", this.vodPlayerJs);
  778. myScript.onload = callback;
  779. document.body.appendChild(myScript);
  780. } else {
  781. callback();
  782. }
  783. },
  784. },
  785. };
  786. </script>
  787. <style lang="scss" scoped>
  788. .container {
  789. width: 100%;
  790. display: flex;
  791. flex-direction: column;
  792. align-items: center;
  793. justify-items: center;
  794. }
  795. .con_header {
  796. width: 1113px;
  797. height: 44px;
  798. background: #3f4449;
  799. display: flex;
  800. @media screen and (max-width: 1370px) {
  801. width: 900px;
  802. }
  803. .con_item {
  804. padding: 12px 20px;
  805. font-size: 14px;
  806. font-weight: 500;
  807. color: #ffffff;
  808. cursor: pointer;
  809. &.nactive {
  810. background: #3f8dfd;
  811. }
  812. }
  813. }
  814. .course_info {
  815. display: flex;
  816. align-items: center;
  817. justify-items: center;
  818. }
  819. .video_box {
  820. width: 709px;
  821. height: 484px;
  822. background-size: 100% 100%;
  823. @media screen and (max-width: 1370px) {
  824. width: 497px;
  825. }
  826. .video {
  827. width: 100%;
  828. height: 100%;
  829. }
  830. }
  831. .right-box {
  832. width: 404px;
  833. height: 484px;
  834. background: #3f4449;
  835. border-radius: 0px;
  836. &__header {
  837. .tabs {
  838. /deep/.el-tabs__nav-wrap::after {
  839. background-color: #999;
  840. }
  841. /deep/ .el-tabs__header {
  842. margin: 0;
  843. }
  844. .label {
  845. color: #fff;
  846. height: 40px;
  847. line-height: 40px;
  848. padding: 0 20px;
  849. }
  850. }
  851. }
  852. }
  853. .mulu_body {
  854. width: 404px;
  855. height: 401px;
  856. background: #3f4449;
  857. border-radius: 0px;
  858. .left-box {
  859. width: 100%;
  860. height: 100%;
  861. overflow-y: auto;
  862. padding-top: 10px;
  863. .course-list-item {
  864. padding: 0px 16px 10px;
  865. border-radius: 10px;
  866. .item {
  867. overflow: hidden;
  868. margin-top: 12px;
  869. &__title {
  870. padding: 10px 0;
  871. cursor: pointer;
  872. font-size: 14px;
  873. font-family: Microsoft YaHei;
  874. font-weight: bold;
  875. color: #fff;
  876. }
  877. &__content {
  878. .bank-chapter {
  879. margin-left: 4px;
  880. &__item {
  881. padding-top: 10px;
  882. // padding-bottom: 10px;
  883. font-size: 14px;
  884. color: #fff;
  885. &__text {
  886. cursor: pointer;
  887. flex: 1;
  888. }
  889. }
  890. }
  891. .bank-section {
  892. margin-left: 40px;
  893. &__item {
  894. padding-top: 10px;
  895. // padding-bottom: 10px;
  896. font-size: 14px;
  897. display: flex;
  898. color: #3f8dfd;
  899. &__text {
  900. flex: 1;
  901. }
  902. .btn {
  903. margin-right: 20px;
  904. width: 40px;
  905. height: 24px;
  906. border: 1px solid #ff3b30;
  907. border-radius: 8px;
  908. line-height: 22px;
  909. color: #ff3b30;
  910. text-align: center;
  911. cursor: pointer;
  912. }
  913. }
  914. }
  915. }
  916. }
  917. }
  918. .course-list-item_title {
  919. font-size: 16px;
  920. color: #fff;
  921. font-weight: bold;
  922. cursor: pointer;
  923. }
  924. }
  925. }
  926. .down_bottons {
  927. width: 404px;
  928. height: 44px;
  929. display: flex;
  930. align-items: center;
  931. }
  932. .ask_manage,
  933. .ask_buy {
  934. width: 202px;
  935. height: 44px;
  936. background: #1b2632;
  937. font-size: 16px;
  938. font-weight: 500;
  939. color: #ffffff;
  940. line-height: 44px;
  941. text-align: center;
  942. cursor: pointer;
  943. }
  944. .ask_buy {
  945. background: #3f8dfd;
  946. }
  947. .apply_ask {
  948. display: block;
  949. width: 173px;
  950. // height: 196px;
  951. background: #ffffff;
  952. border-radius: 2px;
  953. padding: 20px;
  954. .ask_titles {
  955. font-size: 14px;
  956. font-weight: bold;
  957. color: #222222;
  958. }
  959. .ask_time {
  960. font-size: 12px;
  961. color: #999999;
  962. margin: 3px 0px 21px 0px;
  963. }
  964. .phones {
  965. margin-bottom: 21px;
  966. display: flex;
  967. align-items: center;
  968. .icon_phone {
  969. width: 16px;
  970. height: 16px;
  971. margin-right: 12px;
  972. }
  973. > span {
  974. font-size: 14px;
  975. color: #222222;
  976. }
  977. }
  978. }
  979. // 老师名称样式
  980. .teacher_names {
  981. display: flex;
  982. margin-left: 20px;
  983. margin-top: 10px;
  984. .names {
  985. font-size: 13px;
  986. color: #383838;
  987. margin-right: 8px;
  988. cursor: pointer;
  989. background: #818181;
  990. border-radius: 4px;
  991. padding: 3px 6px;
  992. &.nactive {
  993. background: #cccccc;
  994. }
  995. }
  996. }
  997. </style>