course-detail.vue 65 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247
  1. <template>
  2. <div class="goods-detail">
  3. <Header></Header>
  4. <section class="section">
  5. <div class="container">
  6. <div class="section__header">
  7. <div class="container">
  8. <el-breadcrumb separator="/">
  9. <el-breadcrumb-item :to="{ path: '/index' }"
  10. >首页</el-breadcrumb-item
  11. >
  12. <el-breadcrumb-item>商品详情</el-breadcrumb-item>
  13. </el-breadcrumb>
  14. </div>
  15. </div>
  16. <div class="section__body">
  17. <div class="container">
  18. <div class="goods-info">
  19. <div class="goods-info__header">
  20. <div class="img">
  21. <img
  22. :src="$tools.splitImgHost(goodsDetail.coverUrl, true)"
  23. alt=""
  24. />
  25. </div>
  26. <div class="text">
  27. <div class="title">
  28. {{ goodsDetail.goodsName }}
  29. </div>
  30. <div class="desc">
  31. {{ courseList.length }} 课程
  32. {{ goodsDetail.classHours }}学时
  33. </div>
  34. <div class="price" v-if="goodsDetail.standPrice">
  35. ${{ goodsDetail.standPrice | toFixed }}
  36. </div>
  37. <div class="btns">
  38. <div class="buynow" @click="buyNow()">立即购买</div>
  39. <div class="add" @click="addCart()">加入购物车</div>
  40. </div>
  41. </div>
  42. </div>
  43. <div class="goods-info__body">
  44. <el-tabs v-model="activeName">
  45. <el-tab-pane label="课程详情" name="1">
  46. <div class="detail" v-html="goodsDetail.pcDetailHtml"></div>
  47. </el-tab-pane>
  48. <el-tab-pane label="章节目录" name="2">
  49. <div class="goods-menu clearfix">
  50. <div class="left-box">
  51. <div class="left-box__body">
  52. <div
  53. class="course-list-item"
  54. v-for="(course, index) in courseList"
  55. :key="index"
  56. >
  57. <div
  58. class="course-list-item__title"
  59. @click="openCourse(course)"
  60. >
  61. <i
  62. :class="{
  63. 'el-icon-caret-right': !course.showList,
  64. 'el-icon-caret-bottom': course.showList,
  65. }"
  66. ></i>
  67. {{ course.courseName }}
  68. </div>
  69. <template v-if="course.showList">
  70. <div
  71. class="item"
  72. v-for="(item, index) in course.list"
  73. :key="index"
  74. >
  75. <template v-if="item.type == 1">
  76. <div
  77. class="item__title"
  78. @click="openModule(item)"
  79. >
  80. <i
  81. :class="{
  82. 'el-icon-caret-right': !item.showList,
  83. 'el-icon-caret-bottom': item.showList,
  84. }"
  85. ></i>
  86. {{ item.name }}
  87. </div>
  88. <div class="item__content">
  89. <div
  90. class="bank-chapter"
  91. v-if="item.showList"
  92. >
  93. <div
  94. class="bank-chapter__item"
  95. v-for="(
  96. chapter, chapterIndex
  97. ) in item.list"
  98. :key="chapterIndex"
  99. >
  100. <div
  101. class="bank-chapter__item__text"
  102. @click="openChapter(chapter)"
  103. >
  104. <i
  105. :class="{
  106. 'el-icon-caret-right':
  107. !chapter.showList,
  108. 'el-icon-caret-bottom':
  109. chapter.showList,
  110. }"
  111. ></i
  112. >{{ chapter.name }}
  113. </div>
  114. <div
  115. class="bank-section"
  116. v-if="chapter.showList"
  117. >
  118. <div
  119. class="bank-section__item"
  120. v-for="(
  121. section, sectionIndex
  122. ) in chapter.list"
  123. :key="sectionIndex"
  124. >
  125. <div
  126. class="bank-section__item__text"
  127. >
  128. {{ section.name }}
  129. </div>
  130. <div
  131. v-if="section.tryListen"
  132. @click="toDo(section)"
  133. class="btn"
  134. >
  135. 试看
  136. </div>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. </template>
  143. <template v-if="item.type == 2">
  144. <div class="item__content">
  145. <div class="bank-chapter">
  146. <div class="bank-chapter__item">
  147. <div
  148. class="bank-chapter__item__text"
  149. @click="openChapter(item)"
  150. >
  151. <i
  152. :class="{
  153. 'el-icon-caret-right':
  154. !item.showList,
  155. 'el-icon-caret-bottom':
  156. item.showList,
  157. }"
  158. ></i
  159. >{{ item.name }}
  160. </div>
  161. <div
  162. class="bank-section"
  163. v-if="item.showList"
  164. >
  165. <div
  166. class="bank-section__item"
  167. v-for="(
  168. section, sectionIndex
  169. ) in item.list"
  170. :key="sectionIndex"
  171. >
  172. <div
  173. class="bank-section__item__text"
  174. >
  175. {{ section.name }}
  176. </div>
  177. <div
  178. v-if="section.tryListen"
  179. @click="toDo(section)"
  180. class="btn"
  181. >
  182. 试看
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187. </div>
  188. </div>
  189. </template>
  190. <template v-if="item.type == 3">
  191. <div class="item__content">
  192. <div class="bank-section">
  193. <div class="bank-section__item">
  194. <div class="bank-section__item__text">
  195. {{ item.name }}
  196. </div>
  197. <div
  198. v-if="item.tryListen"
  199. @click="toDo(item)"
  200. class="btn"
  201. >
  202. 试看
  203. </div>
  204. </div>
  205. </div>
  206. </div>
  207. </template>
  208. </div>
  209. </template>
  210. </div>
  211. </div>
  212. </div>
  213. <div class="right-box">
  214. <div class="title">
  215. 推荐题库
  216. <span class="more">更多></span>
  217. </div>
  218. <ul class="list">
  219. <li
  220. class="course-item"
  221. v-for="(item, index) in 5"
  222. :key="index"
  223. @click="goodsDetail()"
  224. >
  225. <div class="course-item__img">
  226. <div class="note">2022</div>
  227. </div>
  228. <div class="course-item__title">
  229. 2022年二建建设工程法规及相关知识(黄金基础班)
  230. </div>
  231. <div class="course-item__desc">
  232. <div class="price">¥100</div>
  233. <a class="add">加购物车</a>
  234. </div>
  235. </li>
  236. </ul>
  237. </div>
  238. </div>
  239. </el-tab-pane>
  240. <el-tab-pane label="学员须知" name="3">
  241. {{ goodsDetail.buyNote }}
  242. </el-tab-pane>
  243. </el-tabs>
  244. </div>
  245. </div>
  246. </div>
  247. </div>
  248. <div class="section__footer">
  249. <div class="recommend">
  250. <div class="recommend__header">
  251. <div class="title">相关推荐</div>
  252. </div>
  253. <div class="recommend__body">
  254. <ul class="list clearfix">
  255. <li
  256. class="recommend-item"
  257. v-for="(item, index) in 4"
  258. :key="index"
  259. >
  260. <div class="recommend-item__img">
  261. <div class="note">2022</div>
  262. </div>
  263. <div class="recommend-item__title">
  264. 2022年二建建设工程法规及相关知识(黄金基础班)
  265. </div>
  266. <div class="recommend-item__desc">
  267. <div class="price">¥100</div>
  268. <a class="add">加购物车</a>
  269. </div>
  270. </li>
  271. </ul>
  272. </div>
  273. <div class="recommend__footer">
  274. <div class="btn">查看更多</div>
  275. </div>
  276. </div>
  277. </div>
  278. </div>
  279. </section>
  280. <el-dialog
  281. width="800px"
  282. class="video-modal"
  283. :visible.sync="videoModalShow"
  284. :close-on-click-modal="false"
  285. :close-on-press-escape="false"
  286. :show-close="false"
  287. >
  288. <div class="video-modal__content">
  289. <a class="video-modal__close" @click="videoModalShow = false">X</a>
  290. <div class="video-modal__header">课程试看</div>
  291. <div class="video-modal__body">
  292. <div class="video">
  293. <div class="video__title">1、这是课程的第一节试看标题</div>
  294. <div class="video__wrap">
  295. <div v-show="vid" id="player"></div>
  296. <div v-show="vidzb" id="playerzb"></div>
  297. </div>
  298. </div>
  299. </div>
  300. </div>
  301. </el-dialog>
  302. <el-dialog
  303. width="800px"
  304. class="select-class"
  305. :visible.sync="selectClassModal"
  306. >
  307. <div class="select-class__content">
  308. <div
  309. class="selection"
  310. v-if="
  311. goodsDetail.templateType == 'class' && goodsDetail.goodsType == 1
  312. "
  313. >
  314. <el-select
  315. class="select"
  316. v-model="gradeId"
  317. placeholder="请选择班级"
  318. size="small"
  319. @click.native="selectClick(goodsDetail, 'class')"
  320. >
  321. <el-option
  322. v-for="item in gradeList"
  323. :key="item.gradeId"
  324. :label="
  325. item.classEndTime
  326. ? `${item.className} 有效期至:${$tools.timestampToTime(
  327. item.classEndTime
  328. )},本班还剩${$tools.GetRTime(
  329. item.classEndTime
  330. )}天将结束学习`
  331. : `${item.className}`
  332. "
  333. :value="item.gradeId"
  334. >
  335. </el-option>
  336. </el-select>
  337. </div>
  338. <div
  339. class="selection"
  340. v-if="
  341. goodsDetail.templateType == 'apply' && goodsDetail.goodsType == 1
  342. "
  343. >
  344. <el-select
  345. v-model="educationId"
  346. placeholder="请选择考期"
  347. size="small"
  348. @click.native="selectClick(goodsDetail, 'exam')"
  349. >
  350. <el-option
  351. v-for="item in examineList"
  352. :key="item.educationId"
  353. :label="item.examineName"
  354. :value="item.educationId"
  355. >
  356. </el-option>
  357. </el-select>
  358. <el-cascader
  359. size="small"
  360. :props="props"
  361. ref="cascader"
  362. :options="provinceList"
  363. v-model="examArea"
  364. @change="areaChange(goodsDetail)"
  365. clearable
  366. placeholder="请选择报考地区"
  367. ></el-cascader>
  368. </div>
  369. </div>
  370. <div slot="footer" class="dialog-footer">
  371. <el-button type="primary" @click="pay">确 定</el-button>
  372. </div>
  373. </el-dialog>
  374. <ToolBar></ToolBar>
  375. <Footer></Footer>
  376. </div>
  377. </template>
  378. <script>
  379. import Footer from "@/components/footer/index";
  380. import Header from "@/components/header/index";
  381. import ToolBar from "@/components/toolbar/index";
  382. import { mapMutations } from "vuex";
  383. export default {
  384. name: "GoodsDetail",
  385. components: {
  386. Footer,
  387. Header,
  388. ToolBar,
  389. },
  390. data() {
  391. return {
  392. questionList: [],
  393. goodsExamConfig: [],
  394. goodsDetail: {},
  395. courseList: [],
  396. goodsId: "",
  397. checked: false,
  398. textarea: "",
  399. selectClassModal: false,
  400. videoModalShow: false,
  401. activeName: "1",
  402. questionModalData: {
  403. activeName: "0",
  404. num: 0, //试做题数
  405. current: 0,
  406. },
  407. judge: ["错误", "正确"],
  408. ast: ["A", "B", "C", "D", "E", "F", "G"],
  409. goodsAuditionConfigIdList: [], //试听列表
  410. listenConfigList: [],
  411. vid: "",
  412. vidzb: "",
  413. player: "",
  414. playerzb: "",
  415. activeId: "", //当前选中ID
  416. vodPlayerJs: "https://player.polyv.net/script/player.js",
  417. playerJs:
  418. "https://player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js",
  419. uidzb: "egsxlptzdq",
  420. gradeList: [],
  421. gradeId: "",
  422. examineList: [],
  423. examArea: [],
  424. educationId: "",
  425. props: {
  426. lazy: true,
  427. lazyLoad: this.lazyLoad,
  428. },
  429. applyAreas: [],
  430. provinceList: [],
  431. };
  432. },
  433. mounted() {
  434. this.goodsId = this.$route.params.goodsId;
  435. this.getGoodsDetail();
  436. this.goodsCourseList();
  437. if (this.$tools.isLogin()) {
  438. this.getProvinceList();
  439. }
  440. },
  441. methods: {
  442. ...mapMutations(["setCheckGoodsList", "setCurrentRouter"]),
  443. /**
  444. * 点击课程大目录
  445. */
  446. openCourse(course) {
  447. course.showList = !course.showList;
  448. if (!course.list.length) {
  449. this.getMenuList(course);
  450. }
  451. },
  452. /**
  453. * 获取模块列表
  454. */
  455. getMenuList(item) {
  456. this.$request.menuList({ courseId: item.courseId }).then((res) => {
  457. for (let i = 0; i < res.rows.length; i++) {
  458. let item = res.rows[i];
  459. item.showList = false;
  460. item.id = item.menuId;
  461. item.name = item.menuName;
  462. if (item.type == 3) {
  463. //判断是否试听
  464. item.tryListen = false;
  465. if (this.goodsAuditionConfigIdList.indexOf(item.id) !== -1) {
  466. item.tryListen = true;
  467. }
  468. } else {
  469. item.list = [];
  470. }
  471. }
  472. item.list = res.rows;
  473. });
  474. },
  475. /**
  476. * @param {Object}
  477. * 单选点击确认
  478. */
  479. radioSelect(question, questionIndex, optionsId) {
  480. if (this.questionList[questionIndex].ques) return;
  481. this.$set(this.questionList[questionIndex], "ques", optionsId);
  482. },
  483. /**
  484. * @param {Object}
  485. * 案例单选点击
  486. */
  487. radioSelectChild(questionIndex, jsonIndex, optionsId) {
  488. if (this.questionList[questionIndex].ques[jsonIndex]) return;
  489. this.$set(this.questionList[questionIndex].ques, jsonIndex, optionsId);
  490. },
  491. /**
  492. * 多选点击确认
  493. */
  494. checkboxSubmit(question, questionIndex) {
  495. if (this.questionList[questionIndex].ques) return;
  496. let arr = [];
  497. this.questionList[questionIndex].jsonStr.forEach((item) => {
  498. if (item.checked) {
  499. arr.push(item.optionsId);
  500. }
  501. });
  502. if (!arr.length) {
  503. this.$message({
  504. type: "warning",
  505. message: "请选择答案",
  506. });
  507. return;
  508. }
  509. this.$set(this.questionList[questionIndex], "ques", arr);
  510. },
  511. /**
  512. * @param {Object}
  513. * 案例多选确认
  514. */
  515. checkboxSubmitChild(questionIndex, ansIndex) {
  516. if (this.questionList[questionIndex].ques[ansIndex]) return;
  517. let arr = [];
  518. this.questionList[questionIndex].jsonStr[ansIndex].optionsList.forEach(
  519. (item) => {
  520. if (item.checked) {
  521. arr.push(item.optionsId);
  522. }
  523. }
  524. );
  525. if (!arr.length) {
  526. this.$message({
  527. type: "warning",
  528. message: "请选择答案",
  529. });
  530. return;
  531. }
  532. this.$set(this.questionList[questionIndex].ques, ansIndex, arr);
  533. },
  534. /**
  535. * 判断点击确认
  536. */
  537. judgeSelect(question, questionIndex, index) {
  538. if (question.ques) return;
  539. this.$set(this.questionList[questionIndex], "ques", index + "");
  540. },
  541. judgeSelectChild(questionIndex, jsonIndex, index) {
  542. console.log(this.questionList[questionIndex].ques[jsonIndex]);
  543. if (this.questionList[questionIndex].ques[jsonIndex]) return;
  544. this.$set(this.questionList[questionIndex].ques, jsonIndex, index + "");
  545. },
  546. /**
  547. * 上传图片
  548. */
  549. uploadImg(e, question, questionIndex) {
  550. var file = e.target.files[0];
  551. if (file.size > 2 * 1024 * 1024) {
  552. this.$message.warn("图片不得大于2000kb");
  553. return;
  554. }
  555. var type = e.target.value.toLowerCase().split(".").splice(-1);
  556. if (
  557. type[0] != "jpg" &&
  558. type[0] != "png" &&
  559. type[0] != "jpeg" &&
  560. type[0] != "gif"
  561. ) {
  562. this.$message.error("上传格式需为:.jpg/.png/.jpeg/gif");
  563. e.target.value = "";
  564. return;
  565. }
  566. this.$upload.upload(file, 0).then((res) => {
  567. question.ansText.imageList.push(res);
  568. });
  569. },
  570. /**
  571. * 案例上传图片
  572. */
  573. uploadImgChild(e, questionIndex, jsonIndex) {
  574. var file = e.target.files[0];
  575. if (file.size > 2 * 1024 * 1024) {
  576. this.$message.warn("图片不得大于2000kb");
  577. return;
  578. }
  579. var type = e.target.value.toLowerCase().split(".").splice(-1);
  580. if (
  581. type[0] != "jpg" &&
  582. type[0] != "png" &&
  583. type[0] != "jpeg" &&
  584. type[0] != "gif"
  585. ) {
  586. this.$message.error("上传格式需为:.jpg/.png/.jpeg/gif");
  587. e.target.value = "";
  588. return;
  589. }
  590. this.$upload.upload(file, 0).then((res) => {
  591. this.questionList[questionIndex].jsonStr[
  592. jsonIndex
  593. ].ansText.imageList.push(res);
  594. });
  595. },
  596. isOver(item, index) {
  597. if (this.questionList[index].ques) {
  598. if (item.type == 4) {
  599. //案例题
  600. let isOver = item.jsonStr.every((jsonItem, indexs) => {
  601. if (
  602. jsonItem.type == 1 ||
  603. jsonItem.type == 2 ||
  604. jsonItem.type == 3
  605. ) {
  606. if (item.ques[indexs]) {
  607. return true;
  608. } else {
  609. return false;
  610. }
  611. } else if (jsonItem.type == 5) {
  612. if (
  613. item.ques[indexs] &&
  614. (item.ques[indexs].text || item.ques[indexs].imageList.length)
  615. ) {
  616. console.log("chil");
  617. return true;
  618. } else {
  619. return false;
  620. }
  621. }
  622. });
  623. if (isOver) {
  624. return true;
  625. } else {
  626. return false;
  627. }
  628. } else if (item.type == 5) {
  629. //简答题
  630. //每一项都相等
  631. if (item.ques && (item.ques.imageList.length || item.ques.text)) {
  632. return true;
  633. }
  634. //判断
  635. } else {
  636. return false;
  637. }
  638. } else {
  639. return false;
  640. }
  641. },
  642. ansSubmit(question, questionIndex) {
  643. if (!question.ansText.text && !question.ansText.imageList.length) {
  644. this.$message({
  645. type: "warning",
  646. message: "请输入内容或上传图片",
  647. });
  648. return;
  649. }
  650. question.ques.imageList = question.ansText.imageList;
  651. question.ques.text = question.ansText.text;
  652. console.log(question.ques);
  653. },
  654. ansSubmitChild(question, questionIndex, jsonIndex) {
  655. if (
  656. !this.questionList[questionIndex].jsonStr[jsonIndex].ansText.text &&
  657. !this.questionList[questionIndex].jsonStr[jsonIndex].ansText.imageList
  658. .length
  659. ) {
  660. this.$message({
  661. type: "warning",
  662. message: "请输入内容或上传图片",
  663. });
  664. return;
  665. }
  666. this.$set(this.questionList[questionIndex].ques, jsonIndex, {
  667. imageList:
  668. this.questionList[questionIndex].jsonStr[jsonIndex].ansText
  669. .imageList || [],
  670. text:
  671. this.questionList[questionIndex].jsonStr[jsonIndex].ansText.text ||
  672. "",
  673. });
  674. },
  675. /**
  676. * 试看
  677. */
  678. toDo(section) {
  679. this.videoModalShow = true;
  680. this.initVideo(section);
  681. },
  682. async initVideo(option) {
  683. await this.clears();
  684. console.log(option);
  685. if (option.sectionType === 2) {
  686. this.vidzb = option.liveUrl;
  687. this.loadPlayerScriptzb(this.loadPlayerzb);
  688. } else {
  689. this.vid = option.recordingUrl;
  690. this.loadPlayerScript(this.loadPlayer);
  691. }
  692. },
  693. loadPlayerzb() {
  694. const polyvLivePlayer = window.polyvLivePlayer;
  695. this.playerzb = polyvLivePlayer({
  696. wrap: "#playerzb",
  697. width: 800,
  698. height: 450,
  699. uid: this.uidzb,
  700. vid: this.vidzb,
  701. });
  702. },
  703. loadPlayer() {
  704. var self = this;
  705. const polyvPlayer = window.polyvPlayer;
  706. self.$request.obtainpolyvvideosign(self.vid).then((res) => {
  707. self.player = polyvPlayer({
  708. wrap: "#player",
  709. width: 800,
  710. height: 450,
  711. vid: self.vid,
  712. teaser_show: 0,
  713. ts: res.data.ts,
  714. sign: res.data.sign,
  715. playsafe: function (vid, next) {
  716. next();
  717. },
  718. });
  719. });
  720. },
  721. /**
  722. * @param {String} 直播预览
  723. */
  724. loadPlayerScriptzb(callback) {
  725. if (!window.polyvLivePlayer) {
  726. const myScript = document.createElement("script");
  727. myScript.setAttribute("src", this.playerJs);
  728. myScript.onload = callback;
  729. document.body.appendChild(myScript);
  730. } else {
  731. callback();
  732. }
  733. },
  734. loadPlayerScript(callback) {
  735. if (!window.polyvPlayer) {
  736. const myScript = document.createElement("script");
  737. myScript.setAttribute("src", this.vodPlayerJs);
  738. myScript.onload = callback;
  739. document.body.appendChild(myScript);
  740. } else {
  741. callback();
  742. }
  743. },
  744. /**
  745. * @param {String} 关闭视频窗口-销毁实例
  746. */
  747. clears() {
  748. return new Promise((resolve, reject) => {
  749. this.vid = "";
  750. this.vidzb = "";
  751. if (this.player) {
  752. this.player.destroy();
  753. }
  754. if (this.playerzb) {
  755. this.playerzb.destroy();
  756. }
  757. resolve();
  758. });
  759. },
  760. changeIndex(index) {
  761. if (index <= this.questionModalData.num - 1) {
  762. this.questionModalData.current = index;
  763. } else {
  764. this.$message({
  765. type: "warning",
  766. message: "试做题目已经结束~",
  767. });
  768. }
  769. },
  770. nextQuestion() {
  771. if (this.questionModalData.current >= this.questionModalData.num - 1) {
  772. this.$message({
  773. type: "warning",
  774. message: "试做题目已经结束~",
  775. });
  776. return;
  777. } else {
  778. this.questionModalData.current++;
  779. }
  780. },
  781. prevQuestion() {
  782. if (this.questionModalData.current == 0) {
  783. return;
  784. } else {
  785. this.questionModalData.current--;
  786. }
  787. },
  788. isRight(item, index) {
  789. //单选
  790. if (this.questionList[index].ques) {
  791. if (item.type == 1) {
  792. console.log(
  793. this.questionList[index].ques == this.questionList[index].ans
  794. );
  795. return this.questionList[index].ques == this.questionList[index].ans;
  796. //多选
  797. } else if (item.type == 2) {
  798. //每一项都相等
  799. return this.questionList[index].ans.every((item, i) => {
  800. return item == this.questionList[index].ques[i];
  801. });
  802. //判断
  803. } else if (item.type == 3) {
  804. return this.questionList[index].ques == this.questionList[index].ans;
  805. } else {
  806. return false;
  807. }
  808. } else {
  809. return false;
  810. }
  811. },
  812. isWrong(item, index) {
  813. if (this.questionList[index].ques) {
  814. //单选
  815. if (item.type == 1) {
  816. return this.questionList[index].ques != this.questionList[index].ans;
  817. //多选
  818. } else if (item.type == 2) {
  819. //每一项都相等
  820. return this.questionList[index].ans.some((item, i) => {
  821. return item != this.questionList[index].ques[i];
  822. });
  823. //判断
  824. } else if (item.type == 3) {
  825. return this.questionList[index].ques != this.questionList[index].ans;
  826. } else {
  827. return false;
  828. }
  829. } else {
  830. return false;
  831. }
  832. },
  833. right(bankIndex, ansIndex, option) {
  834. if (
  835. this.questionList[bankIndex].ques[ansIndex] &&
  836. this.questionList[bankIndex].ans[ansIndex]
  837. ) {
  838. if (
  839. this.questionList[bankIndex].ques[ansIndex].indexOf(
  840. option.optionsId
  841. ) != -1 ||
  842. this.questionList[bankIndex].ans[ansIndex].indexOf(
  843. option.optionsId
  844. ) != -1
  845. ) {
  846. return true;
  847. } else {
  848. return false;
  849. }
  850. } else {
  851. return false;
  852. }
  853. },
  854. wrong(bankIndex, ansIndex, option) {
  855. if (
  856. this.questionList[bankIndex].ques[ansIndex] &&
  857. this.questionList[bankIndex].ans[ansIndex]
  858. ) {
  859. if (
  860. this.questionList[bankIndex].ques[ansIndex].indexOf(
  861. option.optionsId
  862. ) != -1 &&
  863. this.questionList[bankIndex].ans[ansIndex].indexOf(
  864. option.optionsId
  865. ) == -1
  866. ) {
  867. return true;
  868. } else {
  869. return false;
  870. }
  871. } else {
  872. return false;
  873. }
  874. },
  875. /**
  876. * 获取已经回答的题目数
  877. * hasSpecail (是否包含简答和案例)
  878. */
  879. questionOverNum(hasSpecail) {
  880. let count = 0;
  881. this.questionList.forEach((item) => {
  882. if (item.type == 1 || item.type == 2 || item.type == 3) {
  883. if (item.ques) {
  884. count++;
  885. }
  886. } else if (item.type == 4) {
  887. //案例题
  888. if (hasSpecail) {
  889. let isOver = item.jsonStr.every((jsonItem, index) => {
  890. if (
  891. jsonItem.type == 1 ||
  892. jsonItem.type == 2 ||
  893. jsonItem.type == 3
  894. ) {
  895. if (item.ques[index]) {
  896. return true;
  897. } else {
  898. return false;
  899. }
  900. } else if (jsonItem.type == 5) {
  901. if (
  902. item.ques[index] &&
  903. (item.ques[index].text || item.ques[index].imageList.length)
  904. ) {
  905. return true;
  906. } else {
  907. return false;
  908. }
  909. }
  910. });
  911. if (isOver) {
  912. count++;
  913. console.log(item, 444);
  914. }
  915. }
  916. } else if (item.type == 5) {
  917. //简答题
  918. if (hasSpecail) {
  919. if (item.ques && (item.ques.text || item.ques.imageList.length)) {
  920. console.log(5, item);
  921. count++;
  922. }
  923. }
  924. }
  925. });
  926. return count;
  927. },
  928. /**
  929. * 展开模块卷
  930. */
  931. openModule(Module) {
  932. Module.showList = !Module.showList;
  933. if (!Module.list.length) {
  934. this.getChapterList(Module);
  935. }
  936. },
  937. getChapterList(Module) {
  938. this.$request.chapterList(Module.id).then((res) => {
  939. for (let i = 0; i < res.data.length; i++) {
  940. let item = res.data[i];
  941. item.id = item.chapterId;
  942. item.showList = false;
  943. item.list = [];
  944. item.menuType = 2;
  945. }
  946. Module.list = res.data;
  947. });
  948. },
  949. /**
  950. * 展开章卷
  951. */
  952. openChapter(chapter) {
  953. chapter.showList = !chapter.showList;
  954. if (!chapter.list.length) {
  955. this.getSectionList(chapter);
  956. }
  957. },
  958. lazyLoad(node, resolve) {
  959. const { level } = node;
  960. console.log(node);
  961. if (level == 0) {
  962. } else if (level == 1) {
  963. this.$request.getCityList({ parentId: node.value }).then((res) => {
  964. const nodes = res.rows.map((item) => ({
  965. value: item.areaId,
  966. label: `${item.areaName}`,
  967. leaf: level >= 1,
  968. }));
  969. resolve(nodes);
  970. });
  971. }
  972. },
  973. getSectionList(chapter) {
  974. this.$request.sectionList(chapter.id).then((res) => {
  975. for (let i = 0; i < res.data.length; i++) {
  976. let item = res.data[i];
  977. item.id = item.sectionId;
  978. item.menuType = 3;
  979. //判断是否试听
  980. item.tryListen = false;
  981. if (this.goodsAuditionConfigIdList.indexOf(item.id) !== -1) {
  982. item.tryListen = true;
  983. }
  984. }
  985. chapter.list = res.data;
  986. });
  987. },
  988. selectClick(goodsDetail, type) {
  989. if (type == "class") {
  990. //选择班级
  991. if (!this.gradeList.length) {
  992. this.$request
  993. .goodsGradeList({ goodsId: goodsDetail.goodsId })
  994. .then((res) => {
  995. this.gradeList = res.rows;
  996. if (this.gradeList.length == 0) {
  997. let item = {
  998. className: "系统分班",
  999. gradeId: 0,
  1000. };
  1001. this.gradeList.push(item);
  1002. }
  1003. });
  1004. }
  1005. } else if (type == "apply") {
  1006. //选择考试地点
  1007. } else if (type == "exam") {
  1008. //选择考期
  1009. this.$request
  1010. .getExamineList({ projectId: goodsDetail.projectId })
  1011. .then((res) => {
  1012. this.examineList = res.rows;
  1013. });
  1014. }
  1015. },
  1016. /**
  1017. * 获取所有省份
  1018. */
  1019. getProvinceList() {
  1020. this.$request.getProvinceList().then((res) => {
  1021. this.provinceList = res.rows.map((item) => ({
  1022. value: item.areaId,
  1023. label: `${item.areaName}`,
  1024. leaf: false,
  1025. }));
  1026. });
  1027. },
  1028. areaChange() {
  1029. let node = this.$refs["cascader"].getCheckedNodes()[0]; //选中的根节点
  1030. console.log(node);
  1031. this.applyAreas = {
  1032. areaName: node.parent.label,
  1033. areaId: node.parent.value,
  1034. cityId: node.value,
  1035. cityName: node.label,
  1036. };
  1037. },
  1038. buyNow() {
  1039. if (this.$tools.isLogin()) {
  1040. this.selectClassModal = true;
  1041. } else {
  1042. this.setCurrentRouter(this.$route);
  1043. this.$router.push({
  1044. path: "/login",
  1045. });
  1046. }
  1047. },
  1048. pay() {
  1049. if (
  1050. this.goodsDetail.templateType == "class" &&
  1051. this.goodsDetail.goodsType == 1
  1052. ) {
  1053. if (!this.gradeId && this.gradeId !== 0) {
  1054. this.$message({
  1055. message: "请选择班级",
  1056. type: "warning",
  1057. });
  1058. return;
  1059. }
  1060. }
  1061. if (
  1062. this.goodsDetail.templateType == "apply" &&
  1063. this.goodsDetail.goodsType == 1
  1064. ) {
  1065. // if (!item.applyAreas.areaName) {
  1066. // uni.showModal({
  1067. // title: '提示',
  1068. // content: '请选择报考地区',
  1069. // showCancel: false
  1070. // });
  1071. // return false;
  1072. // }
  1073. if (!this.educationId) {
  1074. this.$message({
  1075. message: "请选择考期",
  1076. type: "warning",
  1077. });
  1078. return false;
  1079. }
  1080. }
  1081. let selectGoodsList = JSON.parse(JSON.stringify([this.goodsDetail]));
  1082. selectGoodsList.forEach((item) => {
  1083. if (item.goodsType == 1) {
  1084. if (item.templateType == "class") {
  1085. let goodsInputData = {
  1086. type: "class",
  1087. gradeId: this.gradeId,
  1088. gradeJson: JSON.stringify(
  1089. this.gradeList.find((grade) => grade.gradeId == this.gradeId)
  1090. ),
  1091. };
  1092. item.goodsInputData = goodsInputData;
  1093. }
  1094. if (item.templateType == "apply") {
  1095. let goodsInputData = {
  1096. type: "apply",
  1097. applyAreasJson: JSON.stringify(this.applyAreas),
  1098. examDateJson: JSON.stringify(
  1099. this.examineList.find(
  1100. (exam) => exam.educationId == this.educationId
  1101. )
  1102. ),
  1103. };
  1104. item.goodsInputData = goodsInputData;
  1105. }
  1106. }
  1107. });
  1108. this.setCheckGoodsList(selectGoodsList);
  1109. this.$router.push({
  1110. path: "/payment",
  1111. });
  1112. },
  1113. addCart() {
  1114. if (!this.$tools.isLogin()) {
  1115. this.setCurrentRouter(this.$route);
  1116. this.$router.push({
  1117. path: "/login",
  1118. });
  1119. return;
  1120. }
  1121. this.$request
  1122. .addCart({ goodsId: this.goodsId })
  1123. .then((res) => {
  1124. this.$message({
  1125. message: "加入购物车成功",
  1126. type: "success",
  1127. });
  1128. })
  1129. .catch((err) => {
  1130. if (err.code == 500) {
  1131. this.$message({
  1132. message: err.msg,
  1133. type: "warning",
  1134. });
  1135. }
  1136. });
  1137. },
  1138. /**
  1139. * 获取商品详情
  1140. */
  1141. getGoodsDetail() {
  1142. this.$request.commonGoodsDetail(this.goodsId).then((res) => {
  1143. if (res.data.pcDetailHtml) {
  1144. res.data.pcDetailHtml = res.data.pcDetailHtml.replace(
  1145. /<img/gi,
  1146. '<img style="max-width:100%;"'
  1147. );
  1148. }
  1149. this.goodsDetail = res.data;
  1150. this.goodsExamConfig = JSON.parse(res.data.goodsExamConfig);
  1151. // this.courseBusiness();
  1152. if (this.goodsDetail.goodsAuditionConfig) {
  1153. this.listenConfigList = JSON.parse(
  1154. this.goodsDetail.goodsAuditionConfig
  1155. );
  1156. for (var itemChild of this.listenConfigList) {
  1157. this.goodsAuditionConfigIdList.push(itemChild.sectionId); //存储试听节ID
  1158. }
  1159. }
  1160. });
  1161. },
  1162. /**
  1163. * 是否是试做
  1164. */
  1165. isTest(id) {
  1166. return this.goodsExamConfig.find((item) => item.examId == id);
  1167. },
  1168. /**
  1169. * 获取课程章节列表
  1170. */
  1171. goodsCourseList() {
  1172. this.$request.goodsCourseList(this.goodsId).then((res) => {
  1173. res.rows.forEach((item) => {
  1174. item.showList = false;
  1175. item.list = [];
  1176. });
  1177. this.courseList = res.rows;
  1178. });
  1179. },
  1180. collect() {
  1181. this.$message({
  1182. message: "试做题目,不支持收藏~",
  1183. type: "warning",
  1184. });
  1185. return;
  1186. },
  1187. examSubmit() {
  1188. this.$confirm("当前为试用做题不可交卷,购买题卷后方可交卷", "提示", {
  1189. confirmButtonText: "继续作答",
  1190. cancelButtonText: "返回详情",
  1191. closeOnClickModal: false,
  1192. closeOnPressEscape: false,
  1193. distinguishCancelAndClose: false,
  1194. showClose: false,
  1195. })
  1196. .then((_) => {})
  1197. .catch((_) => {
  1198. this.questionModalShow = false;
  1199. });
  1200. },
  1201. },
  1202. };
  1203. </script>
  1204. <!-- Add "scoped" attribute to limit CSS to this component only -->
  1205. <style scoped lang="scss">
  1206. .goods-detail {
  1207. .section {
  1208. &__header {
  1209. height: 40px;
  1210. display: flex;
  1211. align-items: center;
  1212. padding: 0 20px;
  1213. }
  1214. &__body {
  1215. .goods-info {
  1216. &__header {
  1217. width: 100%;
  1218. height: 288px;
  1219. background: #f5f7fa;
  1220. border-radius: 10px;
  1221. padding: 20px;
  1222. display: flex;
  1223. .img {
  1224. width: 442px;
  1225. height: 248px;
  1226. border-radius: 10px;
  1227. overflow: hidden;
  1228. img {
  1229. max-width: 100%;
  1230. max-height: 100%;
  1231. width: 100%;
  1232. height: 100%;
  1233. }
  1234. }
  1235. .text {
  1236. flex: 1;
  1237. margin-left: 24px;
  1238. .title {
  1239. font-size: 18px;
  1240. font-family: Microsoft YaHei;
  1241. font-weight: bold;
  1242. color: #333333;
  1243. line-height: 24px;
  1244. }
  1245. .desc {
  1246. padding: 1px 5px;
  1247. display: inline-block;
  1248. border: 1px solid #333333;
  1249. border-radius: 4px;
  1250. font-size: 12px;
  1251. font-family: Microsoft YaHei;
  1252. font-weight: 400;
  1253. color: #333333;
  1254. }
  1255. .price {
  1256. margin-top: 10px;
  1257. font-size: 24px;
  1258. font-family: Microsoft YaHei;
  1259. font-weight: bold;
  1260. color: #ff2d55;
  1261. line-height: 24px;
  1262. }
  1263. .btns {
  1264. margin-top: 154px;
  1265. display: flex;
  1266. .buynow {
  1267. cursor: pointer;
  1268. margin-right: 16px;
  1269. width: 160px;
  1270. height: 40px;
  1271. background: #3f8dfd;
  1272. border-radius: 20px;
  1273. text-align: center;
  1274. line-height: 40px;
  1275. color: #fff;
  1276. }
  1277. .add {
  1278. cursor: pointer;
  1279. width: 128px;
  1280. height: 40px;
  1281. background: #ffffff;
  1282. border: 1px solid #3f8dfd;
  1283. border-radius: 20px;
  1284. text-align: center;
  1285. line-height: 40px;
  1286. color: #3f8dfd;
  1287. }
  1288. }
  1289. }
  1290. }
  1291. &__body {
  1292. /deep/ .el-tabs__item {
  1293. padding: 0 20px !important;
  1294. height: 80px;
  1295. line-height: 80px;
  1296. }
  1297. .detail {
  1298. img {
  1299. max-width: 100% !important;
  1300. }
  1301. }
  1302. .goods-img {
  1303. width: 100%;
  1304. }
  1305. .goods-menu {
  1306. margin-top: 15px;
  1307. .left-box {
  1308. width: 948px;
  1309. float: left;
  1310. &__body {
  1311. .course-list-item {
  1312. margin-top: 24px;
  1313. padding: 16px;
  1314. background: #f5f7fa;
  1315. border-radius: 10px;
  1316. &__title {
  1317. font-size: 18px;
  1318. color: #333;
  1319. font-weight: bold;
  1320. cursor: pointer;
  1321. }
  1322. .item {
  1323. overflow: hidden;
  1324. background: #fff;
  1325. margin-top: 12px;
  1326. &__title {
  1327. padding: 10px 0;
  1328. cursor: pointer;
  1329. font-size: 16px;
  1330. font-family: Microsoft YaHei;
  1331. font-weight: bold;
  1332. color: #333333;
  1333. .note {
  1334. display: inline-block;
  1335. margin-left: 20px;
  1336. width: 40px;
  1337. height: 24px;
  1338. border: 1px solid #ff3b30;
  1339. border-radius: 8px;
  1340. line-height: 22px;
  1341. color: #ff3b30;
  1342. text-align: center;
  1343. }
  1344. }
  1345. &__content {
  1346. background: #fff;
  1347. .bank-chapter {
  1348. margin-left: 4px;
  1349. &__item {
  1350. padding-top: 20px;
  1351. padding-bottom: 20px;
  1352. border-bottom: 1px solid #eeeeee;
  1353. font-size: 16px;
  1354. &__text {
  1355. cursor: pointer;
  1356. flex: 1;
  1357. }
  1358. }
  1359. }
  1360. .bank-section {
  1361. margin-left: 40px;
  1362. &__item {
  1363. padding-top: 20px;
  1364. padding-bottom: 20px;
  1365. border-bottom: 1px solid #eeeeee;
  1366. font-size: 16px;
  1367. display: flex;
  1368. &__text {
  1369. flex: 1;
  1370. }
  1371. .btn {
  1372. margin-right: 20px;
  1373. width: 40px;
  1374. height: 24px;
  1375. border: 1px solid #ff3b30;
  1376. border-radius: 8px;
  1377. line-height: 22px;
  1378. color: #ff3b30;
  1379. text-align: center;
  1380. cursor: pointer;
  1381. }
  1382. }
  1383. }
  1384. }
  1385. }
  1386. }
  1387. }
  1388. }
  1389. .right-box {
  1390. width: 323px;
  1391. float: right;
  1392. .title {
  1393. margin-left: 10px;
  1394. font-size: 16px;
  1395. font-family: Microsoft YaHei;
  1396. font-weight: 400;
  1397. color: #333333;
  1398. text-shadow: 0px 6px 6px rgba(85, 158, 255, 0.08);
  1399. position: relative;
  1400. .more {
  1401. font-size: 16px;
  1402. font-family: Microsoft YaHei;
  1403. font-weight: 400;
  1404. color: #999999;
  1405. position: absolute;
  1406. right: 10px;
  1407. top: 0;
  1408. }
  1409. }
  1410. .list {
  1411. .course-item {
  1412. margin: 110px 9px 0;
  1413. width: 300px;
  1414. height: 178px;
  1415. background: #ffffff;
  1416. box-shadow: 0px 10px 13px 3px rgba(63, 141, 253, 0.1);
  1417. border-radius: 10px;
  1418. position: relative;
  1419. background: #fff;
  1420. padding-top: 100px;
  1421. &__img {
  1422. width: 280px;
  1423. height: 178px;
  1424. background: #ffffff;
  1425. box-shadow: 0px 0px 9px 1px rgba(0, 0, 0, 0.08);
  1426. border-radius: 10px;
  1427. position: absolute;
  1428. left: 10px;
  1429. top: -78px;
  1430. background: rgba(122, 136, 246, 1);
  1431. overflow: hidden;
  1432. .note {
  1433. width: 80px;
  1434. height: 24px;
  1435. background: #d94404;
  1436. box-shadow: 0px 1px 1px 0px rgba(248, 78, 5, 0.4);
  1437. border-radius: 10px 0px 20px 0px;
  1438. text-align: center;
  1439. line-height: 24px;
  1440. color: #fff;
  1441. }
  1442. }
  1443. &__title {
  1444. margin: 0 8px;
  1445. font-size: 14px;
  1446. font-family: Microsoft YaHei;
  1447. font-weight: 400;
  1448. color: #333333;
  1449. line-height: 24px;
  1450. }
  1451. &__desc {
  1452. height: 32px;
  1453. position: absolute;
  1454. left: 0;
  1455. right: 0;
  1456. bottom: 0;
  1457. margin-left: 8px;
  1458. display: flex;
  1459. justify-content: space-between;
  1460. .price {
  1461. font-size: 18px;
  1462. font-family: Microsoft YaHei;
  1463. font-weight: bold;
  1464. color: #ff2d55;
  1465. line-height: 32px;
  1466. }
  1467. .add {
  1468. display: block;
  1469. width: 118px;
  1470. height: 32px;
  1471. line-height: 30px;
  1472. background: #f2f4f7;
  1473. border-radius: 10px 0px 10px 0px;
  1474. font-size: 16px;
  1475. color: #3f8dfd;
  1476. text-align: center;
  1477. &:hover {
  1478. background: #3f8dfd;
  1479. color: #f2f4f7;
  1480. }
  1481. }
  1482. }
  1483. }
  1484. }
  1485. }
  1486. }
  1487. }
  1488. }
  1489. }
  1490. &__footer {
  1491. .recommend {
  1492. padding-top: 40px;
  1493. &__header {
  1494. display: flex;
  1495. align-items: center;
  1496. .title {
  1497. font-size: 24px;
  1498. font-family: YouSheBiaoTiHei;
  1499. font-weight: 400;
  1500. color: #333333;
  1501. text-shadow: 0px 6px 6px rgba(249, 113, 13, 0.08);
  1502. }
  1503. }
  1504. &__body {
  1505. .list {
  1506. width: 100%;
  1507. .recommend-item {
  1508. float: left;
  1509. margin: 100px 9px 0;
  1510. width: 300px;
  1511. height: 178px;
  1512. background: #ffffff;
  1513. box-shadow: 0px 10px 13px 3px rgba(63, 141, 253, 0.1);
  1514. border-radius: 10px;
  1515. position: relative;
  1516. background: #fff;
  1517. padding-top: 100px;
  1518. &__img {
  1519. width: 280px;
  1520. height: 178px;
  1521. background: #ffffff;
  1522. box-shadow: 0px 0px 9px 1px rgba(0, 0, 0, 0.08);
  1523. border-radius: 10px;
  1524. position: absolute;
  1525. left: 10px;
  1526. top: -78px;
  1527. background: rgba(122, 136, 246, 1);
  1528. overflow: hidden;
  1529. .note {
  1530. width: 80px;
  1531. height: 24px;
  1532. background: #d94404;
  1533. box-shadow: 0px 1px 1px 0px rgba(248, 78, 5, 0.4);
  1534. border-radius: 10px 0px 20px 0px;
  1535. text-align: center;
  1536. line-height: 24px;
  1537. color: #fff;
  1538. }
  1539. }
  1540. &__title {
  1541. margin: 0 8px;
  1542. font-size: 14px;
  1543. font-family: Microsoft YaHei;
  1544. font-weight: 400;
  1545. color: #333333;
  1546. line-height: 24px;
  1547. }
  1548. &__desc {
  1549. height: 32px;
  1550. position: absolute;
  1551. left: 0;
  1552. right: 0;
  1553. bottom: 0;
  1554. margin-left: 8px;
  1555. display: flex;
  1556. justify-content: space-between;
  1557. .price {
  1558. font-size: 18px;
  1559. font-family: Microsoft YaHei;
  1560. font-weight: bold;
  1561. color: #ff2d55;
  1562. line-height: 32px;
  1563. }
  1564. .add {
  1565. display: block;
  1566. width: 118px;
  1567. height: 32px;
  1568. line-height: 30px;
  1569. background: #f2f4f7;
  1570. border-radius: 10px 0px 10px 0px;
  1571. font-size: 16px;
  1572. color: #3f8dfd;
  1573. text-align: center;
  1574. &:hover {
  1575. background: #3f8dfd;
  1576. color: #f2f4f7;
  1577. }
  1578. }
  1579. }
  1580. }
  1581. }
  1582. }
  1583. &__footer {
  1584. overflow: hidden;
  1585. .btn {
  1586. cursor: pointer;
  1587. width: 146px;
  1588. height: 40px;
  1589. background: #e3eaf7;
  1590. border-radius: 8px;
  1591. margin: 20px auto 40px;
  1592. color: #3f8dfd;
  1593. text-align: center;
  1594. line-height: 40px;
  1595. &:hover {
  1596. color: #fff;
  1597. box-shadow: 0px 8px 4px 0px rgba(7, 82, 208, 0.08);
  1598. background: #3f8dfd;
  1599. }
  1600. }
  1601. }
  1602. }
  1603. }
  1604. }
  1605. .question-modal {
  1606. /deep/ .el-dialog__header {
  1607. display: none;
  1608. }
  1609. /deep/ .el-dialog__body {
  1610. padding: 0;
  1611. overflow: unset;
  1612. }
  1613. &__close {
  1614. position: absolute;
  1615. right: 0;
  1616. top: -28px;
  1617. width: 24px;
  1618. height: 24px;
  1619. line-height: 24px;
  1620. text-align: center;
  1621. color: #eee;
  1622. border: 1px solid #eee;
  1623. border-radius: 50%;
  1624. }
  1625. &__content {
  1626. width: 800px;
  1627. height: 530px;
  1628. position: relative;
  1629. box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.04);
  1630. border-radius: 8px;
  1631. .left-box {
  1632. float: left;
  1633. width: 500px;
  1634. border-right: 1px solid #eee;
  1635. &__header {
  1636. height: 40px;
  1637. padding-left: 12px;
  1638. border-bottom: 1px solid #eeeeee;
  1639. display: flex;
  1640. align-items: center;
  1641. .progress {
  1642. width: 200px;
  1643. }
  1644. .text {
  1645. margin-left: 15px;
  1646. font-size: 16px;
  1647. span {
  1648. font-family: Microsoft YaHei;
  1649. font-weight: bold;
  1650. color: #3f8dfd;
  1651. line-height: 24px;
  1652. }
  1653. }
  1654. }
  1655. &__body {
  1656. height: 450px;
  1657. border-bottom: 1px solid #eee;
  1658. .question {
  1659. padding: 12px 0 0 12px;
  1660. display: flex;
  1661. flex-direction: column;
  1662. height: 100%;
  1663. &__title {
  1664. padding-left: 12px;
  1665. font-size: 16px;
  1666. font-family: Microsoft YaHei;
  1667. font-weight: bold;
  1668. color: #333333;
  1669. line-height: 24px;
  1670. }
  1671. &__desc {
  1672. padding-left: 12px;
  1673. margin-top: 20px;
  1674. font-size: 16px;
  1675. font-family: Microsoft YaHei;
  1676. font-weight: 400;
  1677. color: #666666;
  1678. line-height: 24px;
  1679. }
  1680. &__content {
  1681. flex: 1;
  1682. overflow-y: scroll;
  1683. &::-webkit-scrollbar {
  1684. width: 6px;
  1685. }
  1686. &::-webkit-scrollbar-track {
  1687. background-color: #fff;
  1688. -webkit-border-radius: 2em;
  1689. -moz-border-radius: 2em;
  1690. border-radius: 2em;
  1691. }
  1692. &::-webkit-scrollbar-thumb {
  1693. background-color: #eeeeee;
  1694. -webkit-border-radius: 2em;
  1695. -moz-border-radius: 2em;
  1696. border-radius: 2em;
  1697. }
  1698. /deep/ .el-tabs__item {
  1699. padding: 0 20px !important;
  1700. height: 40px;
  1701. line-height: 40px;
  1702. }
  1703. .question__content {
  1704. height: auto;
  1705. overflow: auto;
  1706. }
  1707. .question-list {
  1708. padding: 24px 0 0 24px;
  1709. .checkbox,
  1710. .radio {
  1711. cursor: pointer;
  1712. margin-right: 24px;
  1713. padding: 0 24px;
  1714. display: flex;
  1715. align-items: center;
  1716. margin-top: 2px;
  1717. min-height: 40px;
  1718. padding-top: 10px;
  1719. padding-bottom: 10px;
  1720. background: #f5f9ff;
  1721. border-radius: 8px;
  1722. box-sizing: border-box;
  1723. &.right {
  1724. background: #37c65b;
  1725. }
  1726. &.wrong {
  1727. background: #ff3a30;
  1728. }
  1729. }
  1730. &.textarea {
  1731. margin-right: 12px;
  1732. .upload {
  1733. margin-top: 10px;
  1734. &__imgs {
  1735. margin-right: 10px;
  1736. width: 80px;
  1737. height: 80px;
  1738. background: #ffffff;
  1739. border: 1px solid #eeeeee;
  1740. border-radius: 4px;
  1741. position: relative;
  1742. display: flex;
  1743. float: left;
  1744. align-items: center;
  1745. justify-content: center;
  1746. img {
  1747. max-width: 100%;
  1748. max-height: 100%;
  1749. }
  1750. }
  1751. &__btn {
  1752. margin-right: 10px;
  1753. width: 80px;
  1754. height: 80px;
  1755. background: #ffffff;
  1756. border: 1px solid #eeeeee;
  1757. border-radius: 4px;
  1758. position: relative;
  1759. display: flex;
  1760. float: left;
  1761. align-items: center;
  1762. justify-content: center;
  1763. flex-direction: column;
  1764. .icon {
  1765. font-size: 20px;
  1766. color: #3f8dfd;
  1767. }
  1768. p {
  1769. font-size: 12px;
  1770. font-family: Microsoft YaHei;
  1771. font-weight: 400;
  1772. color: #999999;
  1773. line-height: 24px;
  1774. }
  1775. input {
  1776. position: absolute;
  1777. left: 0;
  1778. top: 0;
  1779. display: block;
  1780. width: 100%;
  1781. height: 100%;
  1782. opacity: 0;
  1783. }
  1784. }
  1785. }
  1786. }
  1787. /deep/ .el-checkbox {
  1788. white-space: pre-wrap;
  1789. }
  1790. }
  1791. .answer-list {
  1792. height: 40px;
  1793. border-top: 1px solid #eee;
  1794. border-bottom: 1px solid #eee;
  1795. margin-top: 24px;
  1796. display: flex;
  1797. align-items: center;
  1798. justify-content: space-between;
  1799. padding: 0 24px;
  1800. &__left {
  1801. font-size: 16px;
  1802. font-family: Microsoft YaHei;
  1803. font-weight: 400;
  1804. color: #333333;
  1805. line-height: 24px;
  1806. }
  1807. &__right {
  1808. font-size: 16px;
  1809. font-family: Microsoft YaHei;
  1810. font-weight: 400;
  1811. color: #333333;
  1812. line-height: 24px;
  1813. }
  1814. }
  1815. .explain-list {
  1816. padding: 12px 24px;
  1817. &__header {
  1818. font-size: 16px;
  1819. font-family: Microsoft YaHei;
  1820. font-weight: bold;
  1821. color: #666666;
  1822. line-height: 24px;
  1823. }
  1824. &__body {
  1825. margin-top: 12px;
  1826. font-size: 16px;
  1827. font-family: Microsoft YaHei;
  1828. font-weight: 400;
  1829. color: #666666;
  1830. line-height: 24px;
  1831. }
  1832. .upload {
  1833. margin-top: 10px;
  1834. &__imgs {
  1835. margin-right: 10px;
  1836. width: 80px;
  1837. height: 80px;
  1838. background: #ffffff;
  1839. border: 1px solid #eeeeee;
  1840. border-radius: 4px;
  1841. position: relative;
  1842. display: flex;
  1843. float: left;
  1844. align-items: center;
  1845. justify-content: center;
  1846. img {
  1847. max-width: 100%;
  1848. max-height: 100%;
  1849. }
  1850. }
  1851. }
  1852. }
  1853. }
  1854. &__btns {
  1855. position: relative;
  1856. height: 32px;
  1857. .submit {
  1858. cursor: pointer;
  1859. margin: 0 auto;
  1860. width: 140px;
  1861. height: 32px;
  1862. background: #3f8dfd;
  1863. box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.2);
  1864. border-radius: 16px;
  1865. text-align: center;
  1866. line-height: 32px;
  1867. color: #fff;
  1868. font-size: 16px;
  1869. }
  1870. .collect {
  1871. cursor: pointer;
  1872. position: absolute;
  1873. right: 0;
  1874. top: 5px;
  1875. font-size: 12px;
  1876. font-family: Microsoft YaHei;
  1877. font-weight: 400;
  1878. color: #3f8dfd;
  1879. line-height: 24px;
  1880. }
  1881. }
  1882. }
  1883. }
  1884. &__footer {
  1885. height: 40px;
  1886. display: flex;
  1887. justify-content: space-around;
  1888. align-items: center;
  1889. .btn {
  1890. cursor: pointer;
  1891. width: 140px;
  1892. height: 32px;
  1893. background: #ffffff;
  1894. border: 1px solid #3f8dfd;
  1895. border-radius: 16px;
  1896. line-height: 32px;
  1897. text-align: center;
  1898. color: #3f8dfd;
  1899. }
  1900. }
  1901. }
  1902. .right-box {
  1903. float: right;
  1904. width: 300px;
  1905. &__header {
  1906. height: 40px;
  1907. line-height: 40px;
  1908. font-size: 16px;
  1909. font-family: Microsoft YaHei;
  1910. font-weight: bold;
  1911. color: #333333;
  1912. text-align: center;
  1913. border-bottom: 1px solid #eeeeee;
  1914. }
  1915. &__body {
  1916. height: 450px;
  1917. border-bottom: 1px solid #eee;
  1918. .card {
  1919. &__note {
  1920. display: flex;
  1921. height: 40px;
  1922. align-items: center;
  1923. border-bottom: 1px solid #eee;
  1924. .item {
  1925. display: flex;
  1926. align-items: center;
  1927. margin-left: 10px;
  1928. .box {
  1929. margin-right: 5px;
  1930. width: 16px;
  1931. height: 16px;
  1932. border-radius: 4px;
  1933. &.white {
  1934. background: #ffffff;
  1935. border: 1px solid #eeeeee;
  1936. }
  1937. &.green {
  1938. background: #37c65b;
  1939. }
  1940. &.red {
  1941. background: #ff3a30;
  1942. }
  1943. &.blue {
  1944. background: #3f8dfd;
  1945. }
  1946. }
  1947. }
  1948. }
  1949. &__content {
  1950. height: 410px;
  1951. overflow-y: scroll;
  1952. &::-webkit-scrollbar {
  1953. width: 6px;
  1954. }
  1955. &::-webkit-scrollbar-track {
  1956. background-color: #fff;
  1957. -webkit-border-radius: 2em;
  1958. -moz-border-radius: 2em;
  1959. border-radius: 2em;
  1960. }
  1961. &::-webkit-scrollbar-thumb {
  1962. background-color: #eeeeee;
  1963. -webkit-border-radius: 2em;
  1964. -moz-border-radius: 2em;
  1965. border-radius: 2em;
  1966. }
  1967. .list {
  1968. display: flex;
  1969. flex-wrap: wrap;
  1970. .item {
  1971. width: 40px;
  1972. height: 40px;
  1973. border-radius: 10px;
  1974. text-align: center;
  1975. line-height: 40px;
  1976. margin-left: 16px;
  1977. margin-top: 16px;
  1978. cursor: pointer;
  1979. &.white {
  1980. line-height: 38px;
  1981. color: #333333;
  1982. background: #ffffff;
  1983. border: 1px solid #eeeeee;
  1984. }
  1985. &.green {
  1986. color: #fff;
  1987. background: #37c65b;
  1988. }
  1989. &.red {
  1990. color: #fff;
  1991. background: #ff3a30;
  1992. }
  1993. &.blue {
  1994. border: 1rpx solid #eeeeee;
  1995. color: #fff;
  1996. background: #3f8dfd;
  1997. }
  1998. &.disabled {
  1999. cursor: not-allowed;
  2000. line-height: 38px;
  2001. color: #eeeeee;
  2002. background: #ffffff;
  2003. border: 1px solid #eeeeee;
  2004. }
  2005. }
  2006. }
  2007. }
  2008. }
  2009. }
  2010. &__footer {
  2011. height: 40px;
  2012. display: flex;
  2013. align-items: center;
  2014. justify-content: center;
  2015. .submit {
  2016. cursor: pointer;
  2017. width: 140px;
  2018. height: 32px;
  2019. background: #3f8dfd;
  2020. box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.2);
  2021. border-radius: 16px;
  2022. line-height: 32px;
  2023. text-align: center;
  2024. color: #fff;
  2025. font-size: 16px;
  2026. }
  2027. }
  2028. }
  2029. }
  2030. }
  2031. .video-modal {
  2032. /deep/ .el-dialog__header {
  2033. display: none;
  2034. }
  2035. /deep/ .el-dialog__body {
  2036. padding: 0;
  2037. overflow: unset;
  2038. }
  2039. &__close {
  2040. position: absolute;
  2041. right: 0;
  2042. top: -28px;
  2043. width: 24px;
  2044. height: 24px;
  2045. line-height: 24px;
  2046. text-align: center;
  2047. color: #eee;
  2048. border: 1px solid #eee;
  2049. border-radius: 50%;
  2050. }
  2051. &__header {
  2052. height: 40px;
  2053. border-bottom: 1px solid #eee;
  2054. line-height: 40px;
  2055. color: #ff3b30;
  2056. padding-left: 24px;
  2057. }
  2058. &__body {
  2059. width: 100%;
  2060. position: relative;
  2061. box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.04);
  2062. border-radius: 8px;
  2063. .video {
  2064. &__title {
  2065. padding-left: 24px;
  2066. height: 40px;
  2067. line-height: 40px;
  2068. font-size: 14px;
  2069. font-family: Microsoft YaHei;
  2070. font-weight: 400;
  2071. color: #333333;
  2072. }
  2073. &__wrap {
  2074. height: 450px;
  2075. video {
  2076. width: 100%;
  2077. height: 100%;
  2078. }
  2079. }
  2080. }
  2081. }
  2082. }
  2083. .select-class {
  2084. &__content {
  2085. .selection {
  2086. .el-select {
  2087. width: 100%;
  2088. }
  2089. }
  2090. }
  2091. }
  2092. }
  2093. </style>