detail.vue 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482
  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. };
  378. },
  379. computed: {
  380. ...mapGetters(["userInfo", "playSectionId", "hideBuyState"]),
  381. allPrice() {
  382. if (!this.specList.length) return 0;
  383. let allPrice = this.specList.slice(-1)[0].specAttrList.reduce((a, b) => {
  384. if (b.check) {
  385. return a + b.standPrice;
  386. }
  387. return a;
  388. }, 0);
  389. return this.toFixed(allPrice);
  390. },
  391. goodsIds() {
  392. if (!this.specList.length) return [];
  393. return this.specList
  394. .slice(-1)[0]
  395. .specAttrList.filter((e) => e.check)
  396. .map((e) => e.goodsId);
  397. },
  398. isSingleChoice() {
  399. if (!this.specAttrPriceList.length) {
  400. return false;
  401. }
  402. return this.specAttrPriceList[0].specialGoods;
  403. },
  404. disCode() {
  405. return this.options.distributionCode;
  406. },
  407. isJx() {
  408. // 8 讲义资料商品
  409. return this.goodsType == 8;
  410. },
  411. },
  412. onLoad(option) {
  413. if (option.scene) {
  414. // scene 生成二维码扫码进来的
  415. let optObj = {};
  416. let arrs = decodeURIComponent(option.scene).split("&");
  417. for (let i = 0; i < arrs.length; i++) {
  418. optObj[arrs[i].split("=")[0]] = arrs[i].split("=")[1];
  419. }
  420. this.id = optObj.id;
  421. this.goodsType = optObj.goodsType || optObj.gt;
  422. console.log("optObj.sc:", optObj);
  423. uni.setStorageSync("newUser_sc", optObj.sc);
  424. uni.setStorageSync("shareActivityCode", optObj.sac);
  425. if (optObj.sac && this.$method.isLogin()) {
  426. this.editShareActivityCode();
  427. }
  428. } else {
  429. // 小程序正常跳转的
  430. // this.id => goodsId
  431. this.id = option.id;
  432. this.goodsType = option.goodsType || option.gt;
  433. this.options = option;
  434. if (option.sac) {
  435. uni.setStorageSync("shareActivityCode", option.sac);
  436. if (this.$method.isLogin()) {
  437. //已登录
  438. this.editShareActivityCode();
  439. this.getIsBuy(); // 判断是否已经购买过该课程
  440. }
  441. }
  442. }
  443. this.disCode ? this.getFxDetail() : this.getDetail();
  444. // 非讲义商品
  445. if (!this.isJx) {
  446. this.goodsCourseList();
  447. this.appCommonGoodsCourseModuleFreeExamList();
  448. } else {
  449. this.list = [
  450. {
  451. name: "资料目录",
  452. value: 3,
  453. },
  454. ];
  455. this.current = 3;
  456. }
  457. // #ifdef MP-WEIXIN
  458. wx.showShareMenu({
  459. withShareTicket: true,
  460. menus: ["shareAppMessage", "shareTimeline"],
  461. });
  462. // #endif
  463. },
  464. onUnload(option) {
  465. this.$store.commit("setPlaySectionId", { playSectionId: 0 });
  466. //移除所有的事件监听器
  467. uni.$off();
  468. },
  469. // 分享到朋友圈
  470. onShareTimeline() {
  471. return {
  472. title: this.detail.goodsName,
  473. query: "id=" + this.id,
  474. imageUrl: this.$method.splitImgHost(this.detail.coverUrl),
  475. };
  476. },
  477. // 分享给朋友
  478. onShareAppMessage() {
  479. return {
  480. title: this.detail.goodsName,
  481. path:
  482. `/pages3/course/detail?id=` + this.id + "&goodsType=" + this.goodsType,
  483. imageUrl: this.$method.splitImgHost(this.detail.coverUrl),
  484. };
  485. },
  486. mounted() {
  487. uni.$on("getSection", (item, listen) => {
  488. console.log("🚀 ~ file: detail.vue:578 ~ uni.$on ~ item:", item, listen);
  489. //播放试听
  490. this.listenSecond = listen.auditionMinute;
  491. if (this.listenSecond > 0) {
  492. if (item.recordingUrl) {
  493. if (this.vid && !this.refPlv) {
  494. this.refPlv = this.$refs.player;
  495. }
  496. this.vid = item.recordingUrl;
  497. if (this.refPlv) {
  498. this.refPlv.changeVid({
  499. vid: this.vid,
  500. videoCurrentTime: 0,
  501. });
  502. }
  503. } else {
  504. this.$u.toast("地址错误,无法播放");
  505. }
  506. } else {
  507. this.$u.toast("试听配置错误");
  508. }
  509. });
  510. this.updateChapterOpen(true);
  511. },
  512. methods: {
  513. ...mapMutations(["updateChapterOpen"]),
  514. itemWidth() {
  515. return 100 / this.list.length + "%";
  516. },
  517. // 修改用户活动邀请码
  518. editShareActivityCode() {
  519. console.log("修改用户活动邀请码");
  520. this.$http({
  521. url: "/app/user/edit/shareActivityCode",
  522. method: "post",
  523. data: {
  524. shareActivityCode: uni.getStorageSync("shareActivityCode"),
  525. },
  526. }).then((res) => {
  527. if (res.data.code == 200) {
  528. }
  529. });
  530. },
  531. appCommonGoodsCourseModuleFreeExamList() {
  532. // url: '/app/common/goods/course/moduleFreeExamList/'+data,
  533. this.$api.appCommonGoodsCourseModuleFreeExamList(this.id).then((res) => {
  534. if (res.data.data.length) {
  535. this.freeMenuList = res.data.data;
  536. this.list = [
  537. {
  538. name: "课程介绍",
  539. value: 0,
  540. },
  541. {
  542. name: "课程目录",
  543. value: 1,
  544. },
  545. {
  546. name: "赠送",
  547. value: 2,
  548. },
  549. ];
  550. } else {
  551. this.list = [
  552. {
  553. name: "课程介绍",
  554. value: 0,
  555. },
  556. {
  557. name: "课程目录",
  558. value: 1,
  559. },
  560. ];
  561. }
  562. console.log(this.list);
  563. });
  564. },
  565. selectGoodType(index) {
  566. if (index == this.selectGoodIndex) {
  567. return;
  568. }
  569. this.selectGoodIndex = index;
  570. this.changeData();
  571. },
  572. select(val) {
  573. val.check = !val.check;
  574. },
  575. checkboxChange(val) {
  576. if (!this.isSingleChoice) return;
  577. this.specList.slice(-1)[0].specAttrList.forEach((ele) => {
  578. if (val.name != ele.specAttributeId) {
  579. ele.check = false;
  580. }
  581. });
  582. },
  583. courseBusiness() {
  584. // url: '/app/common/course/business/'+data,
  585. this.$api.courseBusiness(this.detail.businessId).then((res) => {
  586. this.businessData = res.data.data;
  587. });
  588. },
  589. toFixed(number) {
  590. if (number > 0) {
  591. return number.toFixed(2);
  592. } else {
  593. return "0.00";
  594. }
  595. },
  596. timeupdate(time) {
  597. if (time >= this.listenSecond) {
  598. this.listenSecond = time + 100;
  599. let refPlv = this.$refs.player;
  600. refPlv.playPause();
  601. refPlv.exitFullScreen();
  602. uni.showModal({
  603. title: "提示",
  604. content: "试听结束,购买课程可学习全部",
  605. showCancel: false,
  606. success: (resst) => {
  607. this.vid = "";
  608. this.refPlv = "";
  609. },
  610. });
  611. }
  612. },
  613. openCourse(item) {
  614. this.courseId = item.courseId;
  615. item.down = !item.down;
  616. if (!item.down && item.menuList.length == 0) {
  617. this.getMenuList(item);
  618. }
  619. },
  620. addShopCart(goodsIds) {
  621. if (!Array.isArray(goodsIds)) {
  622. goodsIds = [goodsIds];
  623. }
  624. this.$api
  625. .addCart({
  626. goodsIds: goodsIds,
  627. choiceStatus: 1,
  628. })
  629. .then((res) => {
  630. if (res.data.code == 200) {
  631. uni.setStorageSync("updateCart", 1); //提醒刷新购物车
  632. uni.showToast({
  633. title: "添加成功",
  634. });
  635. } else {
  636. this.$u.toast(res.data.msg);
  637. }
  638. });
  639. },
  640. goodsCourseList() {
  641. // url: '/app/common/goods/course/list/'+ data,
  642. this.$api.goodsCourseList(this.id).then((res) => {
  643. console.log(
  644. "🚀 ~ file: detail.vue:708 ~ this.$api.goodsCourseList ~ res:",
  645. res
  646. );
  647. if (res.data.code == 200) {
  648. for (let i = 0; i < res.data.rows.length; i++) {
  649. let item = res.data.rows[i];
  650. item.down = true;
  651. item.menuList = [];
  652. }
  653. this.courseList = res.data.rows;
  654. this.getFirstCourse();
  655. // 不同
  656. if (this.goodsType == 1) {
  657. this.getCourseTeacher(res.data.rows);
  658. }
  659. }
  660. });
  661. },
  662. /**
  663. * 获取第一个有模块或者章的课程
  664. */
  665. async getFirstCourse() {
  666. for (let i = 0; i < this.courseList.length; i++) {
  667. let menuIndexOrFalse = await this.getCourseMenus(this.courseList[i]);
  668. if (menuIndexOrFalse !== false) {
  669. this.menuIndex = [i, menuIndexOrFalse];
  670. this.openCourse(this.courseList[i]);
  671. break;
  672. }
  673. }
  674. },
  675. getCourseMenus(item) {
  676. return new Promise((resolve) => {
  677. // url: '/app/common/course/menuList',
  678. this.$api.menuList({ courseId: item.courseId }).then((res) => {
  679. if (res.data.code == 200) {
  680. for (let i = 0; i < res.data.rows.length; i++) {
  681. if (res.data.rows[i].type == 1 || res.data.rows[i].type == 2) {
  682. resolve(i);
  683. break;
  684. }
  685. }
  686. }
  687. });
  688. });
  689. },
  690. getCourseTeacher(rows) {
  691. //获取商品双师资模板
  692. this.$api
  693. .getGoodsCourseTeacher({
  694. goodsId: this.id,
  695. })
  696. .then((res1) => {
  697. if (res1.data.data && res1.data.data.length > 0) {
  698. //课程老师模板
  699. let teacherTel = res1.data.data;
  700. //商品课程
  701. let courses = rows;
  702. teacherTel.forEach((tea) => {
  703. let dataList = [];
  704. let teacherList = [];
  705. courses.forEach((item) => {
  706. let data = tea.courseList.filter(
  707. (x) => x.courseId == item.courseId
  708. );
  709. if (data && data.length > 0) {
  710. dataList.push(item);
  711. teacherList = tea.courseList;
  712. }
  713. });
  714. let result = {
  715. teaList: teacherList,
  716. courseList: dataList,
  717. };
  718. this.goodsTeacher.push(result);
  719. });
  720. if (this.goodsTeacher && this.goodsTeacher.length > 0) {
  721. let courseIds = [];
  722. this.goodsTeacher.forEach((item) => {
  723. item.courseList.forEach((course) => {
  724. courseIds.push(course.courseId);
  725. });
  726. });
  727. if (courseIds.length > 0) {
  728. courses.forEach((item) => {
  729. if (!courseIds.includes(item.courseId)) {
  730. let data = {
  731. teaList: [],
  732. courseList: [],
  733. };
  734. data.courseList.push(item);
  735. this.goodsTeacher.push(data);
  736. }
  737. });
  738. }
  739. this.goodsTeacher.forEach((item) => {
  740. if (item.courseList && item.courseList.length > 0) {
  741. item.courseList[0].show = 1;
  742. }
  743. });
  744. }
  745. } else {
  746. //没有双师资模板
  747. rows.forEach((item) => {
  748. item.show = 1;
  749. let data = {
  750. teaList: [],
  751. courseList: [],
  752. };
  753. data.courseList.push(item);
  754. this.goodsTeacher.push(data);
  755. });
  756. console.log(this.goodsTeacher, "this.goodsTeacher");
  757. }
  758. });
  759. },
  760. //切换老师
  761. switchTeacher(data, tindex, gTindex) {
  762. // console.log(data,'data');
  763. this.States[gTindex] = tindex;
  764. this.teaIndex = tindex;
  765. this.goodsTeacher.forEach((item, index) => {
  766. if (item.teaList && item.teaList.length > 0) {
  767. let list = item.teaList.filter((x) => x.courseId == data.courseId);
  768. if (list && list.length > 0) {
  769. item.courseList.forEach((course, courseIndex) => {
  770. if (course.courseId == data.courseId) {
  771. this.$set(
  772. this.goodsTeacher[index].courseList[courseIndex],
  773. "show",
  774. 1
  775. );
  776. } else {
  777. this.$set(
  778. this.goodsTeacher[index].courseList[courseIndex],
  779. "show",
  780. 0
  781. );
  782. }
  783. });
  784. }
  785. }
  786. });
  787. console.log("切换后的this.goodsTeacher, ", this.goodsTeacher);
  788. },
  789. getMenuList(item) {
  790. this.$api.menuList({ courseId: item.courseId }).then((res) => {
  791. if (res.data.code == 200) {
  792. for (let i = 0; i < res.data.rows.length; i++) {
  793. let item = res.data.rows[i];
  794. item.down = true;
  795. item.id = item.menuId;
  796. item.name = item.menuName;
  797. }
  798. item.menuList = res.data.rows;
  799. }
  800. });
  801. },
  802. paramsFn() {
  803. return {
  804. listenConfigList: this.listenConfigList,
  805. };
  806. },
  807. getFxDetail() {
  808. let self = this;
  809. this.$api
  810. .fxGoodsDetail({
  811. goodsId: this.id,
  812. disCode: this.disCode,
  813. })
  814. .then((res) => {
  815. if (res.data.code == 200) {
  816. if (res.data.data) {
  817. if (res.data.data.mobileDetailHtml) {
  818. res.data.data.mobileDetailHtml =
  819. res.data.data.mobileDetailHtml.replace(
  820. /<img/gi,
  821. '<img style="max-width:100%;"'
  822. );
  823. }
  824. self.detail = res.data.data;
  825. this.courseBusiness();
  826. if (self.detail.goodsAuditionConfig) {
  827. self.listenConfigList = JSON.parse(
  828. self.detail.goodsAuditionConfig
  829. );
  830. }
  831. }
  832. }
  833. });
  834. },
  835. // 获取课程详情
  836. getDetail() {
  837. let self = this;
  838. this.$api.commonGoodsDetail(this.id).then((res) => {
  839. if (res.data.code == 200) {
  840. if (res.data.data) {
  841. if (res.data.data.mobileDetailHtml) {
  842. res.data.data.mobileDetailHtml =
  843. res.data.data.mobileDetailHtml.replace(
  844. /<img/gi,
  845. '<img style="max-width:100%;"'
  846. );
  847. }
  848. self.detail = res.data.data;
  849. this.courseBusiness();
  850. if (self.detail.goodsAuditionConfig) {
  851. self.listenConfigList = JSON.parse(
  852. self.detail.goodsAuditionConfig
  853. );
  854. }
  855. }
  856. }
  857. });
  858. },
  859. toConfirmList(id) {
  860. uni.navigateTo({
  861. url: "/pages2/order/confirm_list?id=" + id + this.addParam(),
  862. });
  863. },
  864. addParam(str = "") {
  865. if (this.disCode) {
  866. str += "&distributionCode=" + this.disCode;
  867. }
  868. if (this.options.linkCode) {
  869. str += "&linkCode=" + this.options.linkCode;
  870. }
  871. return str;
  872. },
  873. buy() {
  874. if (this.$method.isGoLogin()) {
  875. return;
  876. }
  877. // 判断有没有规格选择
  878. if (this.detail.specTemplateId) {
  879. this.isCarOrBuy = 2;
  880. this.getSpecDetail();
  881. return;
  882. }
  883. this.toConfirmList(this.id);
  884. },
  885. drawBuy() {
  886. if (!this.$method.isLogin()) {
  887. uni.navigateTo({
  888. url: "/pages4/login/login?isBack=" + true + "&isAct=1",
  889. });
  890. return;
  891. }
  892. this.$api
  893. .drowActGoods({
  894. url: location.href,
  895. goodsList: [this.detail],
  896. sellerName: this.options.sale,
  897. })
  898. .then((res) => {
  899. if (res.data.code == 200) {
  900. // this.$u.toast("领取成功");
  901. uni.showModal({
  902. title: "提示",
  903. content: "领取成功,是否现在去做题?",
  904. cancelText: "取消",
  905. confirmText: "确定",
  906. success: (res) => {
  907. if (res.confirm) {
  908. uni.switchTab({
  909. url: "/pages/questionBank/index",
  910. });
  911. }
  912. },
  913. });
  914. } else {
  915. this.$u.toast(res.data.msg);
  916. }
  917. });
  918. },
  919. addCart() {
  920. if (this.$method.isGoLogin()) {
  921. return;
  922. }
  923. // 判断有没有规格选择
  924. if (this.detail.specTemplateId) {
  925. this.isCarOrBuy = 1;
  926. this.getSpecDetail();
  927. return;
  928. }
  929. this.addShopCart(this.id);
  930. },
  931. getSpecDetail() {
  932. this.checkedAttrs = [];
  933. let data = {};
  934. let url = `/app/common/spec/${this.detail.specTemplateId}`;
  935. if (this.disCode) {
  936. url = "/app/common/distribution/spec";
  937. data = {
  938. disCode: this.disCode,
  939. specTemplateId: this.detail.specTemplateId,
  940. };
  941. }
  942. this.$http({
  943. url,
  944. method: "get",
  945. noToken: true,
  946. data,
  947. }).then((res) => {
  948. let data = res.data.data;
  949. if (data) {
  950. this.toggleSkuShow = true;
  951. this.specAttrPriceList = data.specAttrPriceList;
  952. this.specList = this.changeData(data.specList || []);
  953. } else {
  954. if (this.isCarOrBuy == 1) {
  955. // 加入购物车
  956. this.addShopCart(this.id);
  957. } else {
  958. this.toConfirmList(this.id);
  959. }
  960. this.closePop();
  961. }
  962. });
  963. },
  964. changeData(data = this.specList) {
  965. let len = data.length;
  966. if (!len) return [];
  967. data[len - 1].specAttrList.forEach((e, i) => {
  968. e.check = e.check || false;
  969. let id = e.specAttributeId;
  970. if (len > 1) {
  971. id =
  972. data[0].specAttrList[this.selectGoodIndex].specAttributeId +
  973. "," +
  974. id;
  975. }
  976. let item = this.specAttrPriceList.find((e) => e.specAttrIds == id);
  977. if (item) {
  978. e.standPrice = item.standPrice;
  979. e.goodsId = item.goodsId;
  980. } else {
  981. e.goodsId = null;
  982. }
  983. });
  984. // data.forEach((item, index) => {
  985. // if (index == len - 1) {
  986. // item.specAttrList.forEach((e, i) => {
  987. // e.check = false
  988. // })
  989. // }
  990. // })
  991. return data;
  992. },
  993. change(index) {
  994. this.current = index;
  995. },
  996. toShopcar() {
  997. uni.navigateTo({
  998. url: "/pages4/shopping/shoppingCart",
  999. });
  1000. },
  1001. getIsBuy() {
  1002. this.$http({
  1003. url: "/order/buyGoodsNotExpired",
  1004. method: "get",
  1005. data: { goodsId: this.id },
  1006. }).then((res) => {
  1007. if (res.data.code == 200) {
  1008. if (res.data.data) {
  1009. // 有data返回是已经购买过的课程
  1010. this.hadBuyCourse = res.data.data;
  1011. this.bugCourseModel = true;
  1012. }
  1013. }
  1014. });
  1015. },
  1016. changeKown() {
  1017. this.bugCourseModel = false;
  1018. },
  1019. async toStudy() {
  1020. let item = this.hadBuyCourse;
  1021. if (item.goodsType == 6) {
  1022. // 进入直播课
  1023. this.toLive(item);
  1024. return;
  1025. }
  1026. // /course/goodsRebuildStatus查询用户商品重修状态
  1027. let rebuildStatus = await this.courseGoodsRebuildStatus(
  1028. item.goodsId,
  1029. item.gradeId
  1030. );
  1031. if (rebuildStatus == 0) {
  1032. this.$navTo.togo("/pages2/learn/details", {
  1033. gradeId: item.gradeId,
  1034. goodsId: item.goodsId,
  1035. orderGoodsId: item.orderGoodsId,
  1036. });
  1037. return;
  1038. }
  1039. this.$method.checkLock().then((res) => {
  1040. this.$http({
  1041. url: "/course/courseList",
  1042. method: "get",
  1043. data: {
  1044. pageNum: 1,
  1045. pageSize: 1,
  1046. goodsId: item.goodsId,
  1047. gradeId: item.gradeId,
  1048. orderGoodsId: item.orderGoodsId,
  1049. },
  1050. }).then((res) => {
  1051. if (res.data.code == 200) {
  1052. if (res.data.total > 1) {
  1053. // this.$navTo.togo(`/pages2/wd/course?id=${item.goodsId}&gid=${item.gradeId}&orderGoodsId=${item.orderGoodsId}`);
  1054. uni.navigateTo({
  1055. url: `/pages3/polyv/detail?id=''&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}`,
  1056. });
  1057. } else if (res.data.total == 1) {
  1058. uni.navigateTo({
  1059. url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}`,
  1060. });
  1061. } else {
  1062. uni.showToast({
  1063. icon: "none",
  1064. title: "暂无可观看的视频课程",
  1065. });
  1066. }
  1067. }
  1068. });
  1069. });
  1070. },
  1071. toLive(item) {
  1072. this.$api
  1073. .courseCourseList({
  1074. pageNum: 1,
  1075. pageSize: 1,
  1076. goodsId: item.goodsId,
  1077. gradeId: 0,
  1078. orderGoodsId: item.orderGoodsId,
  1079. })
  1080. .then((res) => {
  1081. if (res.data.code == 200) {
  1082. if (res.data.total > 1) {
  1083. // uni.navigateTo({
  1084. // url:'/pages5/liveDetail/course?orderGoodsId='+item.orderGoodsId+'&goodsId='+item.goodsId+'&gradeId=0'
  1085. // })
  1086. uni.navigateTo({
  1087. url:
  1088. "/pages3/live/detail?orderGoodsId=" +
  1089. item.orderGoodsId +
  1090. "&goodsId=" +
  1091. item.goodsId +
  1092. '&gradeId=0&courseId=""',
  1093. });
  1094. } else if (res.data.total == 1) {
  1095. uni.navigateTo({
  1096. url:
  1097. "/pages3/live/detail?orderGoodsId=" +
  1098. item.orderGoodsId +
  1099. "&goodsId=" +
  1100. item.goodsId +
  1101. "&gradeId=0&courseId=" +
  1102. res.data.rows[0].courseId,
  1103. });
  1104. } else {
  1105. uni.showToast({
  1106. icon: "none",
  1107. title: "暂无可观看的直播课程",
  1108. });
  1109. }
  1110. }
  1111. });
  1112. },
  1113. /**
  1114. * @param {Object} goodsId 商品id
  1115. * 查询商品重修状态
  1116. */
  1117. courseGoodsRebuildStatus(goodsId, gradeId) {
  1118. return new Promise((resolve) => {
  1119. this.$http({
  1120. url: "/course/goodsRebuildStatus",
  1121. method: "get",
  1122. data: {
  1123. goodsId: goodsId,
  1124. gradeId: gradeId,
  1125. },
  1126. // noLoading: true,
  1127. // compleLoading: true, // 请求成功是否还要继续显示加载中
  1128. }).then((res) => {
  1129. resolve(res.data.data);
  1130. });
  1131. });
  1132. },
  1133. closePop() {
  1134. this.toggleSkuShow = false;
  1135. this.skuItem = {};
  1136. },
  1137. // 获取规格属性值对应的商品信息
  1138. getGoodsInfos(specAttrIds) {
  1139. this.$http({
  1140. url: "/app/common/attr/goods",
  1141. method: "get",
  1142. data: {
  1143. specTemplateId: this.detail.specTemplateId,
  1144. specAttrIds: specAttrIds.join(","),
  1145. },
  1146. noToken: true,
  1147. }).then((res) => {
  1148. if (res.data.code == 200) {
  1149. this.skuItem = res.data.data || {};
  1150. } else {
  1151. this.skuItem = {};
  1152. this.$u.toast("商品已下架, 请重新选择");
  1153. }
  1154. });
  1155. },
  1156. rightNowBuy() {
  1157. let goodsIds = [...new Set(this.goodsIds)];
  1158. this.$api.checkGoodsStatus({ goodsIds }).then((res) => {
  1159. if (res.data.code == 500) {
  1160. return this.$u.toast(res.data.msg);
  1161. }
  1162. if (this.isCarOrBuy == 1) {
  1163. // 加入购物车
  1164. this.addShopCart(goodsIds);
  1165. } else {
  1166. if (this.isSingleChoice) {
  1167. this.toConfirmList(goodsIds);
  1168. } else {
  1169. let data = [];
  1170. goodsIds.forEach((id) => {
  1171. data.push(this.specAttrPriceList.find((e) => e.goodsId == id));
  1172. });
  1173. this.$store.commit("setShoppingCartList", {
  1174. shoppingCartList: data,
  1175. });
  1176. this.$navTo.togo("/pages2/order/confirm_pay" + this.addParam("?"));
  1177. }
  1178. }
  1179. this.closePop();
  1180. });
  1181. },
  1182. },
  1183. provide() {
  1184. return {
  1185. paramsFn: this.paramsFn,
  1186. };
  1187. },
  1188. };
  1189. </script>
  1190. <style>
  1191. page {
  1192. background-color: #f2f2f2;
  1193. }
  1194. </style>
  1195. <style lang="scss" scope>
  1196. @import "./index.scss";
  1197. /deep/ {
  1198. .menuBox {
  1199. padding: 0;
  1200. }
  1201. }
  1202. .video_t2 {
  1203. font-size: 24rpx;
  1204. font-family: PingFang SC;
  1205. font-weight: 500;
  1206. color: #666666;
  1207. }
  1208. .video_t1 {
  1209. height: 80rpx;
  1210. color: #333333;
  1211. line-height: 80rpx;
  1212. font-size: 30rpx;
  1213. font-family: PingFang SC;
  1214. font-weight: bold;
  1215. color: #333333;
  1216. overflow: hidden;
  1217. text-overflow: ellipsis;
  1218. white-space: nowrap;
  1219. }
  1220. .video_t1_t {
  1221. display: flex;
  1222. flex-direction: column;
  1223. height: 80rpx;
  1224. color: #333333;
  1225. text-align: center;
  1226. align-items: center;
  1227. border-left: solid 1px #d6d6db;
  1228. }
  1229. .video_play {
  1230. position: absolute;
  1231. width: 95rpx;
  1232. height: 95rpx;
  1233. top: 0;
  1234. left: 0;
  1235. right: 0;
  1236. bottom: 0;
  1237. margin: auto;
  1238. }
  1239. .video_box {
  1240. position: relative;
  1241. }
  1242. .contents {
  1243. width: 100%;
  1244. height: 100%;
  1245. background-color: #ffffff;
  1246. margin-top: 16rpx;
  1247. overflow: hidden;
  1248. }
  1249. .cou_title {
  1250. padding: 24rpx 32rpx 40rpx 32rpx;
  1251. display: flex;
  1252. flex-direction: column;
  1253. justify-content: space-around;
  1254. }
  1255. .prices {
  1256. .price_word {
  1257. display: flex;
  1258. font-size: 44rpx;
  1259. font-weight: 800;
  1260. color: #fc3f3f;
  1261. margin-bottom: 8rpx;
  1262. view::before {
  1263. content: "¥";
  1264. font-size: 26rpx;
  1265. font-weight: bold;
  1266. }
  1267. }
  1268. .sale {
  1269. color: #999999;
  1270. font-size: 28rpx;
  1271. margin-left: 8rpx;
  1272. }
  1273. .price_line {
  1274. color: #999999;
  1275. font-size: 28rpx;
  1276. text-decoration: line-through;
  1277. font-weight: 400;
  1278. }
  1279. .free {
  1280. font-size: 32rpx;
  1281. }
  1282. }
  1283. // tab
  1284. .tabs {
  1285. // width: 100%;
  1286. height: 78rpx;
  1287. display: flex;
  1288. align-items: center;
  1289. justify-content: space-between;
  1290. background-color: #f2f7ff;
  1291. border-radius: 38rpx;
  1292. margin: 24rpx;
  1293. padding: 0rpx 5rpx;
  1294. .tab_item {
  1295. flex: 1;
  1296. height: 65rpx;
  1297. line-height: 65rpx;
  1298. font-size: 28rpx;
  1299. font-weight: bold;
  1300. border-radius: 32rpx;
  1301. text-align: center;
  1302. color: #333;
  1303. &.nactive {
  1304. color: #fff;
  1305. background-color: #3577e8;
  1306. }
  1307. }
  1308. // /deep/ .u-tabs {
  1309. // background:none!important;
  1310. // }
  1311. }
  1312. .courseName {
  1313. white-space: nowrap;
  1314. overflow: hidden;
  1315. text-overflow: ellipsis;
  1316. }
  1317. .videoBox {
  1318. background-color: #ffffff;
  1319. width: 100%;
  1320. /* height: 680rpx; */
  1321. z-index: 999;
  1322. }
  1323. .icon_up {
  1324. width: 32rpx;
  1325. height: 32rpx;
  1326. }
  1327. .courseItemBox {
  1328. background: #ffffff;
  1329. border-radius: 16rpx;
  1330. padding: 0 10rpx;
  1331. margin-bottom: 20rpx;
  1332. }
  1333. .courseItem {
  1334. height: 80rpx;
  1335. color: #333333;
  1336. font-size: 32rpx;
  1337. line-height: 80rpx;
  1338. font-weight: bold;
  1339. display: flex;
  1340. justify-content: space-between;
  1341. }
  1342. .content {
  1343. background-color: #ffffff;
  1344. width: 100%;
  1345. }
  1346. .btn2 {
  1347. width: 187rpx;
  1348. height: 79rpx;
  1349. line-height: 79rpx;
  1350. background: #fc3f3f;
  1351. border-radius: 40rpx;
  1352. text-align: center;
  1353. font-size: 24rpx;
  1354. }
  1355. .btn1 {
  1356. width: 187rpx;
  1357. height: 79rpx;
  1358. line-height: 79rpx;
  1359. background: #ffb102;
  1360. border-radius: 40rpx;
  1361. text-align: center;
  1362. margin-right: 11rpx;
  1363. font-size: 24rpx;
  1364. }
  1365. .wk_icon {
  1366. width: 24rpx;
  1367. height: 24rpx;
  1368. margin-right: 12rpx;
  1369. }
  1370. .noteTag,
  1371. .blackFont {
  1372. font-size: 26rpx;
  1373. font-family: PingFang SC;
  1374. font-weight: 400;
  1375. color: #999999;
  1376. align-items: center;
  1377. margin: 0 4rpx;
  1378. line-height: 60rpx;
  1379. }
  1380. .priceTag {
  1381. /* font-size: 30rpx;
  1382. font-family: PingFang SC;
  1383. font-weight: bold;
  1384. color: #FF2D55; */
  1385. width: 60rpx;
  1386. height: 40rpx;
  1387. line-height: 40rpx;
  1388. text-align: center;
  1389. border: 1rpx solid #333;
  1390. }
  1391. .titleTag {
  1392. font-size: 32rpx;
  1393. font-weight: bold;
  1394. color: #333333;
  1395. // margin-left: 8rpx;
  1396. }
  1397. .yearTag {
  1398. width: 80rpx;
  1399. height: 32rpx;
  1400. background: #ebf5ff;
  1401. border: 2rpx solid #007aff;
  1402. border-radius: 16rpx;
  1403. font-size: 24rpx;
  1404. color: #007aff;
  1405. text-align: center;
  1406. line-height: 32rpx;
  1407. }
  1408. .itemBox {
  1409. background: #ffffff;
  1410. box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
  1411. border-radius: 24rpx;
  1412. width: 100%;
  1413. padding: 20rpx;
  1414. margin-bottom: 20rpx;
  1415. }
  1416. // 老师名字样式
  1417. .teacher_names {
  1418. display: flex;
  1419. padding-bottom: 15rpx;
  1420. border-bottom: 2rpx solid #f0f0f0;
  1421. .names {
  1422. padding: 6rpx 12rpx;
  1423. font-size: 26rpx;
  1424. color: #969696;
  1425. background: #f8f8f8;
  1426. border-radius: 8rpx;
  1427. margin-right: 10rpx;
  1428. &.nactive {
  1429. color: #3f8dfd;
  1430. background: #f2f7ff;
  1431. }
  1432. }
  1433. }
  1434. </style>