index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  1. <template>
  2. <view class="container">
  3. <image class="bg" src="@/static/images/bg.png" mode="aspectFill"></image>
  4. <!-- 顶部搜索栏 -->
  5. <view class="top-bar" :style="{ marginTop: statusBarHeight }">
  6. <view class="search-row" @click="onSearch">
  7. <image src="@/static/images/new/search.png" mode=""></image>
  8. <text class="search-placeholder">搜索你感兴趣的内容</text>
  9. </view>
  10. <!-- <view class="top-actions">
  11. <text class="action-icon">⋯</text>
  12. <text class="action-icon scan">⊙</text>
  13. </view> -->
  14. </view>
  15. <!-- 应用标题与副标题 -->
  16. <view class="brand">
  17. <image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/title2.png" mode="widthFix"></image>
  18. <!-- <text class="brand-title">品质韶华·乐享朝夕</text>
  19. <text class="brand-subtitle">全国89%的中老年人都在用的兴趣内容社区</text> -->
  20. </view>
  21. <!-- 主题横幅 Banner -->
  22. <scroll-view scroll-y class="scroll-content" :show-scrollbar="false" @scrolltolower="getPageFreeCoursesData">
  23. <view class="banner" @click="onBannerClick">
  24. <!-- <image class="banner-bg" src="/static/images/new/banner.png" mode="aspectFill"></image> -->
  25. <view class="inner">
  26. <swiper class="swiper" :indicator-dots="true" :circular="true" :autoplay="true" :interval="3000"
  27. :duration="1000" indicator-color="rgba(255, 255, 255, 0.6)" indicator-active-color="#ffffff">
  28. <!-- <swiper-item class="swiper-item" v-for="(item,index) in advList" :key="index"
  29. @click="handleAdvClick(item)">
  30. <image :src="item.imageUrl" mode=""></image>
  31. </swiper-item> -->
  32. <swiper-item class="swiper-item">
  33. <image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/banner2.jpg" mode=""></image>
  34. </swiper-item>
  35. </swiper>
  36. </view>
  37. </view>
  38. <!-- 央广原乡行 视频推荐区 -->
  39. <view class="section video-section">
  40. <view class="section-head">
  41. <view class="section-title-wrap">
  42. <image class="play-icon" src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/yxbofang.png" mode=""></image>
  43. <image class="section-title" src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/yxy2.png"></image>
  44. </view>
  45. <view class="section-more" @click="onMoreVideos">查看更多
  46. <image src="/static/images/new/back.png"></image>
  47. </view>
  48. </view>
  49. <view class="feature-video-card">
  50. <scroll-view scroll-x class="tag-scroll" :show-scrollbar="false">
  51. <view v-for="(tag, idx) in videoTags" :key="idx" class="tag-item"
  52. :class="{ active: videoTagId === tag.cateId }" @click="handleSelectOneType(tag)">
  53. <text>{{ tag.cateName }}</text>
  54. <view v-if="videoTagId === tag.cateId" class="triangle"></view>
  55. </view>
  56. </scroll-view>
  57. <template v-if="oneCourseListData.length > 0">
  58. <view v-for="(item, index) in oneCourseListData" :key="index" class="x-bc"
  59. @click="onWatchLive(item)">
  60. <view class="fv-thumb">
  61. <image class="fv-img" :src="item.imgUrl || '/static/images/new/banner.png'"
  62. mode="aspectFill"></image>
  63. <view v-if="false" class="live-tag">
  64. <text class="live-dot"></text>
  65. <text>直播中</text>
  66. </view>
  67. </view>
  68. <view class="fv-info">
  69. <text class="fv-title ellipsis">{{ item.courseName }}</text>
  70. <text class="fv-desc">{{ item.courseDesc }}</text>
  71. <view class="btn-watch" @click.stop="onWatchLive(item)">立即观看</view>
  72. </view>
  73. </view>
  74. </template>
  75. <view class="emptyCourse" v-else>暂无课程~</view>
  76. </view>
  77. </view>
  78. <!-- 免费精品课 -->
  79. <view class="section course-section">
  80. <view class="section-head">
  81. <view class="section-title-wrap">
  82. <image class="play-icon" src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/bofang2.png" mode=""></image>
  83. <image class="section-title" src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/jpk2.png"></image>
  84. </view>
  85. <view class="section-more" @click="onMoreCourses">更多课程
  86. <image src="/static/images/new/back.png"></image>
  87. </view>
  88. </view>
  89. <view class="courseTabViewClass">
  90. <u-tabs :list="courseTabList" :current="courseCurrentIndex" lineWidth="0" lineHeight="0"
  91. lineColor="#FF233CFF" :activeStyle="courseTabActiveStyle"
  92. :inactiveStyle="courseTabInactiveStyle" @click="handleSelectCourseTab">
  93. </u-tabs>
  94. </view>
  95. <view v-if="courses.length > 0" class="course-list">
  96. <view v-for="(course, idx) in courses" :key="idx" class="course-card" @click="onWatchLive(course)">
  97. <view class="course-thumb">
  98. <image class="course-img" :src="course.imgUrl || '/static/logo.jpg'" mode="aspectFill">
  99. </image>
  100. <!-- <text class="course-tag">{{ course.tag }}</text> -->
  101. </view>
  102. <view class="course-info">
  103. <text class="course-name">{{ course.courseName }}</text>
  104. <view class="x-end" style="justify-content: space-between;">
  105. <view class="course-meta">
  106. <image src="@/static/images/new/renshu.png"></image>
  107. <text class="meta-count">{{ $formattedViewCount(course.watchUserCount) }}</text>
  108. </view>
  109. <view class="btn-watch2" @click.stop="onWatchLive(course)">立即观看</view>
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. <view class="emptyCourse" v-else>暂无课程~</view>
  115. </view>
  116. <view class="bottom-placeholder"></view>
  117. </scroll-view>
  118. </view>
  119. </template>
  120. <script>
  121. import {
  122. courseTypeDataApi, courseListDataApi,getHisStoreConfig
  123. } from '@/api/home'
  124. export default {
  125. data() {
  126. return {
  127. statusBarHeight: uni.getSystemInfoSync().statusBarHeight + 'px',
  128. videoTagId: null,
  129. videoTags: [],
  130. oneCourseListData: [],
  131. courseTabId: null,
  132. courseCurrentIndex: 0,
  133. courses: [],
  134. courseTabList: [],
  135. freePage: {
  136. pageNum: 1,
  137. pageSize: 10,
  138. total: 0,
  139. },
  140. courseTabActiveStyle: {
  141. color: '#FFFFFFFF',
  142. fontSize: '32rpx',
  143. padding: '8rpx 20rpx 10rpx',
  144. background: 'linear-gradient( 135deg, #FF5267 0%, #FF233C 100%)',
  145. borderRadius: '32rpx'
  146. },
  147. courseTabInactiveStyle: {
  148. color: '#000000D9',
  149. fontSize: '32rpx',
  150. background: '#FFFFFFFF',
  151. padding: '8rpx 20rpx 10rpx',
  152. borderRadius: '32rpx'
  153. },
  154. yxy:{}
  155. }
  156. },
  157. onLoad() {
  158. this.loadConfig()
  159. this.getFreeCourseTypeData()
  160. },
  161. methods: {
  162. onSearch() {
  163. uni.navigateTo({
  164. url: '/pages/index/homePageSearch'
  165. })
  166. },
  167. onBannerClick() {
  168. return
  169. uni.navigateTo({
  170. url: '/pages/index/course'
  171. })
  172. },
  173. onMoreVideos() {
  174. uni.navigateTo({
  175. url: '/pages/index/video'
  176. })
  177. },
  178. async loadConfig() {
  179. try {
  180. // 1. 先拿配置(必须等它完成)
  181. const res = await getHisStoreConfig({ name: 'moduleShow' })
  182. const list = res?.courseChannels || []
  183. const y = list.filter(item => item.dictLabel == '原乡行')
  184. this.yxy = y[0] || {}
  185. // 2. 配置拿完,再加载视频(关键!)
  186. await this.getOneCourseTypeData()
  187. } catch (err) {
  188. console.error('加载配置失败', err)
  189. this.yxy = {}
  190. }
  191. },
  192. // 获取央广原乡行-类型
  193. async getOneCourseTypeData() {
  194. const params = {
  195. pageNum: 1,
  196. pageSize: 4,
  197. isShow: 1,
  198. cateType: 1,
  199. yxxTag:this.yxy.dictValue,
  200. homePage: 1
  201. };
  202. const res = await courseTypeDataApi(params);
  203. if (res.code === 200) {
  204. this.videoTags = res.data.list;
  205. if (this.videoTags.length > 0) {
  206. this.videoTagId = this.videoTags[0].cateId;
  207. this.oneCourseListData = [];
  208. // 获取原乡行课程列表
  209. this.getYxxCourseList(this.videoTags[0].cateId)
  210. }
  211. }
  212. },
  213. // 获取免费精品课-类型
  214. async getFreeCourseTypeData() {
  215. const params = {
  216. pageNum: 1,
  217. pageSize: 10,
  218. isShow: 1,
  219. cateType: 1,
  220. yxxTag: 0,
  221. homePage: 1
  222. };
  223. const res = await courseTypeDataApi(params);
  224. if (res.code === 200) {
  225. this.courseTabList = res.data.list.map(item => ({
  226. id: item.cateId,
  227. name: item.cateName
  228. }));
  229. this.courseTabList = [
  230. {
  231. id: 0,
  232. name: '精选'
  233. },
  234. ...this.courseTabList
  235. ]
  236. if (this.courseTabList.length > 0) {
  237. this.courseTabId = this.courseTabList[0].id;
  238. this.courses = [];
  239. // 获取免费精品课课程列表
  240. this.getFreeCourseList(this.courseTabId)
  241. }
  242. }
  243. },
  244. // 点击切换央广原乡行-类型
  245. handleSelectOneType(e) {
  246. this.videoTagId = e.cateId;
  247. this.oneCourseListData = [];
  248. // 获取原乡行课程列表
  249. this.getYxxCourseList(this.videoTagId)
  250. },
  251. // 点击切换免费精品课-类型
  252. handleSelectCourseTab(item) {
  253. this.courseCurrentIndex = item.index;
  254. this.courseTabId = item.id;
  255. this.courses = [];
  256. this.freePage.pageNum = 1;
  257. this.freePage.total = 0;
  258. // 获取免费精品课课程列表
  259. this.getFreeCourseList(this.courseTabId)
  260. },
  261. // 获取原乡行课程列表
  262. async getYxxCourseList(cateId) {
  263. const params = {
  264. pageNum: 1,
  265. pageSize: 10,
  266. subCateId: cateId,
  267. yxxTag:this.yxy.dictValue,
  268. recommendSlot: 1,
  269. };
  270. const res = await courseListDataApi(params);
  271. if (res.code === 200 && res.data.list.length > 0) {
  272. this.oneCourseListData = [res.data.list[0]];
  273. }
  274. },
  275. // 获取免费精品课课程列表
  276. async getFreeCourseList(cateId) {
  277. let params = {
  278. pageNum: this.freePage.pageNum,
  279. pageSize: this.freePage.pageSize,
  280. subCateId: cateId,
  281. yxxTag: 0,
  282. recommendSlot: 3,
  283. };
  284. if (params.subCateId == 0) {
  285. delete params.subCateId;
  286. }
  287. const res = await courseListDataApi(params);
  288. if (res.code === 200) {
  289. this.freePage.total = res.data.total;
  290. this.courses = [...this.courses, ...res.data.list];
  291. }
  292. },
  293. onWatchLive(e) {
  294. uni.navigateTo({
  295. url: `/pages/course/info?courseId=${e.courseId}`
  296. })
  297. },
  298. onMoreCourses() {
  299. uni.navigateTo({
  300. url: '/pages/index/course'
  301. })
  302. },
  303. // 分页获取免费精品课课程列表
  304. getPageFreeCoursesData() {
  305. if (this.freePage.total <= this.courses.length) {
  306. return;
  307. }
  308. this.freePage.pageNum = this.freePage.pageNum + 1;
  309. this.getFreeCourseList(this.courseTabId)
  310. },
  311. }
  312. }
  313. </script>
  314. <style lang="scss" scoped>
  315. .bg {
  316. width: 100%;
  317. height: 380rpx;
  318. position: absolute;
  319. top: 0;
  320. left: 0;
  321. z-index: 0;
  322. }
  323. .container {
  324. display: flex;
  325. flex-direction: column;
  326. min-height: 100vh;
  327. background: #F4F6F7;
  328. }
  329. /* 顶部搜索 */
  330. .top-bar {
  331. display: flex;
  332. align-items: center;
  333. padding: 24rpx 24rpx 30rpx;
  334. position: relative;
  335. }
  336. .search-row {
  337. flex: 1;
  338. display: flex;
  339. align-items: center;
  340. height: 76rpx;
  341. padding: 0 24rpx;
  342. background: rgba(255, 255, 255, 0.5);
  343. border-radius: 38rpx;
  344. image {
  345. width: 44rpx;
  346. height: 44rpx;
  347. }
  348. }
  349. .search-placeholder {
  350. margin-left: 12rpx;
  351. font-size: 32rpx;
  352. color: rgba(0, 0, 0, 0.25);
  353. }
  354. .top-actions {
  355. display: flex;
  356. align-items: center;
  357. margin-left: 20rpx;
  358. }
  359. .action-icon {
  360. font-size: 36rpx;
  361. color: #333;
  362. margin-right: 16rpx;
  363. }
  364. .action-icon.scan {
  365. font-size: 40rpx;
  366. }
  367. /* 品牌标题 */
  368. .brand {
  369. padding: 0 68rpx 30rpx;
  370. background: #fff;
  371. image {
  372. width: 100%;
  373. }
  374. }
  375. .brand-title {
  376. display: block;
  377. font-size: 40rpx;
  378. font-weight: bold;
  379. color: #333;
  380. margin-bottom: 8rpx;
  381. }
  382. .brand-subtitle {
  383. font-size: 24rpx;
  384. color: #999;
  385. }
  386. /* Banner */
  387. .banner {
  388. position: relative;
  389. height: 210rpx;
  390. margin: 0 24rpx 40rpx;
  391. border-radius: 16rpx;
  392. overflow: hidden;
  393. //background: linear-gradient(135deg, #87CEEB 0%, #E0F4FF 100%);
  394. .inner {
  395. width: 100%;
  396. height: 210rpx;
  397. border-radius: 10rpx;
  398. overflow: hidden;
  399. .swiper,
  400. .swiper-item,
  401. .swiper-item image {
  402. width: 100%;
  403. height: 100%;
  404. }
  405. }
  406. }
  407. .banner-bg {
  408. position: absolute;
  409. left: 0;
  410. top: 0;
  411. width: 100%;
  412. height: 100%;
  413. }
  414. .banner-overlay {
  415. position: absolute;
  416. left: 0;
  417. top: 0;
  418. width: 100%;
  419. height: 100%;
  420. display: flex;
  421. flex-direction: column;
  422. align-items: center;
  423. justify-content: center;
  424. background: rgba(0, 0, 0, 0.15);
  425. }
  426. .banner-title {
  427. font-size: 48rpx;
  428. font-weight: bold;
  429. color: #fff;
  430. text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.2);
  431. margin-bottom: 8rpx;
  432. }
  433. .banner-desc {
  434. font-size: 24rpx;
  435. color: rgba(255, 255, 255, 0.95);
  436. }
  437. /* 滚动内容区 */
  438. .scroll-content {
  439. flex: 1;
  440. height: 0;
  441. }
  442. .section {
  443. padding-bottom: 32rpx;
  444. }
  445. .section-head {
  446. display: flex;
  447. align-items: center;
  448. justify-content: space-between;
  449. margin-bottom: 20rpx;
  450. padding: 0 24rpx;
  451. }
  452. .section-title {
  453. width: 226rpx;
  454. height: 36rpx;
  455. }
  456. .section-title-wrap {
  457. display: flex;
  458. align-items: center;
  459. }
  460. .play-icon {
  461. width: 36rpx;
  462. height: 36rpx;
  463. margin-right: 10rpx;
  464. }
  465. .section-more {
  466. font-size: 26rpx;
  467. color: #999;
  468. image {
  469. width: 16rpx;
  470. height: 20rpx;
  471. }
  472. }
  473. /* 横向标签 */
  474. .tag-scroll {
  475. height: 80rpx;
  476. white-space: nowrap;
  477. margin-bottom: 5rpx;
  478. }
  479. .tag-item {
  480. position: relative;
  481. display: inline-block;
  482. padding: 6rpx 24rpx;
  483. margin-right: 24rpx;
  484. border-radius: 10rpx;
  485. background: rgba(255, 255, 255, 0.5);
  486. }
  487. .tag-item text {
  488. font-family: PingFangSC, PingFang SC;
  489. font-weight: 400;
  490. font-size: 36rpx;
  491. color: #FFFFFF;
  492. }
  493. .tag-item.active {
  494. background: linear-gradient(135deg, #FF5267 0%, #FF233C 100%);
  495. }
  496. /* 底部小三角核心 */
  497. .triangle {
  498. z-index: 10;
  499. position: absolute;
  500. left: 50%;
  501. transform: translateX(-50%);
  502. bottom: -5px;
  503. width: 0;
  504. height: 0;
  505. border-left: 30rpx solid transparent;
  506. border-right: 30rpx solid transparent;
  507. border-top: 20rpx solid #FF233C;
  508. }
  509. .tag-item.active text {
  510. color: #fff;
  511. }
  512. /* 特色视频卡片 */
  513. .feature-video-card {
  514. display: flex;
  515. //align-items: center;
  516. flex-direction: column;
  517. background: linear-gradient(135deg, #5F111A 0%, #37050B 100%);
  518. border-radius: 30rpx;
  519. overflow: hidden;
  520. padding: 30rpx 20rpx;
  521. margin-left: 24rpx;
  522. margin-right: 24rpx;
  523. }
  524. .fv-thumb {
  525. position: relative;
  526. width: 360rpx;
  527. height: 240rpx;
  528. border-radius: 20rpx;
  529. overflow: hidden;
  530. margin-right: 20rpx;
  531. }
  532. .fv-img {
  533. width: 100%;
  534. height: 100%;
  535. background: #e0e0e0;
  536. }
  537. .live-tag {
  538. position: absolute;
  539. left: 0;
  540. top: 20rpx;
  541. display: flex;
  542. align-items: center;
  543. width: 130rpx;
  544. height: 44rpx;
  545. background: linear-gradient(135deg, #FF5267 0%, #FF233C 100%);
  546. border-radius: 0rpx 8rpx 8rpx 0rpx;
  547. }
  548. .live-tag text {
  549. font-size: 28rpx;
  550. color: #fff;
  551. margin-left: 6rpx;
  552. }
  553. .live-dot {
  554. width: 12rpx;
  555. height: 12rpx;
  556. background: #fff;
  557. border-radius: 50%;
  558. animation: blink 1s infinite;
  559. }
  560. @keyframes blink {
  561. 50% {
  562. opacity: 0.5;
  563. }
  564. }
  565. .fv-info {
  566. flex: 1;
  567. //padding: 20rpx 24rpx;
  568. display: flex;
  569. flex-direction: column;
  570. justify-content: space-between;
  571. align-items: center;
  572. min-width: 0;
  573. }
  574. .fv-title {
  575. font-family: PingFangSC, PingFang SC;
  576. font-weight: 600;
  577. font-size: 36rpx;
  578. color: #FFFFFF;
  579. line-height: 50rpx;
  580. text-align: center;
  581. font-style: normal;
  582. margin-bottom: 8rpx;
  583. }
  584. .fv-desc {
  585. font-family: PingFangSC, PingFang SC;
  586. font-weight: 400;
  587. font-size: 32rpx;
  588. color: #FFFFFF;
  589. line-height: 44rpx;
  590. text-align: justify;
  591. overflow: hidden;
  592. text-overflow: ellipsis;
  593. display: -webkit-box;
  594. -webkit-line-clamp: 2;
  595. -webkit-box-orient: vertical;
  596. }
  597. /* 红色按钮 */
  598. .btn-watch {
  599. width: 188rpx;
  600. height: 64rpx;
  601. line-height: 64rpx;
  602. text-align: center;
  603. background: #FFFFFF;
  604. border-radius: 12rpx;
  605. margin-top: 28rpx;
  606. font-family: PingFangSC, PingFang SC;
  607. font-weight: 600;
  608. font-size: 32rpx;
  609. color: #3F040B;
  610. }
  611. .btn-watch2 {
  612. width: 168rpx;
  613. height: 64rpx;
  614. line-height: 60rpx;
  615. text-align: center;
  616. background: linear-gradient(135deg, #FF5267 0%, #FF233C 100%);
  617. border-radius: 32rpx;
  618. font-family: PingFangSC, PingFang SC;
  619. font-weight: 600;
  620. font-size: 32rpx;
  621. color: #FFFFFF;
  622. }
  623. .courseTabViewClass {
  624. width: 100%;
  625. padding-left: 14rpx;
  626. margin-top: 8rpx;
  627. margin-bottom: 24rpx;
  628. }
  629. /* 课程列表 */
  630. .course-list {
  631. display: flex;
  632. flex-direction: column;
  633. gap: 24rpx;
  634. padding: 0 24rpx
  635. }
  636. .course-card {
  637. display: flex;
  638. background: #fff;
  639. border-radius: 20rpx;
  640. overflow: hidden;
  641. padding: 20rpx;
  642. }
  643. .course-thumb {
  644. position: relative;
  645. width: 296rpx;
  646. height: 222rpx;
  647. border-radius: 20rpx;
  648. overflow: hidden;
  649. flex-shrink: 0;
  650. }
  651. .course-img {
  652. width: 100%;
  653. height: 100%;
  654. background: #BB6D6D;
  655. }
  656. .course-tag {
  657. position: absolute;
  658. left: 0;
  659. bottom: 0;
  660. right: 0;
  661. padding: 8rpx 12rpx;
  662. background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  663. font-size: 22rpx;
  664. color: #fff;
  665. }
  666. .course-info {
  667. flex: 1;
  668. padding-left: 24rpx;
  669. // padding: 20rpx 24rpx;
  670. display: flex;
  671. flex-direction: column;
  672. justify-content: space-between;
  673. min-width: 0;
  674. }
  675. .course-name {
  676. font-family: PingFangSC, PingFang SC;
  677. font-weight: 600;
  678. font-size: 36rpx;
  679. color: #222222;
  680. line-height: 50rpx;
  681. text-align: justify;
  682. overflow: hidden;
  683. text-overflow: ellipsis;
  684. display: -webkit-box;
  685. -webkit-line-clamp: 2;
  686. -webkit-box-orient: vertical;
  687. }
  688. .course-meta {
  689. display: flex;
  690. align-items: center;
  691. image {
  692. width: 30rpx;
  693. height: 30rpx;
  694. }
  695. }
  696. .meta-icon {
  697. font-size: 24rpx;
  698. margin-right: 6rpx;
  699. color: #999;
  700. }
  701. .meta-count {
  702. margin-left: 10rpx;
  703. font-family: PingFangSC, PingFang SC;
  704. font-weight: 400;
  705. font-size: 32rpx;
  706. color: #666666;
  707. }
  708. /* 底部占位(为全局 tabBar 留出空间) */
  709. .bottom-placeholder {
  710. height: 120rpx;
  711. }
  712. ::v-deep .u-tabs__wrapper__nav__item {
  713. padding: 0 10rpx !important;
  714. }
  715. .emptyCourse {
  716. display: flex;
  717. align-items: center;
  718. justify-content: center;
  719. height: 200rpx;
  720. padding: 24rpx 50rpx;
  721. color: #999999;
  722. }
  723. </style>