detail.vue 41 KB

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