小说小程序前端代码仓库(小程序)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

914 lines
20 KiB

  1. <template>
  2. <!-- 小说详情页面 -->
  3. <view class="novel-detail">
  4. <!-- 顶部返回导航 -->
  5. <uv-navbar title="小说详情" :autoBack="true" fixed placeholder titleStyle="color: #333; font-weight: 700;" :border="false">
  6. <template #left>
  7. <uv-icon name="arrow-left" size="46" color="#333" @click="goBack" />
  8. </template>
  9. </uv-navbar>
  10. <!-- 小说基本信息 -->
  11. <view class="novel-info">
  12. <view class="novel-cover">
  13. <image :src="novelData.coverUrl" mode="aspectFill"></image>
  14. </view>
  15. <view class="novel-basic">
  16. <text class="title">{{ novelData.title }}</text>
  17. <view class="author-line">
  18. <text class="label">作者</text>
  19. <text class="author">{{ novelData.author }}</text>
  20. </view>
  21. <view class="status-line">
  22. <text class="label">完结</text>
  23. <text class="status">{{ novelData.status }}</text>
  24. </view>
  25. <view class="score-line">
  26. <text class="score">{{ novelData.score || 2814}}</text>
  27. <text class="score-label">作者累计亲密度值</text>
  28. </view>
  29. </view>
  30. </view>
  31. <!-- 推荐票数显示 -->
  32. <view class="recommendation-section">
  33. <view class="rec-left">
  34. <text class="rec-count">2814</text>
  35. <text class="rec-label">推荐票数</text>
  36. </view>
  37. <view class="rec-divider"></view>
  38. <view class="rec-right">
  39. <button class="recommend-btn" @click="recommendNovel">
  40. <text class="btn-icon">📑</text>
  41. 投推荐票
  42. </button>
  43. </view>
  44. </view>
  45. <!-- 阅读和收藏按钮 -->
  46. <!-- 我的等级 -->
  47. <view class="user-level">
  48. <view class="level-left">
  49. <view class="level-title">
  50. <text class="title-icon">👑</text>
  51. <text>我的等级</text>
  52. </view>
  53. <view class="level-info">
  54. <image class="user-avatar" src="https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain" mode="aspectFill"></image>
  55. <view class="user-details">
  56. <text class="username">周海</text>
  57. <view class="user-score">
  58. <text class="score-value">6785452</text>
  59. <text class="score-label">亲密值</text>
  60. </view>
  61. <text class="user-role">护书使者 五级</text>
  62. </view>
  63. </view>
  64. </view>
  65. <view class="level-right">
  66. <view class="rank-btn">
  67. <image class="rank-icon" src="https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain" mode="aspectFit"></image>
  68. <text>读者榜单</text>
  69. <text class="check-text">点击查看</text>
  70. </view>
  71. </view>
  72. </view>
  73. <!-- 小说简介 -->
  74. <view class="novel-intro">
  75. <view class="intro-title">
  76. <text>简介</text>
  77. </view>
  78. <view class="intro-content">
  79. <text>这游戏也太真实了吧</text>
  80. <text>搬砖跑腿捡垃圾送快递......公司最多能让你体会到996的艰辛在这里你能体会到超级加倍的007</text>
  81. <text>好了不废话了伟大的管理者大人嘛就去搬砖了那位大人说了只要我们努力献上自己的肝下个月他又能换一套全新的动力甲到时候候带我们开全新的地图去广阔的废土捡更多的垃圾</text>
  82. <text>穿越到废土世界的基光发现自己解锁了游戏所系统能够从平行世界召唤名为"玩家"的生物</text>
  83. </view>
  84. </view>
  85. <!-- 目录 -->
  86. <view class="novel-catalog" @click="handleShowCatalog">
  87. <view class="catalog-header">
  88. <view class="catalog-title">
  89. <text class="title-icon">📖</text>
  90. <text>目录</text>
  91. </view>
  92. <view class="chapter-nav">
  93. <text class="current-chapter">第九集 - 高去与归来</text>
  94. <text class="nav-arrow">></text>
  95. </view>
  96. </view>
  97. </view>
  98. <!-- 目录弹窗完整内容内联 -->
  99. <view v-if="showCatalog" class="catalog-popup-fullscreen" style="top:196px;bottom:0;height:auto;min-height:calc(100vh - 196px);">
  100. <view class="catalog-header">
  101. <view class="header-left" @click.stop="showCatalog = false">
  102. <uv-icon name="arrow-down" size="46" color="#333" @click="goBack" />
  103. </view>
  104. <view class="header-title">目录</view>
  105. <view class="header-right" @click.stop="orderAsc = !orderAsc">倒序</view>
  106. </view>
  107. <scroll-view scroll-y class="catalog-list" style="padding-bottom:0;margin-bottom:0;">
  108. <view v-for="(item, idx) in (orderAsc ? chapterList : [...chapterList].reverse())" :key="item.id" @click="selectChapter(orderAsc ? idx : chapterList.length - 1 - idx)"
  109. :class="['catalog-item', {active: (orderAsc ? idx : chapterList.length - 1 - idx) === currentIndex}]">
  110. <view class="item-main">
  111. <text class="item-title">{{ item.title }}</text>
  112. <text v-if="item.vip" class="vip-tag">付费</text>
  113. </view>
  114. </view>
  115. </scroll-view>
  116. </view>
  117. <!-- 书评区域 -->
  118. <view class="comments-section">
  119. <view class="comments-header">
  120. <view class="header-left">
  121. <text class="title-icon">📝</text>
  122. <text>书评</text>
  123. </view>
  124. <view class="header-right">
  125. <text @click="goToWriteReview">写书评</text>
  126. </view>
  127. </view>
  128. <view class="comment-list">
  129. <view class="comment-item">
  130. <view class="comment-header">
  131. <image class="avatar" src="https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain" mode="aspectFill"></image>
  132. <text class="username">方香橙</text>
  133. </view>
  134. <view class="comment-body">
  135. <text class="content-text">我是本书的作者方香橙这是一本甜文爽文哒请放心入坑五星好评女主又美有个性可爱绝对不圣母不傻白男主身心干净深情独宠媳妇儿一个人...</text>
  136. <view class="comment-footer">
  137. <text class="comment-time">2024.07.09</text>
  138. <view class="comment-likes" @click="goToCommentReply">
  139. <text class="like-icon">💬</text>
  140. <text class="like-count">17</text>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. <view class="comment-item">
  146. <view class="comment-header">
  147. <image class="avatar" src="https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain" mode="aspectFill"></image>
  148. <text class="username">战斗世界</text>
  149. </view>
  150. <view class="comment-body">
  151. <text class="content-text">这本小说了创意了雄天霸业奇新颖深刻以白色能量为主...</text>
  152. </view>
  153. </view>
  154. </view>
  155. </view>
  156. <!-- 底部操作栏 -->
  157. <view class="novel-bottom">
  158. <view class="bottom-left">
  159. <view class="action-btn" @click="addToBookshelf">
  160. <text class="btn-icon">📚</text>
  161. <text>加入书架</text>
  162. </view>
  163. <view class="action-btn" @click="goToGiftbox">
  164. <text class="btn-icon">🎁</text>
  165. <text>礼物盒</text>
  166. </view>
  167. <view class="action-btn" @click="toggleInteractive">
  168. <text class="btn-icon">🎯</text>
  169. <text>互动打赏</text>
  170. </view>
  171. </view>
  172. <view class="bottom-right">
  173. <button class="read-now-btn" @click="startReading">立即阅读</button>
  174. </view>
  175. </view>
  176. </view>
  177. </template>
  178. <script>
  179. import catalogpopup from '@/components/novel/CatalogPopup.vue'
  180. export default {
  181. components: {
  182. 'uv-navbar': () => import('@/uni_modules/uv-navbar/components/uv-navbar/uv-navbar.vue'),
  183. 'uv-icon': () => import('@/uni_modules/uv-icon/components/uv-icon/uv-icon.vue'),
  184. catalogpopup
  185. },
  186. data() {
  187. return {
  188. novelData: {
  189. id: '1',
  190. title: '这游戏也太真实了',
  191. author: '大宝鉴在在',
  192. category: '玄幻',
  193. wordCount: '2814',
  194. coverUrl: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain',
  195. introduction: '这游戏也太真实了!\n模拟,模拟,模拟,这游戏……公空居然把自己做成了游戏的NPC?这是什么新型的套路啊!好了,不要慌了,作为的管理者人员都在忙碌着,都在工作人员中,只要我们努力就自己的事,下个月他又给一套全新的剧情开始,如何将模拟的开关全新的世界,去广阔的世界去探索吧!'
  196. },
  197. isCollected: false,
  198. chapterCount: 2814,
  199. comments: [
  200. {
  201. username: '方寒锋',
  202. avatar: '/static/images/user1.jpg',
  203. content: '我是全书中年龄最大的人,这是一本很好的文章!满满心头热,只要对你"安全"文案有兴趣的,都可以不虚,不害怕,不要想太多就去尝试阅读吧!',
  204. time: '2024-07-09'
  205. }
  206. ],
  207. showCatalog: false,
  208. orderAsc: true,
  209. currentIndex: 0,
  210. chapterList: [
  211. { id: 1, title: '第一章 重回2004', vip: false },
  212. { id: 2, title: '第二章 陈年旧恨', vip: false },
  213. { id: 3, title: '第三章 再相见', vip: false },
  214. { id: 4, title: '第四章 李东的邀请', vip: false },
  215. { id: 5, title: '第五章 小气的男', vip: false },
  216. { id: 6, title: '第六章 先送谁?', vip: false },
  217. { id: 7, title: '第七章 打听行情', vip: false },
  218. { id: 8, title: '第八章 省城探路', vip: false },
  219. { id: 9, title: '第九章 订货', vip: false },
  220. { id: 10, title: '第十章 第一桶金', vip: true },
  221. { id: 11, title: '第十一章 高富帅来袭', vip: true },
  222. { id: 12, title: '第十二章 故学后,挥场见!', vip: true },
  223. { id: 13, title: '第十三章 你来我往', vip: true },
  224. { id: 14, title: '第十四章 你来我往', vip: true },
  225. { id: 15, title: '第十五章 你来我往', vip: true },
  226. { id: 16, title: '第十六章 你来我往', vip: true },
  227. { id: 17, title: '第十七章 你来我往', vip: true },
  228. { id: 18, title: '第十八章 你来我往', vip: true }
  229. ]
  230. }
  231. },
  232. computed: {
  233. userInfo() {
  234. return {
  235. avatar: '/static/images/avatar.jpg',
  236. level: '67级达人'
  237. }
  238. }
  239. },
  240. methods: {
  241. goBack() {
  242. uni.navigateBack()
  243. },
  244. startReading() {
  245. uni.navigateTo({
  246. url: `/pages_order/novel/readnovels?id=${this.novelData.id}`
  247. })
  248. },
  249. toggleCollect() {
  250. this.isCollected = !this.isCollected
  251. // TODO: 实现收藏功能
  252. },
  253. recommendNovel() {
  254. if (!this.novelData.id) {
  255. uni.showToast({
  256. title: '无效的小说ID',
  257. icon: 'none'
  258. })
  259. return
  260. }
  261. uni.navigateTo({
  262. url: `/pages_order/novel/vote?id=${this.novelData.id}`
  263. })
  264. },
  265. goToWriteReview() {
  266. // 跳转到写书评页面,传递书名参数
  267. uni.navigateTo({
  268. url: `/pages_order/novel/Review?title=${encodeURIComponent(this.novelData.title)}`
  269. })
  270. },
  271. addToBookshelf() {
  272. // TODO: 实现加入书架功能
  273. uni.showToast({
  274. title: '已加入书架',
  275. icon: 'success'
  276. })
  277. },
  278. toggleInteractive() {
  279. // 跳转到互动打赏页面
  280. uni.navigateTo({
  281. url: `/pages_order/novel/Tipping?id=${this.novelData.id}`
  282. })
  283. },
  284. goToGiftbox() {
  285. uni.navigateTo({ url: '/pages_order/novel/Giftbox' })
  286. },
  287. handleShowCatalog() {
  288. console.log('点击目录区域');
  289. this.showCatalog = true;
  290. },
  291. selectChapter(idx) {
  292. this.currentIndex = idx
  293. this.showCatalog = false
  294. // TODO: 跳转到对应章节内容
  295. },
  296. goToCommentReply() {
  297. uni.navigateTo({
  298. url: '/pages_order/novel/comments'
  299. })
  300. }
  301. }
  302. }
  303. </script>
  304. <style lang="scss" scoped>
  305. .novel-detail {
  306. min-height: 100vh;
  307. background-color: #f5f5f5;
  308. padding-bottom: 30rpx;
  309. }
  310. .nav-header {
  311. display: flex;
  312. justify-content: space-between;
  313. align-items: center;
  314. padding: 20rpx 30rpx;
  315. background-color: transparent;
  316. position: fixed;
  317. top: 0;
  318. left: 0;
  319. right: 0;
  320. z-index: 100;
  321. }
  322. .novel-info {
  323. padding: 20rpx;
  324. display: flex;
  325. background: #fff;
  326. }
  327. .novel-cover {
  328. width: 200rpx;
  329. height: 280rpx;
  330. margin-right: 20rpx;
  331. }
  332. .novel-cover image {
  333. width: 100%;
  334. height: 100%;
  335. border-radius: 8rpx;
  336. }
  337. .novel-basic {
  338. flex: 1;
  339. display: flex;
  340. flex-direction: column;
  341. justify-content: space-between;
  342. }
  343. .title {
  344. font-size: 36rpx;
  345. font-weight: bold;
  346. margin-bottom: 16rpx;
  347. }
  348. .author-line, .status-line {
  349. display: flex;
  350. align-items: center;
  351. margin-bottom: 12rpx;
  352. font-size: 28rpx;
  353. color: #666;
  354. }
  355. .label {
  356. color: #999;
  357. margin-right: 8rpx;
  358. }
  359. .score-line {
  360. margin-top: 16rpx;
  361. }
  362. .score {
  363. font-size: 32rpx;
  364. color: #333;
  365. font-weight: bold;
  366. }
  367. .score-label {
  368. font-size: 24rpx;
  369. color: #999;
  370. margin-left: 8rpx;
  371. }
  372. .recommendation-section {
  373. padding: 24rpx 32rpx;
  374. background: #fff;
  375. display: flex;
  376. justify-content: space-between;
  377. align-items: center;
  378. position: relative;
  379. }
  380. .rec-left {
  381. display: flex;
  382. flex-direction: column;
  383. align-items: flex-start;
  384. margin-left: 70rpx;
  385. }
  386. .rec-count {
  387. font-size: 44rpx;
  388. font-weight: 500;
  389. color: #333;
  390. line-height: 1.2;
  391. }
  392. .rec-label {
  393. font-size: 26rpx;
  394. color: #999;
  395. margin-top: 4rpx;
  396. }
  397. .rec-divider {
  398. position: absolute;
  399. right: 160rpx;
  400. top: 20rpx;
  401. bottom: 20rpx;
  402. width: 2rpx;
  403. background: #eee;
  404. }
  405. .rec-right {
  406. flex-shrink: 0;
  407. }
  408. .recommend-btn {
  409. background: #fff;
  410. color: #4a90e2;
  411. border: 2rpx solid #4a90e2;
  412. border-radius: 40rpx;
  413. padding: 12rpx 32rpx;
  414. font-size: 28rpx;
  415. display: flex;
  416. align-items: center;
  417. line-height: 1;
  418. height: 64rpx;
  419. }
  420. .btn-icon {
  421. margin-right: 8rpx;
  422. font-size: 32rpx;
  423. }
  424. .action-buttons {
  425. display: flex;
  426. padding: 30rpx;
  427. gap: 20rpx;
  428. button {
  429. flex: 1;
  430. height: 80rpx;
  431. border-radius: 40rpx;
  432. font-size: 32rpx;
  433. display: flex;
  434. align-items: center;
  435. justify-content: center;
  436. }
  437. .read-btn {
  438. background-color: #4a90e2;
  439. color: #fff;
  440. }
  441. .collect-btn {
  442. background-color: #f0f0f0;
  443. color: #666;
  444. }
  445. }
  446. .user-level {
  447. margin: 20rpx 30rpx;
  448. background-color: #fff;
  449. border-radius: 12rpx;
  450. padding: 24rpx 32rpx;
  451. display: flex;
  452. justify-content: space-between;
  453. align-items: stretch;
  454. }
  455. .level-left {
  456. flex: 1;
  457. }
  458. .level-title {
  459. display: flex;
  460. align-items: center;
  461. gap: 8rpx;
  462. margin-bottom: 20rpx;
  463. margin-left: 20rpx;
  464. .title-icon {
  465. font-size: 36rpx;
  466. color: #FFB800;
  467. }
  468. text {
  469. font-size: 32rpx;
  470. font-weight: 500;
  471. color: #333;
  472. }
  473. }
  474. .level-info {
  475. display: flex;
  476. align-items: flex-start;
  477. gap: 20rpx;
  478. }
  479. .user-avatar {
  480. width: 80rpx;
  481. height: 80rpx;
  482. border-radius: 50%;
  483. border: 2rpx solid #f0f0f0;
  484. }
  485. .user-details {
  486. display: flex;
  487. flex-direction: column;
  488. gap: 8rpx;
  489. }
  490. .username {
  491. font-size: 28rpx;
  492. color: #333;
  493. font-weight: 500;
  494. }
  495. .user-score {
  496. display: flex;
  497. align-items: center;
  498. gap: 8rpx;
  499. .score-value {
  500. font-size: 28rpx;
  501. color: #333;
  502. }
  503. .score-label {
  504. font-size: 24rpx;
  505. color: #999;
  506. }
  507. }
  508. .user-role {
  509. font-size: 24rpx;
  510. color: #666;
  511. background: #f5f5f5;
  512. padding: 4rpx 12rpx;
  513. border-radius: 4rpx;
  514. display: inline-block;
  515. }
  516. .level-right {
  517. display: flex;
  518. align-items: center;
  519. }
  520. .rank-btn {
  521. display: flex;
  522. flex-direction: column;
  523. align-items: center;
  524. justify-content: center;
  525. padding: 0 20rpx;
  526. .rank-icon {
  527. width: 200rpx;
  528. height: 60rpx;
  529. margin-bottom: 8rpx;
  530. }
  531. text {
  532. font-size: 26rpx;
  533. color: #333;
  534. line-height: 1.4;
  535. }
  536. .check-text {
  537. font-size: 22rpx;
  538. color: #999;
  539. }
  540. }
  541. .novel-intro {
  542. margin: 20rpx 30rpx;
  543. background-color: #fff;
  544. border-radius: 12rpx;
  545. padding: 24rpx;
  546. }
  547. .intro-title {
  548. font-size: 32rpx;
  549. font-weight: 500;
  550. color: #333;
  551. margin-bottom: 16rpx;
  552. }
  553. .intro-content {
  554. font-size: 28rpx;
  555. color: #666;
  556. line-height: 1.6;
  557. display: flex;
  558. flex-direction: column;
  559. gap: 16rpx;
  560. text {
  561. display: block;
  562. }
  563. }
  564. .comments-section {
  565. margin: 20rpx 30rpx;
  566. background-color: #fff;
  567. border-radius: 12rpx;
  568. padding: 24rpx;
  569. }
  570. .comments-header {
  571. display: flex;
  572. align-items: center;
  573. margin-bottom: 24rpx;
  574. border-bottom: 2rpx solid #f5f5f5;
  575. padding-bottom: 24rpx;
  576. justify-content: flex-start;
  577. }
  578. .header-left {
  579. display: flex;
  580. align-items: center;
  581. gap: 8rpx;
  582. .title-icon {
  583. font-size: 32rpx;
  584. }
  585. text {
  586. display: flex;
  587. align-items: center;
  588. font-size: 32rpx;
  589. font-weight: 500;
  590. color: #333;
  591. white-space: nowrap;
  592. }
  593. }
  594. .header-right {
  595. margin-left: auto;
  596. }
  597. .comment-list {
  598. display: flex;
  599. flex-direction: column;
  600. gap: 32rpx;
  601. }
  602. .comment-item {
  603. display: flex;
  604. flex-direction: column;
  605. gap: 16rpx;
  606. }
  607. .comment-header {
  608. display: flex;
  609. align-items: center;
  610. gap: 12rpx;
  611. }
  612. .avatar {
  613. width: 64rpx;
  614. height: 64rpx;
  615. border-radius: 50%;
  616. }
  617. .username {
  618. font-size: 28rpx;
  619. color: #333;
  620. font-weight: 500;
  621. }
  622. .comment-body {
  623. padding-left: 76rpx;
  624. }
  625. .content-text {
  626. font-size: 28rpx;
  627. color: #333;
  628. line-height: 1.6;
  629. }
  630. .comment-footer {
  631. display: flex;
  632. justify-content: space-between;
  633. align-items: center;
  634. margin-top: 16rpx;
  635. }
  636. .comment-time {
  637. font-size: 24rpx;
  638. color: #999;
  639. }
  640. .comment-likes {
  641. display: flex;
  642. align-items: center;
  643. gap: 4rpx;
  644. }
  645. .like-icon {
  646. font-size: 24rpx;
  647. color: #999;
  648. }
  649. .like-count {
  650. font-size: 24rpx;
  651. color: #999;
  652. }
  653. .novel-catalog {
  654. margin: 20rpx 30rpx;
  655. background-color: #fff;
  656. border-radius: 12rpx;
  657. padding: 24rpx;
  658. }
  659. .catalog-header {
  660. display: flex;
  661. justify-content: space-between;
  662. align-items: center;
  663. border-bottom: 2rpx solid #f5f5f5;
  664. padding-bottom: 24rpx;
  665. }
  666. .catalog-title {
  667. display: flex;
  668. align-items: center;
  669. gap: 8rpx;
  670. .title-icon {
  671. font-size: 32rpx;
  672. }
  673. text {
  674. font-size: 32rpx;
  675. font-weight: 500;
  676. color: #333;
  677. }
  678. }
  679. .chapter-nav {
  680. display: flex;
  681. align-items: center;
  682. gap: 8rpx;
  683. .current-chapter {
  684. font-size: 28rpx;
  685. color: #666;
  686. }
  687. .nav-arrow {
  688. font-size: 28rpx;
  689. color: #999;
  690. }
  691. }
  692. .novel-bottom {
  693. position: fixed;
  694. bottom: 0;
  695. left: 0;
  696. right: 0;
  697. height: 100rpx;
  698. background: #fff;
  699. display: flex;
  700. align-items: center;
  701. padding: 0 30rpx;
  702. box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
  703. }
  704. .bottom-left {
  705. flex: 1;
  706. display: flex;
  707. gap: 40rpx;
  708. }
  709. .action-btn {
  710. display: flex;
  711. flex-direction: column;
  712. align-items: center;
  713. gap: 4rpx;
  714. .btn-icon {
  715. font-size: 40rpx;
  716. line-height: 1;
  717. }
  718. text {
  719. font-size: 24rpx;
  720. color: #666;
  721. }
  722. }
  723. .bottom-right {
  724. flex-shrink: 0;
  725. }
  726. .read-now-btn {
  727. background: #1a237e;
  728. color: #fff;
  729. font-size: 32rpx;
  730. height: 80rpx;
  731. line-height: 80rpx;
  732. padding: 0 60rpx;
  733. border-radius: 40rpx;
  734. border: none;
  735. }
  736. .catalog-popup-fullscreen {
  737. position: fixed;
  738. left: 0;
  739. top: 196px;
  740. width: 100vw;
  741. background: #fff;
  742. z-index: 9999;
  743. border-top-left-radius: 32rpx;
  744. border-top-right-radius: 32rpx;
  745. border-bottom-left-radius: 0;
  746. border-bottom-right-radius: 0;
  747. display: flex;
  748. flex-direction: column;
  749. box-shadow: 0 8rpx 48rpx rgba(0,0,0,0.18);
  750. overflow: hidden;
  751. min-height: calc(100vh - 196px);
  752. }
  753. .catalog-header {
  754. display: flex;
  755. align-items: center;
  756. justify-content: space-between;
  757. padding: 0 24rpx;
  758. height: 96rpx;
  759. border-bottom: 1px solid #eee;
  760. position: sticky;
  761. top: 0;
  762. background: #fff;
  763. z-index: 2;
  764. }
  765. .header-left {
  766. width: 60rpx;
  767. display: flex;
  768. align-items: center;
  769. justify-content: flex-start;
  770. }
  771. .header-title {
  772. flex: 1;
  773. text-align: center;
  774. font-size: 32rpx;
  775. font-weight: bold;
  776. color: #222;
  777. }
  778. .header-right {
  779. color: #223a7a;
  780. font-size: 28rpx;
  781. font-weight: 500;
  782. min-width: 80rpx;
  783. text-align: right;
  784. }
  785. .catalog-list {
  786. flex: 1;
  787. overflow: auto;
  788. padding-bottom: 40rpx;
  789. }
  790. .catalog-item {
  791. padding: 0 32rpx;
  792. min-height: 80rpx;
  793. display: flex;
  794. flex-direction: column;
  795. justify-content: center;
  796. border-bottom: 1px solid #f5f5f5;
  797. background: #fff;
  798. color: #222;
  799. font-size: 30rpx;
  800. position: relative;
  801. }
  802. .catalog-item.active {
  803. color: #ff5a5f;
  804. background: #fff7f7;
  805. }
  806. .item-main {
  807. display: flex;
  808. align-items: center;
  809. gap: 16rpx;
  810. }
  811. .item-title {
  812. font-size: 30rpx;
  813. }
  814. .vip-tag {
  815. background: #ffe1b2;
  816. color: #ff9900;
  817. border-radius: 20rpx;
  818. font-size: 24rpx;
  819. padding: 2rpx 18rpx;
  820. margin-left: 16rpx;
  821. }
  822. </style>