course-detail.vue 73 KB

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