detail.vue 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537
  1. <template>
  2. <view style="padding-bottom: 140rpx">
  3. <nav-bar title="课程详情"></nav-bar>
  4. <view class="videoBox">
  5. <!-- <view > -->
  6. <view class="video_box" v-if="!vid">
  7. <image :src="$method.splitImgHost(detail.coverUrl)" style="width: 100%; height: 450rpx"></image>
  8. <image v-if="false" class="video_play" src="/static/play.png" @click="startVideo"></image>
  9. </view>
  10. <view v-else class="video_box" style="width: 100%; height: 450rpx">
  11. <my-player ref="player" :playVid="vid" :autoplay="true" @timeupdate="timeupdate"></my-player>
  12. </view>
  13. <view class="cou_title">
  14. <view class="title_name">
  15. <!-- <view class="yearTag" v-if="detail.year">{{detail.year}}</view> -->
  16. <view class="titleTag">{{ detail.goodsName }}</view>
  17. </view>
  18. <view class="bus_ary">
  19. <view>{{businessData.educationName}}</view>
  20. <view>{{businessData.aliasName}}</view>
  21. <view v-if="!isJx">{{courseList.length || '-'}}课程 {{detail.classHours || '-'}}学时</view>
  22. </view>
  23. <view style="
  24. display: flex;
  25. margin-top: 13rpx;
  26. align-items: center;
  27. ">
  28. <view class="prices">
  29. <!-- <text v-if="detail.standPrice" class="price_word">¥ {{ detail.standPrice }}</text>
  30. <text v-else class="price_word free">免费</text> -->
  31. <view class="price_word" v-if="
  32. !detail.specTemplateId || (!detail.maxPrice && !detail.minPrice)
  33. "><text v-if="detail.standPrice"><text
  34. style="font-size: 28rpx;font-weight: 400;">¥</text>{{detail.standPrice | formatPrice}}</text><text
  35. v-else>免费</text>
  36. </view>
  37. <!-- 范围价格 -->
  38. <view v-else class="price_word">
  39. <view><text
  40. style="font-size: 28rpx;font-weight: 400;">¥</text>{{ detail.minPrice | formatPrice }}
  41. </view>
  42. <template v-if="detail.minPrice != detail.maxPrice">
  43. <text>-</text>
  44. <view><text
  45. style="font-size: 28rpx;font-weight: 400;">¥</text>{{ detail.maxPrice | formatPrice }}
  46. </view>
  47. </template>
  48. </view>
  49. </view>
  50. <text class="price2" v-if="detail.linePrice">原价:¥{{detail.linePrice | formatPrice}}</text>
  51. </view>
  52. </view>
  53. <!-- </view> -->
  54. </view>
  55. <view class="contents" v-if="list.length">
  56. <!-- <u-line color="#D6D6DB" /> -->
  57. <!-- <view style="height: 80rpx;">
  58. <view><u-tabs :list="list" :item-width="itemWidth()" font-size="30" bar-width="24" :current="current" @change="change" active-color="#007AFF"></u-tabs></view>
  59. </view> -->
  60. <view class="tabs">
  61. <view v-for="(item, index) in list" :key="index" class="tab_item"
  62. :class="[{ nactive: current == item.value }]" @click="change(item.value)">{{ item.name }}
  63. </view>
  64. </view>
  65. <view style="padding: 20rpx; padding-bottom: 100rpx; position: relative" v-show="current == 0">
  66. <view class="content">
  67. <view v-if="detail.mobileDetailHtml" v-html="detail.mobileDetailHtml"
  68. style="width: 100%; overflow: hidden"></view>
  69. <view class="noGoods" v-else>
  70. <img src="https://file.xyyxt.net/web/static/img/no-content.png" alt="">
  71. <view class="">
  72. 暂无数据
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. <view style="padding: 20rpx; padding-bottom: 100rpx; position: relative" v-show="current == 1">
  78. <!-- <view v-for="(item, index) in courseItem.courseList" :key="index" > -->
  79. <!-- 视频课 -->
  80. <template v-if="goodsType == 1">
  81. <view v-for="(courseItem, gTindex) in goodsTeacher" :key="gTindex">
  82. <view v-for="(item, index) in courseItem.courseList" :key="index">
  83. <view class="courseItemBox" v-if="item.show && item.show == 1">
  84. <view class="courseItem" @click="openCourse(item)">
  85. <view class="courseName">{{ item.courseName }}</view>
  86. <view>
  87. <image src="/static/icon/up.png" class="icon_up" v-if="item.down"></image>
  88. <image src="/static/icon/down.png" class="icon_up" v-if="!item.down"></image>
  89. </view>
  90. </view>
  91. <view v-if="courseItem.teaList && courseItem.teaList.length > 0" class="teacher_names">
  92. <view v-for="(tea, tindex) in courseItem.teaList" :key="tindex" class="names"
  93. :class="[States[gTindex] == tindex ? 'nactive' : '']"
  94. @click.stop="switchTeacher(tea, tindex, gTindex)">
  95. <view>{{ tea.aliasName }}</view>
  96. </view>
  97. </view>
  98. <view v-show="!item.down">
  99. <course-tree :propParam="{
  100. courseId: item.courseId,
  101. }" :isBuy="false"></course-tree>
  102. <u-line></u-line>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. </template>
  108. <!-- 直播课 -->
  109. <template v-else>
  110. <view v-for="(item, index) in courseList" :key="index">
  111. <view class="courseItemBox">
  112. <view class="courseItem" @click="openCourse(item)">
  113. <view class="courseName">{{ item.courseName }}</view>
  114. <view>
  115. <image src="/static/icon/up.png" class="icon_up" v-if="item.down"></image>
  116. <image src="/static/icon/down.png" class="icon_up" v-if="!item.down"></image>
  117. </view>
  118. </view>
  119. <view v-show="!item.down">
  120. <course-tree :isBuy="false"></course-tree>
  121. <u-line></u-line>
  122. </view>
  123. </view>
  124. </view>
  125. </template>
  126. </view>
  127. <view style="padding: 20rpx; padding-bottom: 100rpx; position: relative" v-show="current == 2">
  128. <view v-for="(item, index) in freeMenuList" :key="index">
  129. <view class="courseItemBox">
  130. <view class="courseItem">
  131. <view class="courseName">{{ item.freeExamName }}</view>
  132. </view>
  133. </view>
  134. </view>
  135. </view>
  136. <!-- 讲义资料 -->
  137. <view v-show="current == 3" style="padding: 0 10rpx">
  138. <handouts-box :isBuy="false" :isShowSearch="false" :isShowDownIcon="false"
  139. :handoutsId="detail.handoutsId" v-if="detail.handoutsId" />
  140. <view class="noGoods" v-else>
  141. <img src="https://file.xyyxt.net/web/static/img/no-content.png" alt="">
  142. <view class="">
  143. 暂无数据
  144. </view>
  145. </view>
  146. </view>
  147. <!-- 学员须知 -->
  148. <view v-show="current == 4" class="buyNote">
  149. <view class="_note" style="white-space: pre-wrap" v-html="
  150. detail.buyNote &&
  151. detail.buyNote.replace(/\n|\r\n/g, '<br>')
  152. " v-if="detail.buyNote"></view>
  153. <view class="noGoods" v-else>
  154. <img src="https://file.xyyxt.net/web/static/img/no-msg.png" alt="">
  155. <view class="">
  156. 暂无数据
  157. </view>
  158. </view>
  159. </view>
  160. </view>
  161. <view class="bottomBox" v-if="!hideBuyState">
  162. <template v-if="!options.isAct">
  163. <view class="icons">
  164. <view class="icon_item ones">
  165. <image src="/static/index/share.png" class="share"></image>
  166. <button type="default" open-type="share" class="bt_share"></button>
  167. <view class="share_w">分享</view>
  168. </view>
  169. <view class="icon_item" v-if="!disCode">
  170. <image src="/static/index/shopcar.png" class="shopcar" @click="toShopcar()"></image>
  171. <view class="share_w">购物车</view>
  172. </view>
  173. </view>
  174. <view style="display: flex; color: #ffffff; align-items: center" v-if="detail.educationName=='技工办证'">
  175. <view class="btn2" @click="buyBefore()">立即申报 </view>
  176. </view>
  177. <view style="display: flex; color: #ffffff; align-items: center" v-else>
  178. <view class="btn1" v-if="!disCode" @click="addCart()">加入购物车</view>
  179. <view class="btn2" @click="buy()">立即购买 </view>
  180. </view>
  181. </template>
  182. <template v-else>
  183. <view class="btn2" style="color: #ffffff; position: absolute; right: 24rpx" @click="drawBuy()">立即领取
  184. </view>
  185. </template>
  186. </view>
  187. <!-- 已购买过课程的弹窗 -->
  188. <u-popup v-model="bugCourseModel" mode="center" border-radius="40">
  189. <view class="had_bugCourse">
  190. <image src="/pages3/static/imgs/hadBug.png" class="share"></image>
  191. <view class="tips">
  192. <view class="warns">温馨提示</view>
  193. <view class="words">您<text>已购买过</text>该商品课程</view>
  194. <view class="words">可立即前往学习</view>
  195. </view>
  196. <view class="tip_botton">
  197. <view class="cancel_btn" @click="changeKown()">知道了</view>
  198. <view class="confirm_btn" @click="toStudy()">去学习</view>
  199. </view>
  200. </view>
  201. </u-popup>
  202. <!-- 选择规格弹窗 -->
  203. <u-popup v-model="toggleSkuShow" mode="bottom" border-radius="40">
  204. <view class="popup_box">
  205. <view class="check_head">
  206. <view class="headers">
  207. <view class="grade">选择规格</view>
  208. <u-icon name="close" color="#9C9C9C" size="40" @click="closePop()"></u-icon>
  209. </view>
  210. </view>
  211. <view class="check_con">
  212. <scroll-view scroll-y="true" style="height: 600rpx">
  213. <view v-for="(item, index) in specList" :key="index" class="check_items">
  214. <view class="grades">{{ item.name }}</view>
  215. <view class="grade_names" v-if="index == 0 && specList.length > 1">
  216. <view class="course_items" v-for="(child, c_index) in item.specAttrList" :key="c_index"
  217. :class="{ nactive: selectGoodIndex == c_index }" @click="selectGoodType(c_index)">
  218. {{ child.name }}
  219. </view>
  220. </view>
  221. <view v-if="index == 1 || specList.length == 1" class="check_box">
  222. <u-checkbox-group>
  223. <view v-for="spec in item.specAttrList" :key="spec.specAttributeId">
  224. <view class="check_box_item" v-if="spec.goodsId"
  225. :class="spec.check ? 'selected' : ''">
  226. <u-checkbox @change="checkboxChange" v-model="spec.check"
  227. :name="spec.specAttributeId">
  228. <view class="price_box">
  229. <view class="check_box_item_titme">{{
  230. spec.name
  231. }}</view>
  232. <view class="price">¥{{ spec.standPrice }}</view>
  233. </view>
  234. </u-checkbox>
  235. </view>
  236. </view>
  237. </u-checkbox-group>
  238. </view>
  239. </view>
  240. </scroll-view>
  241. </view>
  242. <view class="confirm_btns">
  243. <view class="allprice">
  244. <view>
  245. 总价:<text>¥</text><text>{{ allPrice }}</text>
  246. </view>
  247. <text>已选择{{ goodsIds.length }}个商品</text>
  248. </view>
  249. <view class="btns">
  250. <view v-if="!goodsIds.length" class="right_now r_disable">{{
  251. isCarOrBuy == 2 ? "立即购买" : "加入购物车"
  252. }}</view>
  253. <view v-else class="right_now" @click="rightNowBuy()">{{ isCarOrBuy == 2 ? "立即购买" : "加入购物车" }}
  254. </view>
  255. </view>
  256. </view>
  257. </view>
  258. </u-popup>
  259. </view>
  260. </template>
  261. <script>
  262. import handoutsBox from "@/components/course/handoutsBox.vue";
  263. import courseTree from "@/components/course/courseTree.vue";
  264. import myPlayer from "@/components/myPlayer/polyvPlayer.vue";
  265. import PopupTechVue from "../../components/popup/technician.vue";
  266. import {
  267. mapGetters,
  268. mapMutations
  269. } from "vuex";
  270. export default {
  271. components: {
  272. handoutsBox,
  273. courseTree,
  274. myPlayer,
  275. PopupTechVue,
  276. },
  277. data() {
  278. return {
  279. id: 0,
  280. list: [],
  281. menuIndex: [],
  282. current: 0,
  283. detail: {},
  284. courseList: [],
  285. menuList: [],
  286. freeMenuList: [],
  287. playbackRate: [1.0],
  288. vid: "",
  289. autoplay: true,
  290. listenConfigList: [],
  291. listenSecond: 0,
  292. isFirstEnter: true, //是否首次进入
  293. timer: null,
  294. businessData: {},
  295. startTime: 0,
  296. bugCourseModel: false, // 弹窗
  297. hadBuyCourse: {}, // 已购买课程信息
  298. goodsTeacher: [],
  299. teaIndex: 0,
  300. States: {
  301. 0: 0
  302. },
  303. goodsType: 1, // 1视频2题库 3补考 4前培 6直播
  304. toggleSkuShow: false,
  305. skuItem: {},
  306. isCarOrBuy: 1, // 1加入购物车 2立即购买
  307. specList: [], // 规格列表
  308. checkedAttrs: [],
  309. selectGoodIndex: 0,
  310. specAttrPriceList: [],
  311. options: {},
  312. courseId: "",
  313. refPlv: null,
  314. isQdy: 0,
  315. };
  316. },
  317. computed: {
  318. ...mapGetters(["userInfo", "playSectionId", "hideBuyState"]),
  319. allPrice() {
  320. if (!this.specList.length) return 0;
  321. let allPrice = this.specList.slice(-1)[0].specAttrList.reduce((a, b) => {
  322. if (b.check) {
  323. return a + b.standPrice;
  324. }
  325. return a;
  326. }, 0);
  327. return this.toFixed(allPrice);
  328. },
  329. goodsIds() {
  330. if (!this.specList.length) return [];
  331. return this.specList
  332. .slice(-1)[0]
  333. .specAttrList.filter((e) => e.check)
  334. .map((e) => e.goodsId);
  335. },
  336. isSingleChoice() {
  337. if (!this.specAttrPriceList.length) {
  338. return false;
  339. }
  340. return this.specAttrPriceList[0].specialGoods;
  341. },
  342. disCode() {
  343. return this.options.distributionCode;
  344. },
  345. isJx() {
  346. // 8 讲义资料商品
  347. return this.goodsType == 8;
  348. },
  349. },
  350. onLoad(option) {
  351. if (option.scene) {
  352. // scene 生成二维码扫码进来的
  353. let optObj = {};
  354. let arrs = decodeURIComponent(option.scene).split("&");
  355. for (let i = 0; i < arrs.length; i++) {
  356. optObj[arrs[i].split("=")[0]] = arrs[i].split("=")[1];
  357. }
  358. this.id = optObj.id;
  359. this.goodsType = optObj.goodsType || optObj.gt;
  360. console.log("optObj.sc:", optObj);
  361. uni.setStorageSync("newUser_sc", optObj.sc);
  362. uni.setStorageSync("shareActivityCode", optObj.sac);
  363. if (optObj.sac && this.$method.isLogin()) {
  364. this.editShareActivityCode();
  365. }
  366. } else {
  367. // 小程序正常跳转的
  368. // this.id => goodsId
  369. this.id = option.id;
  370. this.goodsType = option.goodsType || option.gt;
  371. this.options = option;
  372. if (option.sac) {
  373. uni.setStorageSync("shareActivityCode", option.sac);
  374. if (this.$method.isLogin()) {
  375. //已登录
  376. this.editShareActivityCode();
  377. this.getIsBuy(); // 判断是否已经购买过该课程
  378. }
  379. }
  380. }
  381. this.disCode ? this.getFxDetail() : this.getDetail();
  382. // 非讲义商品
  383. if (!this.isJx) {
  384. this.goodsCourseList();
  385. this.appCommonGoodsCourseModuleFreeExamList();
  386. } else {
  387. this.list = [{
  388. name: "资料目录",
  389. value: 3,
  390. },
  391. {
  392. name: "学员须知",
  393. value: 4,
  394. },
  395. ];
  396. this.current = 3;
  397. }
  398. // #ifdef MP-WEIXIN
  399. wx.showShareMenu({
  400. withShareTicket: true,
  401. menus: ["shareAppMessage", "shareTimeline"],
  402. });
  403. // #endif
  404. },
  405. onUnload(option) {
  406. this.$store.commit("setPlaySectionId", {
  407. playSectionId: 0
  408. });
  409. //移除所有的事件监听器
  410. uni.$off();
  411. },
  412. // 分享到朋友圈
  413. onShareTimeline() {
  414. return {
  415. title: this.detail.goodsName,
  416. query: "id=" + this.id,
  417. imageUrl: this.$method.splitImgHost(this.detail.coverUrl),
  418. };
  419. },
  420. // 分享给朋友
  421. onShareAppMessage() {
  422. return {
  423. title: this.detail.goodsName,
  424. path: `/pages3/course/detail?id=` + this.id + "&goodsType=" + this.goodsType,
  425. imageUrl: this.$method.splitImgHost(this.detail.coverUrl),
  426. };
  427. },
  428. mounted() {
  429. uni.$on("getSection", (item, listen) => {
  430. console.log("🚀 ~ file: detail.vue:578 ~ uni.$on ~ item:", item, listen);
  431. //播放试听
  432. this.listenSecond = listen.auditionMinute;
  433. if (this.listenSecond > 0) {
  434. if (item.recordingUrl) {
  435. if (this.vid && !this.refPlv) {
  436. this.refPlv = this.$refs.player;
  437. }
  438. this.vid = item.recordingUrl;
  439. if (this.refPlv) {
  440. this.refPlv.changeVid({
  441. vid: this.vid,
  442. videoCurrentTime: 0,
  443. });
  444. }
  445. } else {
  446. this.$u.toast("地址错误,无法播放");
  447. }
  448. } else {
  449. this.$u.toast("试听配置错误");
  450. }
  451. });
  452. this.updateChapterOpen(true);
  453. },
  454. methods: {
  455. ...mapMutations(["updateChapterOpen"]),
  456. itemWidth() {
  457. return 100 / this.list.length + "%";
  458. },
  459. // 修改用户活动邀请码
  460. editShareActivityCode() {
  461. console.log("修改用户活动邀请码");
  462. this.$http({
  463. url: "/app/user/edit/shareActivityCode",
  464. method: "post",
  465. data: {
  466. shareActivityCode: uni.getStorageSync("shareActivityCode"),
  467. },
  468. }).then((res) => {
  469. if (res.data.code == 200) {}
  470. });
  471. },
  472. appCommonGoodsCourseModuleFreeExamList() {
  473. // url: '/app/common/goods/course/moduleFreeExamList/'+data,
  474. this.$api.appCommonGoodsCourseModuleFreeExamList(this.id).then((res) => {
  475. if (res.data.data.length) {
  476. this.freeMenuList = res.data.data;
  477. this.list = [{
  478. name: "课程介绍",
  479. value: 0,
  480. },
  481. {
  482. name: "章节目录",
  483. value: 1,
  484. },
  485. {
  486. name: "赠送",
  487. value: 2,
  488. },
  489. {
  490. name: "学员须知",
  491. value: 4,
  492. },
  493. ];
  494. } else {
  495. this.list = [{
  496. name: "课程介绍",
  497. value: 0,
  498. },
  499. {
  500. name: "章节目录",
  501. value: 1,
  502. },
  503. {
  504. name: "学员须知",
  505. value: 4,
  506. },
  507. ];
  508. }
  509. console.log(this.list);
  510. });
  511. },
  512. selectGoodType(index) {
  513. if (index == this.selectGoodIndex) {
  514. return;
  515. }
  516. this.selectGoodIndex = index;
  517. this.changeData();
  518. },
  519. select(val) {
  520. val.check = !val.check;
  521. },
  522. checkboxChange(val) {
  523. if (!this.isSingleChoice) return;
  524. this.specList.slice(-1)[0].specAttrList.forEach((ele) => {
  525. if (val.name != ele.specAttributeId) {
  526. ele.check = false;
  527. }
  528. });
  529. },
  530. courseBusiness() {
  531. // url: '/app/common/course/business/'+data,
  532. this.$api.courseBusiness(this.detail.businessId).then((res) => {
  533. this.businessData = res.data.data;
  534. });
  535. },
  536. toFixed(number) {
  537. if (number > 0) {
  538. return number.toFixed(2);
  539. } else {
  540. return "0.00";
  541. }
  542. },
  543. timeupdate(time) {
  544. if (time >= this.listenSecond) {
  545. this.listenSecond = time + 100;
  546. let refPlv = this.$refs.player;
  547. refPlv.playPause();
  548. refPlv.exitFullScreen();
  549. uni.showModal({
  550. title: "提示",
  551. content: "试听结束,购买课程可学习全部",
  552. showCancel: false,
  553. success: (resst) => {
  554. this.vid = "";
  555. this.refPlv = "";
  556. },
  557. });
  558. }
  559. },
  560. openCourse(item) {
  561. this.courseId = item.courseId;
  562. item.down = !item.down;
  563. if (!item.down && item.menuList.length == 0) {
  564. this.getMenuList(item);
  565. }
  566. },
  567. addShopCart(goodsIds) {
  568. if (!Array.isArray(goodsIds)) {
  569. goodsIds = [goodsIds];
  570. }
  571. this.$api
  572. .addCart({
  573. goodsIds: goodsIds,
  574. choiceStatus: 1,
  575. })
  576. .then((res) => {
  577. if (res.data.code == 200) {
  578. uni.setStorageSync("updateCart", 1); //提醒刷新购物车
  579. uni.showToast({
  580. title: "添加成功",
  581. });
  582. } else {
  583. this.$u.toast(res.data.msg);
  584. }
  585. });
  586. },
  587. goodsCourseList() {
  588. // url: '/app/common/goods/course/list/'+ data,
  589. this.$api.goodsCourseList(this.id).then((res) => {
  590. console.log(
  591. "🚀 ~ file: detail.vue:708 ~ this.$api.goodsCourseList ~ res:",
  592. res
  593. );
  594. if (res.data.code == 200) {
  595. for (let i = 0; i < res.data.rows.length; i++) {
  596. let item = res.data.rows[i];
  597. item.down = true;
  598. item.menuList = [];
  599. }
  600. this.courseList = res.data.rows;
  601. this.getFirstCourse();
  602. // 不同
  603. if (this.goodsType == 1) {
  604. this.getCourseTeacher(res.data.rows);
  605. }
  606. }
  607. });
  608. },
  609. /**
  610. * 获取第一个有模块或者章的课程
  611. */
  612. async getFirstCourse() {
  613. for (let i = 0; i < this.courseList.length; i++) {
  614. let menuIndexOrFalse = await this.getCourseMenus(this.courseList[i]);
  615. if (menuIndexOrFalse !== false) {
  616. this.menuIndex = [i, menuIndexOrFalse];
  617. this.openCourse(this.courseList[i]);
  618. break;
  619. }
  620. }
  621. },
  622. getCourseMenus(item) {
  623. return new Promise((resolve) => {
  624. // url: '/app/common/course/menuList',
  625. this.$api.menuList({
  626. courseId: item.courseId
  627. }).then((res) => {
  628. if (res.data.code == 200) {
  629. for (let i = 0; i < res.data.rows.length; i++) {
  630. if (res.data.rows[i].type == 1 || res.data.rows[i].type == 2) {
  631. resolve(i);
  632. break;
  633. }
  634. }
  635. }
  636. });
  637. });
  638. },
  639. getCourseTeacher(rows) {
  640. //获取商品双师资模板
  641. this.$api
  642. .getGoodsCourseTeacher({
  643. goodsId: this.id,
  644. })
  645. .then((res1) => {
  646. if (res1.data.data && res1.data.data.length > 0) {
  647. //课程老师模板
  648. let teacherTel = res1.data.data;
  649. //商品课程
  650. let courses = rows;
  651. teacherTel.forEach((tea) => {
  652. let dataList = [];
  653. let teacherList = [];
  654. courses.forEach((item) => {
  655. let data = tea.courseList.filter(
  656. (x) => x.courseId == item.courseId
  657. );
  658. if (data && data.length > 0) {
  659. dataList.push(item);
  660. teacherList = tea.courseList;
  661. }
  662. });
  663. let result = {
  664. teaList: teacherList,
  665. courseList: dataList,
  666. };
  667. this.goodsTeacher.push(result);
  668. });
  669. if (this.goodsTeacher && this.goodsTeacher.length > 0) {
  670. let courseIds = [];
  671. this.goodsTeacher.forEach((item) => {
  672. item.courseList.forEach((course) => {
  673. courseIds.push(course.courseId);
  674. });
  675. });
  676. if (courseIds.length > 0) {
  677. courses.forEach((item) => {
  678. if (!courseIds.includes(item.courseId)) {
  679. let data = {
  680. teaList: [],
  681. courseList: [],
  682. };
  683. data.courseList.push(item);
  684. this.goodsTeacher.push(data);
  685. }
  686. });
  687. }
  688. this.goodsTeacher.forEach((item) => {
  689. if (item.courseList && item.courseList.length > 0) {
  690. item.courseList[0].show = 1;
  691. }
  692. });
  693. }
  694. } else {
  695. //没有双师资模板
  696. rows.forEach((item) => {
  697. item.show = 1;
  698. let data = {
  699. teaList: [],
  700. courseList: [],
  701. };
  702. data.courseList.push(item);
  703. this.goodsTeacher.push(data);
  704. });
  705. console.log(this.goodsTeacher, "this.goodsTeacher");
  706. }
  707. });
  708. },
  709. //切换老师
  710. switchTeacher(data, tindex, gTindex) {
  711. // console.log(data,'data');
  712. this.States[gTindex] = tindex;
  713. this.teaIndex = tindex;
  714. this.goodsTeacher.forEach((item, index) => {
  715. if (item.teaList && item.teaList.length > 0) {
  716. let list = item.teaList.filter((x) => x.courseId == data.courseId);
  717. if (list && list.length > 0) {
  718. item.courseList.forEach((course, courseIndex) => {
  719. if (course.courseId == data.courseId) {
  720. this.$set(
  721. this.goodsTeacher[index].courseList[courseIndex],
  722. "show",
  723. 1
  724. );
  725. } else {
  726. this.$set(
  727. this.goodsTeacher[index].courseList[courseIndex],
  728. "show",
  729. 0
  730. );
  731. }
  732. });
  733. }
  734. }
  735. });
  736. console.log("切换后的this.goodsTeacher, ", this.goodsTeacher);
  737. },
  738. getMenuList(item) {
  739. this.$api.menuList({
  740. courseId: item.courseId
  741. }).then((res) => {
  742. if (res.data.code == 200) {
  743. for (let i = 0; i < res.data.rows.length; i++) {
  744. let item = res.data.rows[i];
  745. item.down = true;
  746. item.id = item.menuId;
  747. item.name = item.menuName;
  748. }
  749. item.menuList = res.data.rows;
  750. }
  751. });
  752. },
  753. paramsFn() {
  754. return {
  755. listenConfigList: this.listenConfigList,
  756. };
  757. },
  758. getFxDetail() {
  759. let self = this;
  760. this.$api
  761. .fxGoodsDetail({
  762. goodsId: this.id,
  763. disCode: this.disCode,
  764. })
  765. .then((res) => {
  766. if (res.data.code == 200) {
  767. if (res.data.data) {
  768. if (res.data.data.mobileDetailHtml) {
  769. res.data.data.mobileDetailHtml =
  770. res.data.data.mobileDetailHtml.replace(
  771. /<img/gi,
  772. '<img style="max-width:100%;"'
  773. );
  774. }
  775. self.detail = res.data.data;
  776. this.courseBusiness();
  777. if (self.detail.goodsAuditionConfig) {
  778. self.listenConfigList = JSON.parse(
  779. self.detail.goodsAuditionConfig
  780. );
  781. }
  782. }
  783. }
  784. });
  785. },
  786. // 获取课程详情
  787. getDetail() {
  788. let self = this;
  789. this.$api.commonGoodsDetail(this.id).then((res) => {
  790. if (res.data.code == 200) {
  791. if (res.data.data) {
  792. if (res.data.data.mobileDetailHtml) {
  793. res.data.data.mobileDetailHtml =
  794. res.data.data.mobileDetailHtml.replace(
  795. /<img/gi,
  796. '<img style="max-width:100%;"'
  797. );
  798. }
  799. self.detail = res.data.data;
  800. this.courseBusiness();
  801. if (self.detail.goodsAuditionConfig) {
  802. self.listenConfigList = JSON.parse(
  803. self.detail.goodsAuditionConfig
  804. );
  805. }
  806. }
  807. }
  808. });
  809. },
  810. toConfirmList(id) {
  811. uni.navigateTo({
  812. url: "/pages2/order/confirm_list?id=" + id + this.addParam(),
  813. });
  814. },
  815. addParam(str = "") {
  816. if (this.disCode) {
  817. str += "&distributionCode=" + this.disCode;
  818. }
  819. if (this.options.linkCode) {
  820. str += "&linkCode=" + this.options.linkCode;
  821. }
  822. return str;
  823. },
  824. ordercheckbuy(id) {
  825. return new Promise((resolve) => {
  826. this.$api
  827. .ordercheckbuy(id)
  828. .then((res) => {
  829. console.log(res);
  830. if (!res.data.data) {
  831. uni.showModal({
  832. title: "提示",
  833. content: "当前课程已满员,详情请联系客服电话:020-87085983",
  834. cancelText: "取消",
  835. confirmText: "确定",
  836. success: (res) => {},
  837. });
  838. }
  839. resolve(res.data.data);
  840. })
  841. .catch((err) => {
  842. this.$message({
  843. type: "warning",
  844. message: err.msg,
  845. });
  846. resolve(true);
  847. });
  848. });
  849. },
  850. //技工证购买前填写申报资料验证
  851. async buyBefore(){
  852. if (this.$method.isGoLogin()) {
  853. return;
  854. }
  855. let canbuy = await this.ordercheckbuy(this.detail.goodsId);
  856. if (!canbuy) return;
  857. // console.log(this.goodsDetail)
  858. this.$refs.technician.openBoxs(this.goodsDetail.subjectNames,this.goodsDetail.goodsId);
  859. },
  860. async buy() {
  861. if (this.$method.isGoLogin()) {
  862. return;
  863. }
  864. let canbuy = await this.ordercheckbuy(this.detail.goodsId);
  865. if (!canbuy) return;
  866. // 判断有没有规格选择
  867. if (this.detail.specTemplateId) {
  868. this.isCarOrBuy = 2;
  869. this.getSpecDetail();
  870. return;
  871. }
  872. this.toConfirmList(this.id);
  873. },
  874. drawBuy() {
  875. if (!this.$method.isLogin()) {
  876. uni.navigateTo({
  877. url: "/pages4/login/login?isBack=" + true + "&isAct=1",
  878. });
  879. return;
  880. }
  881. this.$api
  882. .drowActGoods({
  883. url: location.href,
  884. goodsList: [this.detail],
  885. sellerName: this.options.sale,
  886. })
  887. .then((res) => {
  888. if (res.data.code == 200) {
  889. // this.$u.toast("领取成功");
  890. uni.showModal({
  891. title: "提示",
  892. content: "领取成功,是否现在去做题?",
  893. cancelText: "取消",
  894. confirmText: "确定",
  895. success: (res) => {
  896. if (res.confirm) {
  897. uni.switchTab({
  898. url: "/pages/questionBank/index",
  899. });
  900. }
  901. },
  902. });
  903. } else {
  904. this.$u.toast(res.data.msg);
  905. }
  906. });
  907. },
  908. async addCart() {
  909. if (this.$method.isGoLogin()) {
  910. return;
  911. }
  912. let canbuy = await this.ordercheckbuy(this.detail.goodsId);
  913. if (!canbuy) return;
  914. // 判断有没有规格选择
  915. if (this.detail.specTemplateId) {
  916. this.isCarOrBuy = 1;
  917. this.getSpecDetail();
  918. return;
  919. }
  920. this.addShopCart(this.id);
  921. },
  922. getSpecDetail() {
  923. this.checkedAttrs = [];
  924. let data = {};
  925. let url = `/app/common/spec/${this.detail.specTemplateId}`;
  926. if (this.disCode) {
  927. url = "/app/common/distribution/spec";
  928. data = {
  929. disCode: this.disCode,
  930. specTemplateId: this.detail.specTemplateId,
  931. };
  932. }
  933. this.$http({
  934. url,
  935. method: "get",
  936. noToken: true,
  937. data,
  938. }).then((res) => {
  939. let data = res.data.data;
  940. if (data) {
  941. this.toggleSkuShow = true;
  942. this.specAttrPriceList = data.specAttrPriceList;
  943. this.specList = this.changeData(data.specList || []);
  944. this.isQdy = data.sign;
  945. } else {
  946. if (this.isCarOrBuy == 1) {
  947. // 加入购物车
  948. this.addShopCart(this.id);
  949. } else {
  950. this.toConfirmList(this.id);
  951. }
  952. this.closePop();
  953. }
  954. });
  955. },
  956. changeData(data = this.specList) {
  957. let len = data.length;
  958. if (!len) return [];
  959. data[len - 1].specAttrList.forEach((e, i) => {
  960. e.check = e.check || false;
  961. let id = e.specAttributeId;
  962. if (len > 1) {
  963. id =
  964. data[0].specAttrList[this.selectGoodIndex].specAttributeId +
  965. "," +
  966. id;
  967. }
  968. let item = this.specAttrPriceList.find((e) => e.specAttrIds == id);
  969. if (item) {
  970. e.standPrice = item.standPrice;
  971. e.goodsId = item.goodsId;
  972. } else {
  973. e.goodsId = null;
  974. }
  975. });
  976. // data.forEach((item, index) => {
  977. // if (index == len - 1) {
  978. // item.specAttrList.forEach((e, i) => {
  979. // e.check = false
  980. // })
  981. // }
  982. // })
  983. return data;
  984. },
  985. change(index) {
  986. this.current = index;
  987. // uni.pageScrollTo({
  988. // scrollTop: 0,
  989. // duration: 300
  990. // })
  991. },
  992. toShopcar() {
  993. uni.navigateTo({
  994. url: "/pages4/shopping/shoppingCart",
  995. });
  996. },
  997. getIsBuy() {
  998. this.$http({
  999. url: "/order/buyGoodsNotExpired",
  1000. method: "get",
  1001. data: {
  1002. goodsId: this.id
  1003. },
  1004. }).then((res) => {
  1005. if (res.data.code == 200) {
  1006. if (res.data.data) {
  1007. // 有data返回是已经购买过的课程
  1008. this.hadBuyCourse = res.data.data;
  1009. this.bugCourseModel = true;
  1010. }
  1011. }
  1012. });
  1013. },
  1014. changeKown() {
  1015. this.bugCourseModel = false;
  1016. },
  1017. async toStudy() {
  1018. let item = this.hadBuyCourse;
  1019. if (item.goodsType == 6) {
  1020. // 进入直播课
  1021. this.toLive(item);
  1022. return;
  1023. }
  1024. // /course/goodsRebuildStatus查询用户商品重修状态
  1025. let rebuildStatus = await this.courseGoodsRebuildStatus(
  1026. item.goodsId,
  1027. item.gradeId
  1028. );
  1029. if (rebuildStatus == 0) {
  1030. this.$navTo.togo("/pages2/learn/details", {
  1031. gradeId: item.gradeId,
  1032. goodsId: item.goodsId,
  1033. orderGoodsId: item.orderGoodsId,
  1034. });
  1035. return;
  1036. }
  1037. this.$method.checkLock().then((res) => {
  1038. this.$http({
  1039. url: "/course/courseList",
  1040. method: "get",
  1041. data: {
  1042. pageNum: 1,
  1043. pageSize: 1,
  1044. goodsId: item.goodsId,
  1045. gradeId: item.gradeId,
  1046. orderGoodsId: item.orderGoodsId,
  1047. },
  1048. }).then((res) => {
  1049. if (res.data.code == 200) {
  1050. if (res.data.total > 1) {
  1051. // this.$navTo.togo(`/pages2/wd/course?id=${item.goodsId}&gid=${item.gradeId}&orderGoodsId=${item.orderGoodsId}`);
  1052. uni.navigateTo({
  1053. url: `/pages3/polyv/detail?id=''&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}`,
  1054. });
  1055. } else if (res.data.total == 1) {
  1056. uni.navigateTo({
  1057. url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}`,
  1058. });
  1059. } else {
  1060. uni.showToast({
  1061. icon: "none",
  1062. title: "暂无可观看的视频课程",
  1063. });
  1064. }
  1065. }
  1066. });
  1067. });
  1068. },
  1069. toLive(item) {
  1070. this.$api
  1071. .courseCourseList({
  1072. pageNum: 1,
  1073. pageSize: 1,
  1074. goodsId: item.goodsId,
  1075. gradeId: 0,
  1076. orderGoodsId: item.orderGoodsId,
  1077. })
  1078. .then((res) => {
  1079. if (res.data.code == 200) {
  1080. if (res.data.total > 1) {
  1081. // uni.navigateTo({
  1082. // url:'/pages5/liveDetail/course?orderGoodsId='+item.orderGoodsId+'&goodsId='+item.goodsId+'&gradeId=0'
  1083. // })
  1084. uni.navigateTo({
  1085. url: "/pages3/live/detail?orderGoodsId=" +
  1086. item.orderGoodsId +
  1087. "&goodsId=" +
  1088. item.goodsId +
  1089. '&gradeId=0&courseId=""',
  1090. });
  1091. } else if (res.data.total == 1) {
  1092. uni.navigateTo({
  1093. url: "/pages3/live/detail?orderGoodsId=" +
  1094. item.orderGoodsId +
  1095. "&goodsId=" +
  1096. item.goodsId +
  1097. "&gradeId=0&courseId=" +
  1098. res.data.rows[0].courseId,
  1099. });
  1100. } else {
  1101. uni.showToast({
  1102. icon: "none",
  1103. title: "暂无可观看的直播课程",
  1104. });
  1105. }
  1106. }
  1107. });
  1108. },
  1109. /**
  1110. * @param {Object} goodsId 商品id
  1111. * 查询商品重修状态
  1112. */
  1113. courseGoodsRebuildStatus(goodsId, gradeId) {
  1114. return new Promise((resolve) => {
  1115. this.$http({
  1116. url: "/course/goodsRebuildStatus",
  1117. method: "get",
  1118. data: {
  1119. goodsId: goodsId,
  1120. gradeId: gradeId,
  1121. },
  1122. // noLoading: true,
  1123. // compleLoading: true, // 请求成功是否还要继续显示加载中
  1124. }).then((res) => {
  1125. resolve(res.data.data);
  1126. });
  1127. });
  1128. },
  1129. closePop() {
  1130. this.toggleSkuShow = false;
  1131. this.skuItem = {};
  1132. },
  1133. // 获取规格属性值对应的商品信息
  1134. getGoodsInfos(specAttrIds) {
  1135. this.$http({
  1136. url: "/app/common/attr/goods",
  1137. method: "get",
  1138. data: {
  1139. specTemplateId: this.detail.specTemplateId,
  1140. specAttrIds: specAttrIds.join(","),
  1141. },
  1142. noToken: true,
  1143. }).then((res) => {
  1144. if (res.data.code == 200) {
  1145. this.skuItem = res.data.data || {};
  1146. } else {
  1147. this.skuItem = {};
  1148. this.$u.toast("商品已下架, 请重新选择");
  1149. }
  1150. });
  1151. },
  1152. rightNowBuy() {
  1153. let goodsIds = [...new Set(this.goodsIds)];
  1154. this.$api.checkGoodsStatus({
  1155. goodsIds
  1156. }).then((res) => {
  1157. if (res.data.code == 500) {
  1158. return this.$u.toast(res.data.msg);
  1159. }
  1160. if (this.isCarOrBuy == 1) {
  1161. // 加入购物车
  1162. this.addShopCart(goodsIds);
  1163. } else {
  1164. if (this.isSingleChoice) {
  1165. this.toConfirmList(goodsIds);
  1166. } else {
  1167. let data = [];
  1168. goodsIds.forEach((id) => {
  1169. data.push(this.specAttrPriceList.find((e) => e.goodsId == id));
  1170. });
  1171. this.$store.commit("setShoppingCartList", {
  1172. shoppingCartList: data,
  1173. });
  1174. if (this.isQdy == 1) {
  1175. this.toConfirmList("");
  1176. return;
  1177. }
  1178. this.$navTo.togo("/pages2/order/confirm_pay" + this.addParam("?"));
  1179. }
  1180. }
  1181. this.closePop();
  1182. });
  1183. },
  1184. },
  1185. provide() {
  1186. return {
  1187. paramsFn: this.paramsFn,
  1188. };
  1189. },
  1190. };
  1191. </script>
  1192. <style>
  1193. page {
  1194. background-color: #f2f2f2;
  1195. }
  1196. </style>
  1197. <style lang="scss" scope>
  1198. @import "./index.scss";
  1199. /deep/ {
  1200. .menuBox {
  1201. padding: 0;
  1202. }
  1203. }
  1204. .video_t2 {
  1205. font-size: 24rpx;
  1206. font-family: PingFang SC;
  1207. font-weight: 500;
  1208. color: #666666;
  1209. }
  1210. .video_t1 {
  1211. height: 80rpx;
  1212. color: #333333;
  1213. line-height: 80rpx;
  1214. font-size: 30rpx;
  1215. font-family: PingFang SC;
  1216. font-weight: bold;
  1217. color: #333333;
  1218. overflow: hidden;
  1219. text-overflow: ellipsis;
  1220. white-space: nowrap;
  1221. }
  1222. .video_t1_t {
  1223. display: flex;
  1224. flex-direction: column;
  1225. height: 80rpx;
  1226. color: #333333;
  1227. text-align: center;
  1228. align-items: center;
  1229. border-left: solid 1px #d6d6db;
  1230. }
  1231. .video_play {
  1232. position: absolute;
  1233. width: 95rpx;
  1234. height: 95rpx;
  1235. top: 0;
  1236. left: 0;
  1237. right: 0;
  1238. bottom: 0;
  1239. margin: auto;
  1240. }
  1241. .video_box {
  1242. position: relative;
  1243. }
  1244. .contents {
  1245. width: 100%;
  1246. height: 100%;
  1247. background-color: #ffffff;
  1248. margin-top: 16rpx;
  1249. overflow: hidden;
  1250. }
  1251. .cou_title {
  1252. padding: 24rpx 32rpx 20rpx 32rpx;
  1253. display: flex;
  1254. flex-direction: column;
  1255. justify-content: space-around;
  1256. &>.bus_ary {
  1257. margin-top: 14rpx;
  1258. display: flex;
  1259. flex-wrap: wrap;
  1260. &>view {
  1261. margin-right: 16rpx;
  1262. margin-bottom: 10rpx;
  1263. background-color: rgb(235, 238, 245);
  1264. color: #666;
  1265. padding: 10rpx 20rpx;
  1266. border-radius: 8rpx;
  1267. }
  1268. }
  1269. }
  1270. .price2 {
  1271. margin-left: 30rpx;
  1272. text-decoration: line-through;
  1273. color: #aaaaaa;
  1274. font-size: 24rpx;
  1275. }
  1276. .prices {
  1277. .price_word {
  1278. display: flex;
  1279. font-size: 44rpx;
  1280. font-weight: 800;
  1281. color: #fc3f3f;
  1282. margin-bottom: 8rpx;
  1283. // view::before {
  1284. // content: "¥";
  1285. // font-size: 26rpx;
  1286. // font-weight: bold;
  1287. // }
  1288. }
  1289. .sale {
  1290. color: #999999;
  1291. font-size: 28rpx;
  1292. margin-left: 8rpx;
  1293. }
  1294. .price_line {
  1295. color: #999999;
  1296. font-size: 28rpx;
  1297. text-decoration: line-through;
  1298. font-weight: 400;
  1299. }
  1300. .free {
  1301. font-size: 32rpx;
  1302. }
  1303. }
  1304. // tab
  1305. .tabs {
  1306. // width: 100%;
  1307. height: 78rpx;
  1308. display: flex;
  1309. align-items: center;
  1310. justify-content: space-between;
  1311. background-color: #f2f7ff;
  1312. border-radius: 38rpx;
  1313. margin: 24rpx;
  1314. padding: 0rpx 5rpx;
  1315. .tab_item {
  1316. flex: 1;
  1317. height: 65rpx;
  1318. line-height: 65rpx;
  1319. font-size: 28rpx;
  1320. font-weight: bold;
  1321. border-radius: 32rpx;
  1322. text-align: center;
  1323. color: #333;
  1324. &.nactive {
  1325. color: #fff;
  1326. background-color: #3577e8;
  1327. }
  1328. }
  1329. // /deep/ .u-tabs {
  1330. // background:none!important;
  1331. // }
  1332. }
  1333. .courseName {
  1334. white-space: nowrap;
  1335. overflow: hidden;
  1336. text-overflow: ellipsis;
  1337. }
  1338. .videoBox {
  1339. background-color: #ffffff;
  1340. width: 100%;
  1341. /* height: 680rpx; */
  1342. z-index: 999;
  1343. padding: 20rpx;
  1344. }
  1345. .icon_up {
  1346. width: 32rpx;
  1347. height: 32rpx;
  1348. }
  1349. .courseItemBox {
  1350. background: #ffffff;
  1351. border-radius: 16rpx;
  1352. padding: 0 10rpx;
  1353. margin-bottom: 20rpx;
  1354. }
  1355. .courseItem {
  1356. height: 80rpx;
  1357. color: #333333;
  1358. font-size: 32rpx;
  1359. line-height: 80rpx;
  1360. font-weight: bold;
  1361. display: flex;
  1362. justify-content: space-between;
  1363. }
  1364. .content {
  1365. background-color: #ffffff;
  1366. width: 100%;
  1367. }
  1368. .btn2 {
  1369. width: 187rpx;
  1370. height: 79rpx;
  1371. line-height: 79rpx;
  1372. background: #007aff;
  1373. border-radius: 40rpx;
  1374. text-align: center;
  1375. font-size: 28rpx;
  1376. }
  1377. .btn1 {
  1378. width: 187rpx;
  1379. height: 79rpx;
  1380. line-height: 79rpx;
  1381. background: #cce4ff;
  1382. border-radius: 40rpx;
  1383. text-align: center;
  1384. margin-right: 11rpx;
  1385. font-size: 28rpx;
  1386. color: #1890ff;
  1387. }
  1388. .wk_icon {
  1389. width: 24rpx;
  1390. height: 24rpx;
  1391. margin-right: 12rpx;
  1392. }
  1393. .noteTag,
  1394. .blackFont {
  1395. font-size: 26rpx;
  1396. font-family: PingFang SC;
  1397. font-weight: 400;
  1398. color: #999999;
  1399. align-items: center;
  1400. margin: 0 4rpx;
  1401. line-height: 60rpx;
  1402. }
  1403. .priceTag {
  1404. /* font-size: 30rpx;
  1405. font-family: PingFang SC;
  1406. font-weight: bold;
  1407. color: #FF2D55; */
  1408. width: 60rpx;
  1409. height: 40rpx;
  1410. line-height: 40rpx;
  1411. text-align: center;
  1412. border: 1rpx solid #333;
  1413. }
  1414. .titleTag {
  1415. font-size: 32rpx;
  1416. font-weight: bold;
  1417. color: #333333;
  1418. margin-bottom: 10rpx;
  1419. // margin-left: 8rpx;
  1420. }
  1421. .yearTag {
  1422. width: 80rpx;
  1423. height: 32rpx;
  1424. background: #ebf5ff;
  1425. border: 2rpx solid #007aff;
  1426. border-radius: 16rpx;
  1427. font-size: 24rpx;
  1428. color: #007aff;
  1429. text-align: center;
  1430. line-height: 32rpx;
  1431. }
  1432. .itemBox {
  1433. background: #ffffff;
  1434. box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
  1435. border-radius: 24rpx;
  1436. width: 100%;
  1437. padding: 20rpx;
  1438. margin-bottom: 20rpx;
  1439. }
  1440. // 老师名字样式
  1441. .teacher_names {
  1442. display: flex;
  1443. padding-bottom: 15rpx;
  1444. border-bottom: 2rpx solid #f0f0f0;
  1445. .names {
  1446. padding: 6rpx 12rpx;
  1447. font-size: 26rpx;
  1448. color: #969696;
  1449. background: #f8f8f8;
  1450. border-radius: 8rpx;
  1451. margin-right: 10rpx;
  1452. &.nactive {
  1453. color: #3f8dfd;
  1454. background: #f2f7ff;
  1455. }
  1456. }
  1457. }
  1458. .buyNote {
  1459. padding: 20rpx;
  1460. &>._note {
  1461. padding: 20rpx;
  1462. background-color: rgb(245, 247, 250);
  1463. border-radius: 16rpx;
  1464. }
  1465. }
  1466. .noGoods {
  1467. display: flex;
  1468. flex-direction: column;
  1469. align-items: center;
  1470. &>img {
  1471. margin-top: 20rpx;
  1472. width: 300rpx;
  1473. height: 300rpx;
  1474. }
  1475. &>view {
  1476. font-size: 30rpx;
  1477. margin-top: 30rpx;
  1478. color: #666;
  1479. }
  1480. }
  1481. </style>