detail.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862
  1. <template>
  2. <view>
  3. <nav-bar title="题库详情"></nav-bar>
  4. <view style="background-color: #FFFFFF;">
  5. <image :src="$method.splitImgHost(goodsData.coverUrl)" style="width: 100%;height: 400rpx;"></image>
  6. <view class="cou_title">
  7. <view class="title_name">
  8. <view class="titleTag">{{ goodsData.goodsName }}</view>
  9. </view>
  10. <view style="display: flex;justify-content: space-between;margin-top: 13rpx;">
  11. <view class="prices">
  12. <!-- <text class="price_sym"></text> -->
  13. <text v-if="goodsData.standPrice" class="price_word">¥ {{ goodsData.standPrice }}</text>
  14. <text v-else class="price_word free">免费</text>
  15. <text v-if="goodsData.linePrice" class="sale"> ¥ </text>
  16. <text v-if="goodsData.linePrice" class="price_line"> {{ goodsData.linePrice }}</text>
  17. </view>
  18. <view class="noteTag">
  19. <!-- 共 <text class="blackFont">{{ goodsData.chapterNum }} 张卷 {{goodsData || '-'}}</text> 道题 -->
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="contents">
  25. <!-- <view>
  26. <view><u-tabs :list="list" item-width="50%" font-size="30" bar-width="24" :current="current" @change="change" active-color="#007AFF"></u-tabs></view>
  27. </view> -->
  28. <view class="tabs">
  29. <view v-for="(item, index) in list" :key="index" class="tab_item"
  30. :class="[{nactive: current == index}]" @click="change(index)">{{ item.name }}</view>
  31. </view>
  32. <view class="intro" v-if="current == 0">
  33. <view v-if="goodsData.mobileDetailHtml" class="content" style="padding:10rpx;"><rich-text :nodes="goodsData.mobileDetailHtml"></rich-text></view>
  34. </view>
  35. <view class="title-list" v-if="current == 1">
  36. <view class="content">
  37. <view class="list" v-for="(item1, index1) in bankList" :key="index1">
  38. <template v-if="item1.type == 1">
  39. <view class="moduleItem" @click="clickModule(index1,item1.majorId)">
  40. <view class="courseName">{{ item1.name }}</view>
  41. <view>
  42. <image src="/static/icon/up.png" class="icon_up" v-if="!item1.showList"></image>
  43. <image src="/static/icon/down.png" class="icon_up" v-if="item1.showList"></image>
  44. </view>
  45. </view>
  46. <template v-if="item1.showList">
  47. <view v-for="(item2, index2) in item1.list" :key="index2">
  48. <view class="section" @click="changeItem(index1,index2,item2.chapterExamId,item1.type)">
  49. <!-- <image src="/static/icon/down1.png" class="icon_up" v-if="item2.showList"></image>
  50. <image src="/static/icon/up1.png" class="icon_up" v-if="!item2.showList"></image> -->
  51. <u-icon v-if="!item2.showList" name="arrow-right" color="#999" size="24"></u-icon>
  52. <u-icon v-if="item2.showList" name="arrow-down" color="#999" size="24"></u-icon>
  53. <text class="item_name">{{ item2.name }}</text>
  54. </view>
  55. <view class="article-list" v-if="item2.showList">
  56. <view class="article" :class="{ active: showTest(article.examId) }" v-for="(article, index3) in item2.list" :key="index3">
  57. <view class="flex_auto">{{ article.examName }}</view>
  58. <view class="btn" @click="goTest(item1.type,article)" v-if="showTest(article.examId)">试做</view>
  59. </view>
  60. </view>
  61. <u-line></u-line>
  62. </view>
  63. </template>
  64. </template>
  65. <template v-if="item1.type == 2">
  66. <view class="section" @click="changeItem(index1,'',item1.majorId,item1.type)" >
  67. <!-- <image src="/static/icon/down1.png" class="icon_up" v-if="item1.showList"></image>
  68. <image src="/static/icon/up1.png" class="icon_up" v-if="!item1.showList"></image> -->
  69. <u-icon v-if="!item1.showList" name="arrow-right" color="#999" size="24"></u-icon>
  70. <u-icon v-if="item1.showList" name="arrow-down" color="#999" size="24"></u-icon>
  71. <text class="item_name">{{ item1.name }}</text>
  72. </view>
  73. <view class="article-list" v-if="item1.showList" >
  74. <view class="article" :class="{active:showTest(article.examId)}" :key="index2" v-for="(article,index2) in item1.list">
  75. <view class="flex_auto">{{article.examName}}</view>
  76. <view class="btn" @click="goTest(item1.type,article)" v-if="showTest(article.examId)">试做</view>
  77. </view>
  78. </view>
  79. </template>
  80. <template v-if="item1.type == 3">
  81. <view class="article" :class="{ active: showTest(item1.majorId) }">
  82. <view class="flex_auto">{{ item1.name }}</view>
  83. <view class="btn" @click="goTest(item1.type,item1)" v-if="showTest(item1.majorId)">试做</view>
  84. </view>
  85. </template>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. <view class="bottomBox" v-if="!hideBuyState">
  91. <!-- <view class="priceTag">¥ {{ toFixed(goodsData.standPrice) }}</view> -->
  92. <view class="icons">
  93. <view class="icon_item ones">
  94. <image src="/static/index/share.png" class="share"></image>
  95. <button type="default" open-type="share" class="bt_share"></button>
  96. <view class="share_w">分享</view>
  97. </view>
  98. <view class="icon_item">
  99. <image src="/static/index/shopcar.png" class="shopcar" @click="toShopcar()"></image>
  100. <view class="share_w">购物车</view>
  101. </view>
  102. </view>
  103. <view style="display: flex;color: #FFFFFF;align-items: center;">
  104. <view class="btn1" @click="addCart">加购物车</view>
  105. <view class="btn2" @click="buy">立即购买</view>
  106. </view>
  107. </view>
  108. <!-- 已购买过课程的弹窗 -->
  109. <u-popup v-model="bugCourseModel" mode="center" border-radius="40">
  110. <view class="had_bugCourse">
  111. <image src="/pages2/static/hadBug.png" class="share"></image>
  112. <view class="tips">
  113. <view class="warns">温馨提示</view>
  114. <view class="words">您<text>已购买过</text>该商品课程</view>
  115. <view class="words">可立即前往学习</view>
  116. </view>
  117. <view class="tip_botton">
  118. <view class="cancel_btn" @click="changeKown()">知道了</view>
  119. <view class="confirm_btn" @click="toStudy()">去学习</view>
  120. </view>
  121. </view>
  122. </u-popup>
  123. <!-- 选择规格弹窗 -->
  124. <u-popup v-model="toggleSkuShow" mode="bottom" border-radius="40">
  125. <view class="popup_box">
  126. <view class="check_head">
  127. <view class="headers">
  128. <view class="grade">选择规格</view>
  129. <u-icon name="close" color="#9C9C9C" size="40" @click="closePop()"></u-icon>
  130. </view>
  131. </view>
  132. <view v-if="Object.keys(skuItem).length" class="pop_prices">
  133. <view class="lefts">
  134. <image :src="$method.splitImgHost(skuItem.coverUrl)" class="imgs"></image>
  135. </view>
  136. <view class="rights">
  137. <view class="goods_titles">{{ skuItem.goodsName }}</view>
  138. <view class="goods_price">¥{{ skuItem.standPrice }}</view>
  139. </view>
  140. </view>
  141. <view class="lines"></view>
  142. <view class="check_con">
  143. <scroll-view scroll-y="true" style="height: 490rpx;">
  144. <view v-for="(item, index) in specList" :key="index" class="check_items">
  145. <view class="grades">{{ item.name }}</view>
  146. <!-- <scroll-view scroll-y="true" style="height: 180rpx;"> -->
  147. <view class="grade_names">
  148. <view class="course_items" v-for="(child, c_index) in item.specAttrList" :key="c_index" :class="{'nactive': child.check }"
  149. @click="selectSku(child, index)">
  150. {{ child.name }}
  151. </view>
  152. </view>
  153. <!-- </scroll-view> -->
  154. </view>
  155. </scroll-view>
  156. </view>
  157. <view class="confirm_btns">
  158. <view v-if="Object.keys(skuItem).length == 0 || specList.length != isCheckSku" class="right_now r_disable">确 定</view>
  159. <view v-else class="right_now" @click="rightNowBuy()">确 定</view>
  160. </view>
  161. </view>
  162. </u-popup>
  163. </view>
  164. </template>
  165. <script>
  166. // import { websocket } from '@/common/socket.js';
  167. import { mapGetters } from 'vuex';
  168. export default {
  169. data() {
  170. return {
  171. list: [
  172. {
  173. name: '详情'
  174. },
  175. {
  176. name: '大纲'
  177. }
  178. ],
  179. current: 0,
  180. id: '',
  181. goodsData: {},
  182. bankList: [],
  183. goodsExamConfig: [],
  184. bugCourseModel: false, // 弹窗
  185. hadBuyCourse: {}, // 已购买课程信息
  186. toggleSkuShow: false,
  187. skuItem: {},
  188. isCarOrBuy: 1, // 1加入购物车 2立即购买
  189. specList: [], // 规格列表
  190. };
  191. },
  192. filters: {
  193. formatDate: function(value) {
  194. var date = new Date(value); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  195. var Y = date.getFullYear();
  196. return Y;
  197. }
  198. },
  199. onUnload() {},
  200. computed: {
  201. ...mapGetters(['userInfo','hideBuyState']),
  202. isCheckSku() {
  203. let checkCout = 0
  204. this.specList.forEach((item, index) => {
  205. if (item.specAttrList && item.specAttrList.length) {
  206. item.specAttrList.forEach((child, c_index) => {
  207. if (child.check) {
  208. checkCout++
  209. }
  210. })
  211. }
  212. })
  213. return checkCout
  214. },
  215. },
  216. onLoad(option) {
  217. if (option.scene) {
  218. // scene 生成二维码扫码进来的
  219. let optObj = {}
  220. let arrs = decodeURIComponent(option.scene).split('&')
  221. for (let i = 0; i < arrs.length; i++) {
  222. optObj[arrs[i].split('=')[0]] = arrs[i].split('=')[1]
  223. }
  224. this.id = optObj.id
  225. uni.setStorageSync('newUser_sc', optObj.sc)
  226. uni.setStorageSync("shareActivityCode", optObj.shareActivityCode)
  227. if (optObj.shareActivityCode && this.$method.isLogin()) {
  228. this.editShareActivityCode()
  229. }
  230. } else {
  231. // 小程序正常跳转的
  232. // this.id => goodsId
  233. this.id = option.id
  234. if (option.shareActivityCode) {
  235. uni.setStorageSync("shareActivityCode", option.shareActivityCode)
  236. if (this.$method.isLogin()) {
  237. //已登录
  238. this.editShareActivityCode()
  239. }
  240. }
  241. }
  242. this.getDetail();
  243. this.goodsBankList();
  244. this.getIsBuy() // 判断是否已经购买过该课程
  245. wx.showShareMenu({
  246. withShareTicket: true,
  247. menus: ["shareAppMessage", "shareTimeline"]
  248. })
  249. },
  250. onShow() {},
  251. // 分享到朋友圈
  252. onShareTimeline() {
  253. return {
  254. title: this.goodsData.goodsName,
  255. query: 'id=' + this.id,
  256. imageUrl: this.$method.splitImgHost(this.goodsData.coverUrl)
  257. }
  258. },
  259. onShareAppMessage() {
  260. return {
  261. title: this.goodsData.goodsName,
  262. path: `/pages2/bank/detail?id=` + this.id,
  263. imageUrl: this.$method.splitImgHost(this.goodsData.coverUrl)
  264. }
  265. },
  266. methods: {
  267. // 修改用户活动邀请码
  268. editShareActivityCode() {
  269. this.$http({
  270. url: '/app/user/edit/shareActivityCode',
  271. method: "post",
  272. data: {
  273. shareActivityCode: uni.getStorageSync("shareActivityCode")
  274. }
  275. }).then((res) => {
  276. if (res.data.code == 200) {}
  277. })
  278. },
  279. toFixed(number) {
  280. if(number) {
  281. return number.toFixed(2)
  282. } else {
  283. return '0.00'
  284. }
  285. },
  286. getDetail() {
  287. // '/app/common/goods/'+ data 获取商品详细信息
  288. this.$api.commonGoodsDetail(this.id).then(res => {
  289. if (res.data.data){
  290. if (res.data.data.mobileDetailHtml) {
  291. res.data.data.mobileDetailHtml = res.data.data.mobileDetailHtml.replace(/<img/gi, '<img style="max-width:100%;"');
  292. }
  293. this.goodsData = res.data.data;
  294. this.goodsExamConfig = JSON.parse(res.data.data.goodsExamConfig);
  295. }
  296. });
  297. },
  298. goodsBankList() {
  299. this.$api
  300. .goodsBankList({
  301. goodsId: this.id
  302. })
  303. .then(res => {
  304. console.log(res);
  305. this.bankList = res.data.data;
  306. this.showAllCharpter();
  307. });
  308. },
  309. /**
  310. * 展示第一个章下的节内容
  311. */
  312. showAllCharpter() {
  313. for(let i = 0; i < this.bankList.length; i++) {
  314. if(this.bankList[i].type == 1) { //第一个是模块直接展开,再展开章下面的节
  315. this.$api
  316. .goodsChapterList({
  317. moduleExamId: this.bankList[i].majorId
  318. })
  319. .then(res => {
  320. this.$set(this.bankList[i], 'showList', true);
  321. this.$set(this.bankList[i], 'list', res.data.data);
  322. this.changeItem(i,0,this.bankList[i].list[0].chapterExamId,this.bankList[i].type)
  323. });
  324. break;
  325. } else if(this.bankList[i].type == 2) { //第一个章展开下面的节
  326. this.changeItem(i,'',this.bankList[i].majorId,this.bankList[i].type)
  327. break;
  328. }
  329. }
  330. },
  331. goodsChapterList(bank, id) {
  332. this.$api
  333. .goodsChapterList({
  334. moduleExamId: id
  335. })
  336. .then(res => {
  337. this.$set(bank, 'list', res.data.data);
  338. });
  339. },
  340. goTest(type,item) {
  341. if(type == 1) {
  342. uni.setStorageSync('testname',item.examName)
  343. uni.navigateTo({
  344. url:'/pages2/bank/questionBankTest?id=' + item.examId + '&num=' + this.showTest(item.examId).num
  345. })
  346. } else if(type == 2) {
  347. uni.setStorageSync('testname',item.examName)
  348. uni.navigateTo({
  349. url:'/pages2/bank/questionBankTest?id='+item.examId+'&num='+ this.showTest(item.examId).num
  350. })
  351. } else if(type == 3) {
  352. uni.setStorageSync('testname',item.name)
  353. uni.navigateTo({
  354. url:'/pages2/bank/questionBankTest?id=' + item.majorId + '&num=' + this.showTest(item.majorId).num
  355. })
  356. }
  357. },
  358. showTest(id) {
  359. return this.goodsExamConfig.find(item => item.examId == id);
  360. },
  361. clickModule(index,id) {
  362. if (this.bankList[index].list) {
  363. this.$set(this.bankList[index], 'showList', !this.bankList[index].showList);
  364. return;
  365. }
  366. this.$api
  367. .goodsChapterList({
  368. moduleExamId: id
  369. })
  370. .then(res => {
  371. this.$set(this.bankList[index], 'showList', true);
  372. this.$set(this.bankList[index], 'list', res.data.data);
  373. });
  374. },
  375. buy() {
  376. if (this.$method.isGoLogin()) {
  377. return;
  378. }
  379. // 判断有没有规格选择
  380. if (this.goodsData.specTemplateId) {
  381. this.isCarOrBuy = 2
  382. this.getSpecDetail()
  383. return
  384. }
  385. this.$navTo.togo('/pages2/order/confirm_list?id=' + this.id);
  386. },
  387. addCart() {
  388. // this.getSpecDetail()
  389. // return
  390. if (this.$method.isGoLogin()) {
  391. return;
  392. }
  393. // 判断有没有规格选择
  394. if (this.goodsData.specTemplateId) {
  395. this.isCarOrBuy = 1
  396. this.getSpecDetail()
  397. return
  398. }
  399. this.addShopCart(this.id)
  400. },
  401. addShopCart(goodsId) {
  402. this.$api.addCart({ goodsId: goodsId }).then(res => {
  403. if (res.data.code == 200) {
  404. uni.setStorageSync('updateCart', 1); //提醒刷新购物车
  405. uni.showToast({
  406. title: '添加成功'
  407. });
  408. } else {
  409. this.$u.toast(res.data.msg);
  410. }
  411. });
  412. },
  413. getSpecDetail() {
  414. this.$http({
  415. url: `/app/common/spec/${this.goodsData.specTemplateId}`,
  416. method: 'get',
  417. noToken: true
  418. }).then((res) => {
  419. let data = res.data.data
  420. if (data) {
  421. this.toggleSkuShow = true
  422. this.specList = data && (data.specList || [])
  423. this.specList.forEach((item, index) => {
  424. item.specAttrList.forEach((child, i_index) => {
  425. this.$set(this.specList[index].specAttrList[i_index], 'check', false)
  426. })
  427. })
  428. } else {
  429. if (this.isCarOrBuy == 1) { // 加入购物车
  430. this.addShopCart(this.id)
  431. } else {
  432. this.$navTo.togo('/pages2/order/confirm_list?id='+this.id);
  433. }
  434. this.closePop()
  435. }
  436. })
  437. },
  438. change(index) {
  439. this.current = index;
  440. },
  441. changeItem(index1,index2,id,type) {
  442. if (type == 1) {
  443. console.log(1)
  444. if (this.bankList[index1].list[index2].list) {
  445. this.$set(this.bankList[index1].list[index2], 'showList', !this.bankList[index1].list[index2].showList);
  446. return;
  447. }
  448. this.$api
  449. .goodsExamList({
  450. chapterExamId: id
  451. })
  452. .then(res => {
  453. this.$set(this.bankList[index1].list[index2], 'showList', true);
  454. this.$set(this.bankList[index1].list[index2], 'list', res.data.data);
  455. });
  456. } else if (type == 2) {
  457. console.log(2)
  458. if (this.bankList[index1].list) {
  459. this.$set(this.bankList[index1], 'showList', !this.bankList[index1].showList);
  460. return;
  461. }
  462. this.$api
  463. .goodsExamList({
  464. chapterExamId: id
  465. })
  466. .then(res => {
  467. this.$set(this.bankList[index1], 'showList', true);
  468. this.$set(this.bankList[index1], 'list', res.data.data);
  469. });
  470. }
  471. },
  472. toShopcar() {
  473. uni.navigateTo({
  474. url: '/pages4/shopping/shoppingCart'
  475. })
  476. },
  477. getIsBuy() {
  478. this.$http({
  479. url: '/order/buyGoodsNotExpired',
  480. method: 'get',
  481. data: { goodsId: this.id }
  482. }).then((res) => {
  483. if (res.data.code == 200) {
  484. if (res.data.data) { // 有data返回是已经购买过的课程
  485. this.hadBuyCourse = res.data.data
  486. this.bugCourseModel = true
  487. }
  488. }
  489. })
  490. },
  491. changeKown() {
  492. this.bugCourseModel = false
  493. },
  494. toStudy() {
  495. let sysTime = this.$method.timest()
  496. const { serviceStartTime, serviceEndTime, goodsId, orderGoodsId} = this.hadBuyCourse
  497. if (serviceStartTime && serviceEndTime && (sysTime <= serviceStartTime || sysTime >= serviceEndTime)) {
  498. uni.showToast({
  499. icon: 'none',
  500. title: '不在学习服务期,不能进入学习'
  501. })
  502. return;
  503. }
  504. uni.navigateTo({
  505. url:'/pages2/bank/question_detail?id='+goodsId+'&orderGoodsId='+orderGoodsId
  506. })
  507. this.bugCourseModel = false
  508. },
  509. closePop() {
  510. this.toggleSkuShow = false
  511. this.skuItem = {}
  512. },
  513. selectSku(item, index) {
  514. this.specList[index].specAttrList.forEach((i_item, i_index) => {
  515. if (item.specAttributeId == i_item.specAttributeId) {
  516. this.$set(this.specList[index].specAttrList[i_index], 'check', true)
  517. } else {
  518. this.$set(this.specList[index].specAttrList[i_index], 'check', false)
  519. }
  520. })
  521. // console.log('this.specList', this.specList, this.isCheckSku)
  522. if (this.specList.length == this.isCheckSku) {
  523. let specAttrIds = []
  524. this.specList.forEach((item) => {
  525. let result = item.specAttrList.find(e => e.check)
  526. if (result) {
  527. specAttrIds.push(result.specAttributeId)
  528. }
  529. })
  530. this.getGoodsInfos(specAttrIds)
  531. }
  532. },
  533. // 获取规格属性值对应的商品信息
  534. getGoodsInfos(specAttrIds) {
  535. this.$http({
  536. url: '/app/common/attr/goods',
  537. method: 'get',
  538. data: {
  539. specTemplateId: this.goodsData.specTemplateId,
  540. specAttrIds: specAttrIds.join(',')
  541. },
  542. noToken: true
  543. }).then((res) => {
  544. if (res.data.code == 200) {
  545. this.skuItem = res.data.data || {}
  546. } else {
  547. this.skuItem = {}
  548. this.$u.toast('商品已下架, 请重新选择')
  549. }
  550. })
  551. },
  552. rightNowBuy() {
  553. if (this.specList.length != this.isCheckSku) {
  554. this.$u.toast('请先选择所有的规格')
  555. return
  556. }
  557. if (this.skuItem.goodsStatus == 0) {
  558. this.$u.toast('商品已下架, 请重新选择')
  559. return
  560. }
  561. let sysTime = this.$method.timest()
  562. if (sysTime <= this.skuItem.validityStartTime || sysTime >= this.skuItem.validityEndTime) {
  563. this.$u.toast('商品不在有效期, 请重新选择')
  564. return
  565. }
  566. if (this.isCarOrBuy == 1) { // 加入购物车
  567. this.addShopCart(this.skuItem.goodsId)
  568. } else {
  569. this.$navTo.togo('/pages2/order/confirm_list?id='+this.skuItem.goodsId);
  570. }
  571. this.closePop()
  572. }
  573. }
  574. };
  575. </script>
  576. <style>
  577. page {
  578. background-color: #F2F2F2;
  579. }
  580. </style>
  581. <style lang="scss" scope>
  582. @import '../../pages3/course/index.scss';
  583. .contents {
  584. width: 100%;
  585. height: 100%;
  586. background-color: #ffffff;
  587. margin-top: 16rpx;
  588. overflow: hidden;
  589. // tab
  590. .tabs {
  591. // width: 100%;
  592. height: 78rpx;
  593. display: flex;
  594. align-items: center;
  595. justify-content: space-between;
  596. background-color: #F2F7FF;
  597. border-radius: 38rpx;
  598. margin: 24rpx;
  599. padding: 0rpx 5rpx;
  600. .tab_item {
  601. width: 345rpx;
  602. height: 65rpx;
  603. line-height: 65rpx;
  604. font-size: 28rpx;
  605. font-weight: bold;
  606. border-radius: 32rpx;
  607. text-align: center;
  608. color: #333;
  609. &.nactive {
  610. color: #fff;
  611. background-color: #3577E8;
  612. }
  613. // &.twoBtn {
  614. // width: 50%;
  615. // }
  616. }
  617. }
  618. }
  619. .cou_title {
  620. padding: 24rpx 32rpx 40rpx 32rpx;
  621. display: flex;
  622. flex-direction: column;
  623. justify-content: space-around;
  624. }
  625. .prices {
  626. .price_word {
  627. font-size: 40rpx;
  628. font-weight: 800;
  629. color: #FC3F3F;
  630. }
  631. .sale {
  632. color: #999999;
  633. font-size: 28rpx;
  634. margin-left: 8rpx;
  635. }
  636. .price_line {
  637. color: #999999;
  638. font-size: 28rpx;
  639. text-decoration:line-through;
  640. font-weight: 400;
  641. }
  642. .free {
  643. font-size: 32rpx;
  644. }
  645. }
  646. .courseName {
  647. white-space: nowrap;
  648. overflow: hidden;
  649. text-overflow: ellipsis;
  650. }
  651. .icon_up {
  652. width: 32rpx;
  653. height: 32rpx;
  654. }
  655. .intro {
  656. background: #fff;
  657. padding: 16rpx 16rpx 124rpx;
  658. .content {
  659. background: #fff;
  660. border-radius: 16rpx;
  661. .top {
  662. border-radius: 16rpx;
  663. padding: 32rpx 28rpx 16rpx;
  664. font-size: 30rpx;
  665. color: #333333;
  666. }
  667. .img {
  668. width: 100%;
  669. }
  670. }
  671. }
  672. .moduleItem {
  673. height: 80rpx;
  674. color: #333333;
  675. font-size: 32rpx;
  676. line-height: 80rpx;
  677. font-weight: bold;
  678. display: flex;
  679. justify-content: space-between;
  680. }
  681. .title-list {
  682. background: #fff;
  683. padding: 16rpx 16rpx 124rpx;
  684. .content {
  685. .list {
  686. background: #fff;
  687. margin-bottom: 30rpx;
  688. overflow: hidden;
  689. border-radius: 16rpx;
  690. padding: 10rpx 16rpx;
  691. .module {
  692. font-size: 32rpx;
  693. color: #333333;
  694. .icon {
  695. margin-right: 10rpx;
  696. }
  697. }
  698. .section {
  699. font-size: 30rpx;
  700. color: #333;
  701. white-space: nowrap;
  702. overflow: hidden;
  703. text-overflow: ellipsis;
  704. padding: 20rpx 0;
  705. display: flex;
  706. align-items: center;
  707. border-bottom: 1rpx solid #eee;
  708. }
  709. .item_name {
  710. font-size: 24rpx;
  711. font-family: PingFang SC;
  712. font-weight: bold;
  713. color: #333;
  714. white-space: nowrap;
  715. overflow: hidden;
  716. text-overflow: ellipsis;
  717. margin-left: 8rpx;
  718. }
  719. // .article-list {
  720. // margin-top:20rpx;
  721. // }
  722. .article {
  723. padding:10rpx 0;
  724. min-height: 80rpx;
  725. display: flex;
  726. align-items: center;
  727. margin-left: 35rpx;
  728. font-size: 30rpx;
  729. color: #666666;
  730. border-bottom: 1rpx solid #eeeeee;
  731. display: flex;
  732. .flex_auto {
  733. flex: 1;
  734. font-size: 30rpx;
  735. color: #666666;
  736. }
  737. &:nth-last-of-type(1) {
  738. border: 0;
  739. }
  740. &.active {
  741. color: #007aff;
  742. .btn {
  743. width: 103rpx;
  744. height: 48rpx;
  745. line-height: 48rpx;
  746. text-align: center;
  747. color: #3577E8;
  748. font-size: 24rpx;
  749. border-radius: 24rpx;
  750. background: #fff;
  751. margin-left: 36rpx;
  752. border: 1rpx solid #3577E8;
  753. }
  754. }
  755. }
  756. }
  757. }
  758. }
  759. .btn2 {
  760. width: 187rpx;
  761. height: 79rpx;
  762. line-height: 79rpx;
  763. background: #FC3F3F;
  764. border-radius: 40rpx;
  765. text-align: center;
  766. font-size: 24rpx;
  767. }
  768. .btn1 {
  769. width: 187rpx;
  770. height: 79rpx;
  771. line-height: 79rpx;
  772. background: #FFB102;
  773. border-radius: 40rpx;
  774. text-align: center;
  775. margin-right: 11rpx;
  776. font-size: 24rpx;
  777. }
  778. .blackFont {
  779. color: #333333;
  780. margin: 0 4rpx;
  781. }
  782. .wk_icon {
  783. width: 24rpx;
  784. height: 24rpx;
  785. margin-right: 12rpx;
  786. }
  787. .noteTag {
  788. font-size: 24rpx;
  789. font-family: PingFang SC;
  790. font-weight: 500;
  791. color: #999999;
  792. align-items: center;
  793. }
  794. .priceTag {
  795. font-size: 30rpx;
  796. font-family: PingFang SC;
  797. font-weight: bold;
  798. color: #ff2d55;
  799. }
  800. .titleTag {
  801. font-size: 36rpx;
  802. font-weight: bold;
  803. color: #333333;
  804. // margin-left: 8rpx;
  805. }
  806. .yearTag {
  807. width: 80rpx;
  808. height: 32rpx;
  809. background: #ebf5ff;
  810. border: 2rpx solid #007aff;
  811. border-radius: 16rpx;
  812. font-size: 24rpx;
  813. color: #007aff;
  814. text-align: center;
  815. line-height: 32rpx;
  816. }
  817. .itemBox {
  818. background: #ffffff;
  819. box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
  820. border-radius: 24rpx;
  821. width: 100%;
  822. padding: 20rpx;
  823. margin-bottom: 20rpx;
  824. }
  825. </style>