detail.vue 40 KB

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