course-detail.vue 77 KB

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