TextbookDetail.vue 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250
  1. <template>
  2. <!-- 教材详情 -->
  3. <div class="TextbookDetail" v-if="TextbookData && isData">
  4. <div class="nav">
  5. <!-- 登录导航 -->
  6. <Header />
  7. <div class="shade"></div>
  8. </div>
  9. <!-- 教材详情 744 -->
  10. <HeaderOne text="123" :title="$t('Key744')" name="" />
  11. <template v-if="TextbookData.is_deleted == 'false'">
  12. <template v-if="bookIsBuy == 'true' || TextbookData.publish_status == 1">
  13. <div class="main" v-loading="loading">
  14. <div class="bookDetail" v-if="detailSHow">
  15. <div class="rightUp">
  16. <span>HOT</span>
  17. </div>
  18. <div class="img">
  19. <img :src="TextbookData.picture_url" alt="" />
  20. </div>
  21. <div class="text">
  22. <p class="p1">{{ TextbookData.name }}</p>
  23. <p class="p2">{{ TextbookData.org_name }}</p>
  24. <p class="p2">{{ TextbookData.author }}</p>
  25. <p class="p3">
  26. {{ TextbookData.description }}
  27. </p>
  28. <div class="operation">
  29. <span class="price">
  30. ¥<span
  31. class="price_1"
  32. v-html="changePrice(TextbookData.price, 24, 16)"
  33. ></span>
  34. </span>
  35. <button @click="getPurchase" class="get">
  36. <!-- Key390-去学习 Key72-购买 -->
  37. {{
  38. bookIsBuy == "true" ? this.$t("Key390") : this.$t("Key72")
  39. }}
  40. </button>
  41. <!-- <button class="acquired">
  42. ACQUIRED
  43. </button> -->
  44. <span class="enshrine" @click="enshrineEvent">
  45. <img
  46. v-if="enshrine == 'false'"
  47. src="../assets/textBookDetail/enshrine2.png"
  48. alt=""
  49. />
  50. <img
  51. v-else
  52. src="../assets/textBookDetail/enshrine1.png"
  53. alt=""
  54. />
  55. </span>
  56. </div>
  57. </div>
  58. </div>
  59. <!-- <div class="more" v-if="detailSHow">
  60. <div class="moreTitle">更多推荐</div>
  61. <div class="moreList">
  62. <div class="moreOne">
  63. <div>
  64. <img src="../assets/textBookDetail/Rectangle 905.png" alt="" />
  65. </div>
  66. <div class="text">
  67. <p class="p1">Learn Chinese with Ease-Learn Chinese with Ease</p>
  68. <p>Beijing language and Culture University</p>
  69. <p>Esther Howard</p>
  70. <div class="operation">
  71. <span class="price">
  72. <span
  73. class="price_1"
  74. v-text="changePrice('19.99')"
  75. ></span>
  76. <span
  77. class="price_2"
  78. v-text="changePrice('19.99')"
  79. ></span>
  80. </span>
  81. <button class="get">GET</button>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="moreOne">
  86. <div>
  87. <img src="../assets/textBookDetail/Rectangle 906.png" alt="" />
  88. </div>
  89. <div class="text">
  90. <p class="p1">Learn Chinese with Ease-Learn Chinese with Ease</p>
  91. <p>Beijing language and Culture University</p>
  92. <p>Esther Howard</p>
  93. <div class="operation">
  94. <span class="price">
  95. <span
  96. class="price_1"
  97. v-text="changePrice('19.99')"
  98. ></span>
  99. <span
  100. class="price_2"
  101. v-text="changePrice('19.99')"
  102. ></span>
  103. </span>
  104. <button class="get">GET</button>
  105. </div>
  106. </div>
  107. </div>
  108. <div class="moreOne">
  109. <div>
  110. <img src="../assets/textBookDetail/Rectangle 907.png" alt="" />
  111. </div>
  112. <div class="text">
  113. <p class="p1">Learn Chinese with Ease-Learn Chinese with Ease</p>
  114. <p>Beijing language and Culture University</p>
  115. <p>Esther Howard</p>
  116. <div class="operation">
  117. <span class="price">
  118. <span
  119. class="price_1"
  120. v-text="changePrice('1', '19.99')"
  121. ></span>
  122. <span
  123. class="price_2"
  124. v-text="changePrice('2', '19.99')"
  125. ></span>
  126. </span>
  127. <button class="get">GET</button>
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. </div> -->
  133. <div class="cutDownOrimg" v-if="detailSHow">
  134. <div class="sele">
  135. <div
  136. @click="SelectShowEvent('1')"
  137. :class="SelectShow == '1' ? 'select' : ''"
  138. v-if="SelectFirstShow"
  139. >
  140. <!-- 目录 -->{{ $t("Key612") }}
  141. </div>
  142. <!-- 资源 -->
  143. <div
  144. @click="SelectShowEvent('2')"
  145. :class="SelectShow == '1' ? '' : 'select'"
  146. v-if="
  147. fileListVideo.length > 0 ||
  148. fileListAudio.length > 0 ||
  149. fileListOtheraudio.length > 0 ||
  150. fileListDoc.length > 0
  151. "
  152. >
  153. {{ $t("Key613") }}
  154. </div>
  155. </div>
  156. </div>
  157. <div v-if="SelectShow == '1'" class="Catalogue">
  158. <BookView
  159. :bookId="TextBookId"
  160. @bookdetailShow="bookdetailShow"
  161. :bookIsBuy="bookIsBuy"
  162. :bookFontSize="TextbookData.font_size"
  163. :pictureUrl="TextbookData.picture_url"
  164. ></BookView>
  165. </div>
  166. <div v-else class="Resources">
  167. <!--没有数据-->
  168. <!-- <div>
  169. <img src="../assets/textBookDetail/fileType1.png" alt="" />
  170. <span> 文件名 </span>
  171. <img src="../assets/textBookDetail/upload.png" alt="" />
  172. </div> -->
  173. <div class="resource-content" v-if="fileListVideo.length > 0">
  174. <!-- 视频资源 736 -->
  175. <h2 class="video-title">{{ $t("Key736") }}</h2>
  176. <ul class="video-list">
  177. <li
  178. v-for="(item, index) in fileListVideo"
  179. :key="index"
  180. @click="handleJumpVideo(index)"
  181. >
  182. <div
  183. class="video-img"
  184. :style="{
  185. background:
  186. 'url(' + item.preview_image_file_url + ') no-repeat',
  187. 'background-size': 'cover',
  188. }"
  189. >
  190. <img class="video" />
  191. <img src="../assets/common/play-one.png" class="play-one" />
  192. </div>
  193. <p class="video-name">{{ item.file_name }}</p>
  194. </li>
  195. </ul>
  196. </div>
  197. <div
  198. class="resource-content"
  199. v-if="fileListAudio.length > 0 || fileListOtheraudio.length > 0"
  200. >
  201. <!-- 音频资源737 -->
  202. <h2 class="video-title">{{ $t("Key737") }}</h2>
  203. <div class="audio-content" v-if="fileListAudio.length > 0">
  204. <!-- 课文资源 738 -->
  205. <p class="audio-type">{{ $t("Key738") }}</p>
  206. <div class="audio-line-box">
  207. <AudioLine
  208. :audioId="'fileListAudio'"
  209. :mp3List="fileListAudio"
  210. type="audioLine"
  211. ref="audioLine"
  212. />
  213. </div>
  214. </div>
  215. <div class="audio-content" v-if="fileListOtheraudio.length > 0">
  216. <!-- 自学音频 739 -->
  217. <p class="audio-type">{{ $t("Key739") }}</p>
  218. <div class="audio-line-box">
  219. <AudioLine
  220. :audioId="'fileListOtheraudio'"
  221. :mp3List="fileListOtheraudio"
  222. type="audioLine"
  223. ref="audioLine"
  224. />
  225. </div>
  226. </div>
  227. <div class="audio-content">
  228. <!-- 资源下载 740 -->
  229. <p class="audio-type">{{ $t("Key740") }}</p>
  230. <div class="download">
  231. <div class="book-open" @click="handleDownloadAudio">
  232. <img
  233. src="../assets/common/download.png"
  234. class="book-open-img"
  235. />
  236. <!-- 音频 -->
  237. <span class="book-open-text">{{ $t("Key400") }}</span>
  238. </div>
  239. <!-- <div class="book-open">
  240. <img
  241. src="../assets/common/download.png"
  242. class="book-open-img"
  243. />
  244. <span class="book-open-text">互动课件</span>
  245. </div> -->
  246. </div>
  247. </div>
  248. </div>
  249. <div class="resource-content" v-if="fileListDoc.length > 0">
  250. <!-- 试读PDF 741 -->
  251. <h2 class="video-title">{{ $t("Key741") }}</h2>
  252. <ul class="PDF-list">
  253. <li
  254. v-for="(item, index) in fileListDoc"
  255. :key="index"
  256. @click="handleJumpPdf(index)"
  257. >
  258. <b>{{ index + 1 }}.</b>
  259. <p class="PDF-name">{{ item.file_name }}</p>
  260. <span>{{ item.fileSize }}</span>
  261. <img
  262. src="../assets/common/download.png"
  263. class="book-open-img"
  264. @click="handleDownload(item.file_id)"
  265. />
  266. </li>
  267. </ul>
  268. </div>
  269. </div>
  270. </div>
  271. </template>
  272. </template>
  273. <template v-if="TextbookData.is_deleted == 'true'">
  274. <div class="noview-msg-box">
  275. <!-- 无法查看,教材已被删除 742 -->
  276. <div class="noview-msg">{{ $t("Key742") }}</div>
  277. </div>
  278. </template>
  279. <template
  280. v-if="
  281. TextbookData.is_deleted == 'false' &&
  282. bookIsBuy == 'false' &&
  283. TextbookData.publish_status == 0
  284. "
  285. >
  286. <div class="noview-msg-box">
  287. <!-- 无法查看,教材已下架 743 -->
  288. <div class="noview-msg">{{ $t("Key743") }}</div>
  289. </div>
  290. </template>
  291. <!-- 商品详情 -->
  292. <el-dialog
  293. class="buyWindow"
  294. :title="$t('Key52')"
  295. :visible.sync="NopymentShow"
  296. width="720px"
  297. :before-close="closeNoPyment"
  298. >
  299. <Confirmorder
  300. :data="TextbookData"
  301. :goods_type="101"
  302. :changeOrderNumber="changeOrderNumber"
  303. ref="Confirmorder"
  304. />
  305. </el-dialog>
  306. <!-- 订单号 -->
  307. <el-dialog
  308. :title="$t('Key472') + ':' + orderNumber"
  309. :visible.sync="PymentShow"
  310. width="720px"
  311. :before-close="closePyment"
  312. >
  313. <Payment
  314. :data="TextbookData"
  315. :orderNumber="orderNumber"
  316. :closePyment="closePyment"
  317. />
  318. </el-dialog>
  319. </div>
  320. </template>
  321. <script>
  322. //这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  323. //例如:import 《组件名称》from ‘《组件路径》';
  324. import Header from "@/components/inputModules/common/Header";
  325. import HeaderOne from "@/components/inputModules/common/HeaderOne";
  326. import {
  327. TextbookAPI,
  328. LearnWebSI,
  329. getContent,
  330. getContentFile,
  331. } from "@/api/ajax";
  332. import Confirmorder from "@/components/pyment/Confirmorder";
  333. import Payment from "@/components/pyment/Payment";
  334. import BookView from "@/views/bookView"; // 教材预览
  335. import { updateWordPack } from "@/utils/i18n";
  336. import AudioLine from "@/components/inputModules/common/AudioLine";
  337. import { getToken } from "@/utils/auth";
  338. import { Base64 } from "js-base64";
  339. export default {
  340. //import引入的组件需要注入到对象中才能使用
  341. components: {
  342. Header,
  343. HeaderOne,
  344. Confirmorder,
  345. Payment,
  346. BookView,
  347. AudioLine,
  348. },
  349. props: {},
  350. data() {
  351. //这里存放数据
  352. return {
  353. enshrine: "false",
  354. IsPurchase: false,
  355. SelectShow: "1", //选择展示课程资源还是下载
  356. SelectFirstShow: true,
  357. TextBookId: null,
  358. TextbookData: null,
  359. loading: false,
  360. NopymentShow: false, //添加订单弹窗
  361. PymentShow: false, //支付订单弹窗
  362. orderNumber: null, //订单号
  363. IsDownload: false, //是否可以下载
  364. detailSHow: true, // 除教材预览外其他内容是否显示
  365. bookIsBuy: "false", // 教材是否已购买
  366. isData: false,
  367. fileListVideo: [], // 教材资源视频数组
  368. fileListAudio: [], // 教材资源视频数组
  369. fileListOtheraudio: [],
  370. fileListDoc: [], // 教材资源视频数组
  371. };
  372. },
  373. //计算属性 类似于data概念
  374. computed: {},
  375. //监控data中数据变化
  376. watch: {},
  377. //方法集合
  378. methods: {
  379. closeNoPyment() {
  380. this.NopymentShow = false;
  381. this.$refs.Confirmorder.clearData();
  382. },
  383. closePyment(str) {
  384. this.PymentShow = false;
  385. this.$refs.Confirmorder.clearData();
  386. if (str == "支付成功") {
  387. this.getdetail();
  388. }
  389. },
  390. // 生成订单 同时切换到支付弹窗
  391. changeOrderNumber(
  392. val,
  393. back_discount_code,
  394. discount_money,
  395. receivables_money
  396. ) {
  397. this.orderNumber = val;
  398. this.NopymentShow = false;
  399. this.TextbookData.back_discount_code = back_discount_code;
  400. this.TextbookData.discount_money = discount_money;
  401. this.TextbookData.receivables_money = receivables_money;
  402. this.PymentShow = true;
  403. this.isConfirmorder = false;
  404. },
  405. // 选择课程资源还是下载
  406. SelectShowEvent(num) {
  407. this.SelectShow = num;
  408. },
  409. changePrice(price, fontSize1, fontSize2) {
  410. price = price ? price : 0;
  411. price = price.toFixed(2);
  412. price = price.toString();
  413. let arr = price.split(".");
  414. let str = `<span style="font-size: ${fontSize1 ? fontSize1 : 16}px;">${
  415. arr[0]
  416. }</span>.<span style="font-size: ${fontSize2 ? fontSize2 : 16}px;">${
  417. arr[1]
  418. }</span>`;
  419. return str;
  420. },
  421. // 收藏
  422. enshrineEvent() {
  423. // this.enshrine = !this.enshrine;
  424. if (this.enshrine == "false") {
  425. let Mname = "order-collection_manager-AddMyCollection";
  426. let data = {
  427. goods_id: this.TextBookId,
  428. goods_type: 101,
  429. goods_name: this.TextbookData.name,
  430. goods_person_name_desc: this.TextbookData.author,
  431. goods_picture_id: this.TextbookData.picture_id,
  432. goods_price: this.TextbookData.price,
  433. };
  434. LearnWebSI(Mname, data).then((res) => {
  435. this.enshrine = "true";
  436. this.$message.success(this.$t("Key575")); //"收藏成功"
  437. });
  438. } else {
  439. let Mname = "order-collection_manager-CancelMyGoodsCollection";
  440. let data = {
  441. goods_type: 101,
  442. goods_id_list: [this.TextBookId],
  443. };
  444. LearnWebSI(Mname, data).then((res) => {
  445. this.enshrine = "false";
  446. this.$message.success(this.$t("Key396")); //"取消收藏成功"
  447. });
  448. }
  449. },
  450. // 购买
  451. getPurchase() {
  452. if (this.bookIsBuy == "true") {
  453. this.$router.push("/courseview?bookId=" + this.TextBookId);
  454. } else {
  455. this.NopymentShow = true;
  456. }
  457. },
  458. bookdetailShow(flag) {
  459. this.detailSHow = flag;
  460. },
  461. //获取当前书籍是否已购买
  462. handleIsBuy() {
  463. let Mname = "order-order_manager-CheckMyGoodsBuyStatus";
  464. let data = {
  465. goods_type: 101,
  466. goods_id: this.TextBookId,
  467. };
  468. LearnWebSI(Mname, data).then((res) => {
  469. this.bookIsBuy = res.is_buy;
  470. });
  471. },
  472. // 获取当前书籍是否已收藏
  473. handleIsEnshrine() {
  474. let Mname = "order-collection_manager-CheckMyGoodsCollectionStatus";
  475. let data = {
  476. goods_type: 101,
  477. goods_id: this.TextBookId,
  478. };
  479. LearnWebSI(Mname, data).then((res) => {
  480. this.enshrine = res.is_collection;
  481. });
  482. },
  483. getdetail() {
  484. this.loading = true;
  485. this.TextBookId = this.$route.query.goods_id;
  486. let Mname = "book-book_manager-GetBook";
  487. // 获取课程详情
  488. TextbookAPI(Mname, {
  489. id: this.TextBookId,
  490. })
  491. .then((res) => {
  492. this.TextbookData = res;
  493. this.loading = false;
  494. sessionStorage.setItem("Bookdetail", JSON.stringify(res));
  495. })
  496. .catch((res) => {
  497. this.loading = false;
  498. });
  499. this.handleIsBuy();
  500. this.handleIsEnshrine();
  501. this.getBookSource();
  502. this.getBookStructList();
  503. },
  504. // 教材资源
  505. getBookSource() {
  506. let MethodNames = "book-resource_manager-GetBookResourceList";
  507. let datas = {
  508. book_id: this.TextBookId,
  509. };
  510. getContent(MethodNames, datas).then((res) => {
  511. if (res.status == 1) {
  512. this.fileListVideo = res.video_list;
  513. this.fileListAudio = res.audio_list;
  514. this.fileListOtheraudio = res.otheraudio_list;
  515. this.fileListDoc = res.doc_list;
  516. this.fileListDoc.forEach((item) => {
  517. if (item.file_size > 1024 * 1024) {
  518. if (item.file_size / 1024 / 1024 / 1024 > 1) {
  519. item.fileSize =
  520. (item.file_size / 1024 / 1024 / 1024).toFixed(2) + "GB";
  521. } else {
  522. item.fileSize =
  523. (item.file_size / 1024 / 1024).toFixed(2) + "MB";
  524. }
  525. } else {
  526. item.fileSize = (item.file_size / 1024).toFixed(2) + "KB";
  527. }
  528. });
  529. }
  530. });
  531. },
  532. // 章节树
  533. getBookStructList() {
  534. let MethodName = "book-book_manager-GetBookChapterStruct";
  535. let data = {
  536. book_id: this.TextBookId,
  537. };
  538. getContent(MethodName, data).then((res) => {
  539. this.SelectFirstShow = res.nodes ? true : false;
  540. this.SelectShow = res.nodes ? "1" : "2";
  541. });
  542. },
  543. // 打包下载全部音频
  544. handleDownloadAudio() {
  545. let _this = this;
  546. _this.loading = true;
  547. // 拿到当前课的所有文件id
  548. let userInfor = JSON.parse(getToken());
  549. let UserCode = "",
  550. UserType = "",
  551. SessionID = "";
  552. if (userInfor) {
  553. UserCode = userInfor.user_code;
  554. UserType = userInfor.user_type;
  555. SessionID = userInfor.session_id;
  556. }
  557. let FileID = null;
  558. let data = {
  559. SessionID,
  560. UserCode,
  561. UserType,
  562. FileID,
  563. };
  564. let arr = [];
  565. this.fileListAudio.forEach((item) => {
  566. arr.push(item.file_id);
  567. });
  568. this.fileListOtheraudio.forEach((item) => {
  569. arr.push(item.file_id);
  570. });
  571. let MethodName = "file_store_manager-StartCreateFileCompressPack";
  572. getContentFile(MethodName, {
  573. file_id_list: arr,
  574. })
  575. .then((res) => {
  576. let MethodName2 = "file_store_manager-GetFileCompressTaskProgress";
  577. let timer = setInterval(() => {
  578. getContentFile(MethodName2, {
  579. file_compress_task_id: res.file_compress_task_id,
  580. })
  581. .then((res) => {
  582. if (res.is_finish == "true") {
  583. data.FileID = res.compress_pack_file_id;
  584. clearInterval(timer);
  585. timer = null;
  586. location.href =
  587. process.env.VUE_APP_BASE_API +
  588. `/GCLSFileServer/WebFileDownload?UserCode=${data.UserCode}&UserType=${data.UserType}&SessionID=${data.SessionID}&FileID=${data.FileID}`;
  589. _this.loading = false;
  590. }
  591. })
  592. .catch((res) => {
  593. this.loading = false;
  594. });
  595. }, 1000);
  596. })
  597. .catch((res) => {
  598. this.loading = false;
  599. });
  600. },
  601. // 下载单个文件
  602. handleDownload(fileId) {
  603. let userInfor = JSON.parse(getToken());
  604. let UserCode = "",
  605. UserType = "",
  606. SessionID = "";
  607. if (userInfor) {
  608. UserCode = userInfor.user_code;
  609. UserType = userInfor.user_type;
  610. SessionID = userInfor.session_id;
  611. }
  612. let FileID = fileId;
  613. let data = {
  614. SessionID,
  615. UserCode,
  616. UserType,
  617. FileID,
  618. };
  619. location.href =
  620. process.env.VUE_APP_BASE_API +
  621. `/GCLSFileServer/WebFileDownload?UserCode=${data.UserCode}&UserType=${data.UserType}&SessionID=${data.SessionID}&FileID=${data.FileID}`;
  622. },
  623. // 跳转预览PDF
  624. handleJumpPdf(index) {
  625. this.$router.push(
  626. "/TextbookDetailPdf?id=" +
  627. this.TextBookId +
  628. "&url=" +
  629. Base64.encodeURL(this.fileListDoc[index].file_url) +
  630. "&invok_module=" +
  631. this.$route.query.invok_module +
  632. "&fileId=" +
  633. Base64.encodeURL(this.fileListDoc[index].file_id) +
  634. "&relativePath=" +
  635. Base64.encodeURL(this.fileListDoc[index].file_relative_path)
  636. );
  637. },
  638. // 跳转预览视频
  639. handleJumpVideo(index) {
  640. this.$router.push(
  641. "/TextbookDetailVideo?id=" +
  642. this.TextBookId +
  643. "&invok_module=" +
  644. this.$route.query.invok_module +
  645. "&activeIndex=" +
  646. Base64.encodeURL(index)
  647. );
  648. },
  649. },
  650. //生命周期 - 创建完成(可以访问当前this实例)
  651. async created() {
  652. await updateWordPack({
  653. word_key_list: [
  654. "Key9",
  655. "Key38",
  656. "Key39",
  657. "Key52",
  658. "Key53",
  659. "Key54",
  660. "Key55",
  661. "Key72",
  662. "Key94",
  663. "Key108",
  664. "Key109",
  665. "Key116",
  666. "Key390",
  667. "Key396",
  668. "Key400",
  669. "Key472",
  670. "Key473",
  671. "Key474",
  672. "Key475",
  673. "Key575",
  674. "Key612",
  675. "Key613",
  676. "Key744",
  677. "Key736",
  678. "Key737",
  679. "Key738",
  680. "Key739",
  681. "Key740",
  682. "Key741",
  683. "Key742",
  684. "Key743",
  685. ],
  686. });
  687. this.isData = true;
  688. this.getdetail();
  689. },
  690. //生命周期 - 挂载完成(可以访问DOM元素)
  691. mounted() {},
  692. //生命周期-创建之前
  693. beforeCreated() {},
  694. //生命周期-挂载之前
  695. beforeMount() {},
  696. //生命周期-更新之前
  697. beforUpdate() {},
  698. //生命周期-更新之后
  699. updated() {},
  700. //生命周期-销毁之前
  701. beforeDestory() {},
  702. //生命周期-销毁完成
  703. destoryed() {},
  704. //如果页面有keep-alive缓存功能,这个函数会触发
  705. activated() {},
  706. };
  707. </script>
  708. <style lang="scss" scoped>
  709. /* @import url(); 引入css类 */
  710. .TextbookDetail {
  711. // height: 100%;
  712. .price_1 {
  713. font-style: normal;
  714. font-weight: 600;
  715. font-size: 24px;
  716. line-height: 150%;
  717. color: #ffffff;
  718. .num1 {
  719. font-size: 24px;
  720. }
  721. .num2 {
  722. font-size: 16px;
  723. }
  724. }
  725. .nav {
  726. background: url("../assets/textBookDetail/Homebg2.png") no-repeat center;
  727. background-size: 100% 100%;
  728. // height: 60px;
  729. border-bottom-left-radius: 20px;
  730. border-bottom-right-radius: 20px;
  731. position: relative;
  732. .shade {
  733. position: absolute;
  734. top: 0;
  735. width: 100%;
  736. height: 100%;
  737. background: rgba(0, 0, 0, 0.5);
  738. display: flex;
  739. color: #fff;
  740. font-weight: bold;
  741. font-size: 18px;
  742. justify-content: space-around;
  743. align-items: center;
  744. .el-menu-demo {
  745. background: rgba(0, 0, 0, 0);
  746. }
  747. // 取消组件默认的样式
  748. .el-menu.el-menu--horizontal {
  749. border-bottom: none;
  750. li:hover {
  751. background: none;
  752. }
  753. li {
  754. background: none;
  755. }
  756. }
  757. .nav_title {
  758. text-align: left;
  759. }
  760. .seek {
  761. input {
  762. width: 450px;
  763. height: 46px;
  764. background: #979797;
  765. border: none;
  766. outline: none;
  767. color: white;
  768. font-size: 18px;
  769. opacity: 0.5;
  770. }
  771. img {
  772. position: relative;
  773. right: 40px;
  774. top: 8px;
  775. cursor: pointer;
  776. }
  777. }
  778. }
  779. }
  780. .headerone {
  781. // margin-top: 10px;
  782. }
  783. .main {
  784. min-height: 100%;
  785. padding-top: 52px;
  786. background: #e5e5e5;
  787. padding-bottom: 20px;
  788. .bookDetail {
  789. width: 1240px;
  790. margin: 0 auto;
  791. background: #6e767c;
  792. border-radius: 8px;
  793. display: flex;
  794. position: relative;
  795. overflow: hidden;
  796. padding: 40px;
  797. box-sizing: border-box;
  798. .img {
  799. margin-right: 32px;
  800. img {
  801. width: 168px;
  802. height: 224px;
  803. }
  804. }
  805. .rightUp {
  806. margin: 0;
  807. width: 72px;
  808. height: 72px;
  809. background: url("../assets/textBookDetail/Rectangle903.png");
  810. position: absolute;
  811. right: 0;
  812. top: 0;
  813. // text-align: right;
  814. span {
  815. display: inline-block;
  816. color: #fff;
  817. transform: rotateZ(45deg);
  818. position: absolute;
  819. left: 30px;
  820. top: 15px;
  821. }
  822. }
  823. .text {
  824. width: 900px;
  825. color: white;
  826. p {
  827. font-size: 16px;
  828. margin: 0;
  829. }
  830. .p1 {
  831. font-size: 40px;
  832. font-weight: normal;
  833. font-size: 40px;
  834. line-height: 150%;
  835. color: #ffffff;
  836. }
  837. > :not(.p1) {
  838. margin-top: 16px;
  839. }
  840. .p2 {
  841. font-weight: 600;
  842. font-size: 16px;
  843. line-height: 150%;
  844. color: #ffffff;
  845. }
  846. .p3 {
  847. font-weight: normal;
  848. font-size: 16px;
  849. line-height: 150%;
  850. color: #ffffff;
  851. }
  852. .price {
  853. font-size: 24px;
  854. .price_2 {
  855. font-size: 16px;
  856. }
  857. }
  858. .operation {
  859. display: flex;
  860. align-items: center;
  861. margin-top: 16px;
  862. }
  863. .get {
  864. min-width: 120px;
  865. height: 40px;
  866. background: #ff9900;
  867. border-radius: 4px;
  868. border: none;
  869. outline: none;
  870. color: white;
  871. font-size: 20px;
  872. margin-left: 30px;
  873. cursor: pointer;
  874. }
  875. .acquired {
  876. width: 120px;
  877. height: 40px;
  878. background: #d5d5d5;
  879. border-radius: 4px;
  880. border: none;
  881. outline: none;
  882. color: white;
  883. font-size: 16px;
  884. margin-left: 30px;
  885. cursor: pointer;
  886. }
  887. .enshrine {
  888. margin-left: 30px;
  889. img {
  890. width: 24px;
  891. cursor: pointer;
  892. }
  893. }
  894. }
  895. }
  896. .more {
  897. width: 1240px;
  898. margin: 0 auto;
  899. margin-top: 30px;
  900. .moreTitle {
  901. font-weight: 600;
  902. font-size: 20px;
  903. color: #000000;
  904. }
  905. .moreTitle::before {
  906. content: "|";
  907. background: #ff9900;
  908. color: #ff9900;
  909. margin-right: 16px;
  910. }
  911. .moreList {
  912. width: 1300px;
  913. margin: 0 auto;
  914. // margin-top: 20px;
  915. display: flex;
  916. flex-wrap: wrap;
  917. // overflow-y: hidden;
  918. // overflow-x: scroll;
  919. .moreOne {
  920. margin-right: 20px;
  921. margin-top: 20px;
  922. width: 598px;
  923. height: 236px;
  924. background: #ffffff;
  925. border-radius: 8px;
  926. display: flex;
  927. > div {
  928. margin-left: 32px;
  929. margin-top: 32px;
  930. img {
  931. width: 120px;
  932. height: 160px;
  933. }
  934. }
  935. .text {
  936. width: 390px;
  937. margin-right: 23px;
  938. > p:not(.p1) {
  939. font-size: 16px;
  940. color: #2c2c2c;
  941. opacity: 0.7;
  942. margin-top: 10px;
  943. }
  944. .p1 {
  945. font-weight: 600;
  946. font-size: 20px;
  947. color: #2c2c2c;
  948. }
  949. .operation {
  950. margin-top: 10px;
  951. text-align: right;
  952. }
  953. .get {
  954. min-width: 120px;
  955. height: 40px;
  956. background: #ff9900;
  957. border-radius: 4px;
  958. border: none;
  959. outline: none;
  960. color: white;
  961. font-size: 20px;
  962. margin-left: 30px;
  963. cursor: pointer;
  964. }
  965. .acquired {
  966. width: 120px;
  967. height: 40px;
  968. background: #d5d5d5;
  969. border-radius: 4px;
  970. border: none;
  971. outline: none;
  972. color: white;
  973. font-size: 16px;
  974. margin-left: 30px;
  975. cursor: pointer;
  976. }
  977. .price {
  978. font-size: 24px;
  979. .price_2 {
  980. font-size: 16px;
  981. }
  982. }
  983. }
  984. }
  985. }
  986. }
  987. .cutDownOrimg {
  988. width: 1240px;
  989. margin: 0 auto;
  990. margin-top: 24px;
  991. .sele {
  992. width: fit-content; //318px;
  993. height: 48px;
  994. background: #ebebeb;
  995. border-radius: 30px;
  996. color: #9f9f9f;
  997. font-size: 20px;
  998. display: flex;
  999. align-items: center;
  1000. > div {
  1001. width: 158px;
  1002. height: 48px;
  1003. border-radius: 30px;
  1004. line-height: 48px;
  1005. text-align: center;
  1006. cursor: pointer;
  1007. }
  1008. .select {
  1009. background: #ff9900;
  1010. color: white;
  1011. box-shadow: 0px 2px 8px rgba(255, 153, 0, 0.15);
  1012. }
  1013. }
  1014. }
  1015. .Catalogue {
  1016. margin: 24px auto;
  1017. width: 1240px;
  1018. height: 710px;
  1019. background: #ffffff;
  1020. display: flex;
  1021. .left {
  1022. width: 340px;
  1023. height: 710px;
  1024. border-right: 1px solid #d9d9d9;
  1025. .title {
  1026. width: 80%;
  1027. margin: 29px auto;
  1028. font-weight: 600;
  1029. font-size: 24px;
  1030. color: #000000;
  1031. cursor: pointer;
  1032. }
  1033. .subtitle {
  1034. width: 80%;
  1035. margin: 0 auto;
  1036. height: 44px;
  1037. line-height: 44px;
  1038. font-weight: bold;
  1039. font-size: 14px;
  1040. color: #000000;
  1041. cursor: pointer;
  1042. }
  1043. }
  1044. .right {
  1045. width: 860px;
  1046. height: 710px;
  1047. }
  1048. }
  1049. .Resources {
  1050. margin: 24px auto;
  1051. width: 1240px;
  1052. min-height: 710px;
  1053. // background: #ffffff;
  1054. // display: flex;
  1055. box-sizing: border-box;
  1056. padding: 20px 0;
  1057. div {
  1058. // height: 40px;
  1059. // margin: 12px 8px;
  1060. // border: 1px solid rgba(44, 44, 44, 0.15);
  1061. // border-radius: 4px;
  1062. // padding: 0 10px;
  1063. // display: flex;
  1064. // justify-content: center;
  1065. // align-items: center;
  1066. // cursor: pointer;
  1067. img {
  1068. width: 24px;
  1069. margin-right: 10px;
  1070. }
  1071. }
  1072. }
  1073. }
  1074. .resource-content {
  1075. width: 100%;
  1076. margin: 0 auto;
  1077. box-sizing: border-box;
  1078. padding: 26px 24px 8px;
  1079. background: #ffffff;
  1080. border-radius: 8px;
  1081. margin-bottom: 24px;
  1082. .video-title {
  1083. font-size: 24px;
  1084. line-height: 32px;
  1085. font-weight: 700;
  1086. margin-bottom: 40px;
  1087. margin-top: 0;
  1088. }
  1089. .video-list {
  1090. padding: 0 36px;
  1091. display: flex;
  1092. flex-wrap: wrap;
  1093. justify-content: flex-start;
  1094. list-style: none;
  1095. > li {
  1096. margin: 0 12px 16px 12px;
  1097. cursor: pointer;
  1098. .video-img {
  1099. // background: #ff9900;
  1100. position: relative;
  1101. width: 256px;
  1102. height: 144px;
  1103. border-radius: 8px;
  1104. margin-bottom: 8px;
  1105. overflow: hidden;
  1106. .video-bg {
  1107. width: 256px;
  1108. height: 144px;
  1109. border-radius: 8px;
  1110. }
  1111. .play-one {
  1112. position: absolute;
  1113. left: 108px;
  1114. top: 52px;
  1115. width: 40px;
  1116. height: 40px;
  1117. display: block;
  1118. margin: 0;
  1119. }
  1120. }
  1121. .video-name {
  1122. font-size: 16px;
  1123. line-height: 150%;
  1124. color: #000000;
  1125. word-break: break-all;
  1126. display: -webkit-box;
  1127. -webkit-box-orient: vertical;
  1128. -webkit-line-clamp: 2;
  1129. text-overflow: ellipsis;
  1130. overflow: hidden;
  1131. }
  1132. }
  1133. }
  1134. .PDF-list {
  1135. width: 1096px;
  1136. margin: 0 auto;
  1137. padding-bottom: 90px;
  1138. li {
  1139. border: 1px solid rgba(0, 0, 0, 0.1);
  1140. box-sizing: border-box;
  1141. border-radius: 8px;
  1142. display: flex;
  1143. padding: 8px 12px;
  1144. align-items: center;
  1145. margin-bottom: 8px;
  1146. b {
  1147. width: 24px;
  1148. font-size: 16px;
  1149. line-height: 24px;
  1150. font-weight: normal;
  1151. margin-right: 16px;
  1152. }
  1153. p {
  1154. margin: 0;
  1155. width: 920px;
  1156. cursor: pointer;
  1157. font-size: 16px;
  1158. line-height: 24px;
  1159. }
  1160. span {
  1161. width: 80px;
  1162. text-align: right;
  1163. }
  1164. img {
  1165. width: 16px;
  1166. margin-left: 16px;
  1167. cursor: pointer;
  1168. }
  1169. }
  1170. }
  1171. .audio-content {
  1172. padding: 0 28px;
  1173. margin: 0 auto 24px auto;
  1174. width: 1152px;
  1175. .audio-type {
  1176. margin-bottom: 10px;
  1177. }
  1178. .download {
  1179. display: flex;
  1180. justify-content: flex-start;
  1181. align-items: center;
  1182. .book-open {
  1183. width: fit-content;
  1184. margin-right: 16px;
  1185. border: 1px solid rgba(0, 0, 0, 0.1);
  1186. box-sizing: border-box;
  1187. border-radius: 8px;
  1188. padding: 8px 16px;
  1189. display: flex;
  1190. align-items: center;
  1191. cursor: pointer;
  1192. .book-open-text {
  1193. line-height: 24px;
  1194. }
  1195. }
  1196. }
  1197. }
  1198. .audio-line-box {
  1199. width: 100%;
  1200. height: 56px;
  1201. box-sizing: border-box;
  1202. padding: 7px 12px;
  1203. background: #ffffff;
  1204. border: 1px solid rgba(0, 0, 0, 0.1);
  1205. box-sizing: border-box;
  1206. border-radius: 8px;
  1207. }
  1208. }
  1209. .noview-msg-box {
  1210. width: 100%;
  1211. position: absolute;
  1212. top: 200px;
  1213. left: 0;
  1214. z-index: 9999;
  1215. }
  1216. .noview-msg {
  1217. width: fit-content;
  1218. margin: 0 auto;
  1219. padding: 8px;
  1220. background: #fcf5f5;
  1221. border: 1px solid #e65959;
  1222. box-sizing: border-box;
  1223. border-radius: 4px;
  1224. font-weight: 400;
  1225. font-size: 12px;
  1226. line-height: 14px;
  1227. color: #e55959;
  1228. }
  1229. }
  1230. </style>
  1231. <style lang="scss">
  1232. .buyWindow {
  1233. .el-dialog__body {
  1234. padding: 20px 32px;
  1235. }
  1236. .el-dialog__header {
  1237. padding: 20px 32px 10px;
  1238. }
  1239. }
  1240. </style>