小说小程序前端代码仓库(小程序)
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.

916 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. <BackArrow :size="56" color="#333" @back="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. import BackArrow from './components/BackArrow.vue'
  181. export default {
  182. components: {
  183. 'uv-navbar': () => import('@/uni_modules/uv-navbar/components/uv-navbar/uv-navbar.vue'),
  184. 'uv-icon': () => import('@/uni_modules/uv-icon/components/uv-icon/uv-icon.vue'),
  185. catalogpopup,
  186. BackArrow
  187. },
  188. data() {
  189. return {
  190. novelData: {
  191. id: '1',
  192. title: '这游戏也太真实了',
  193. author: '大宝鉴在在',
  194. category: '玄幻',
  195. wordCount: '2814',
  196. coverUrl: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain',
  197. introduction: '这游戏也太真实了!\n模拟,模拟,模拟,这游戏……公空居然把自己做成了游戏的NPC?这是什么新型的套路啊!好了,不要慌了,作为的管理者人员都在忙碌着,都在工作人员中,只要我们努力就自己的事,下个月他又给一套全新的剧情开始,如何将模拟的开关全新的世界,去广阔的世界去探索吧!'
  198. },
  199. isCollected: false,
  200. chapterCount: 2814,
  201. comments: [
  202. {
  203. username: '方寒锋',
  204. avatar: '/static/images/user1.jpg',
  205. content: '我是全书中年龄最大的人,这是一本很好的文章!满满心头热,只要对你"安全"文案有兴趣的,都可以不虚,不害怕,不要想太多就去尝试阅读吧!',
  206. time: '2024-07-09'
  207. }
  208. ],
  209. showCatalog: false,
  210. orderAsc: true,
  211. currentIndex: 0,
  212. chapterList: [
  213. { id: 1, title: '第一章 重回2004', vip: false },
  214. { id: 2, title: '第二章 陈年旧恨', vip: false },
  215. { id: 3, title: '第三章 再相见', vip: false },
  216. { id: 4, title: '第四章 李东的邀请', vip: false },
  217. { id: 5, title: '第五章 小气的男', vip: false },
  218. { id: 6, title: '第六章 先送谁?', vip: false },
  219. { id: 7, title: '第七章 打听行情', vip: false },
  220. { id: 8, title: '第八章 省城探路', vip: false },
  221. { id: 9, title: '第九章 订货', vip: false },
  222. { id: 10, title: '第十章 第一桶金', vip: true },
  223. { id: 11, title: '第十一章 高富帅来袭', vip: true },
  224. { id: 12, title: '第十二章 故学后,挥场见!', vip: true },
  225. { id: 13, title: '第十三章 你来我往', vip: true },
  226. { id: 14, title: '第十四章 你来我往', vip: true },
  227. { id: 15, title: '第十五章 你来我往', vip: true },
  228. { id: 16, title: '第十六章 你来我往', vip: true },
  229. { id: 17, title: '第十七章 你来我往', vip: true },
  230. { id: 18, title: '第十八章 你来我往', vip: true }
  231. ]
  232. }
  233. },
  234. computed: {
  235. userInfo() {
  236. return {
  237. avatar: '/static/images/avatar.jpg',
  238. level: '67级达人'
  239. }
  240. }
  241. },
  242. methods: {
  243. goBack() {
  244. uni.navigateBack()
  245. },
  246. startReading() {
  247. uni.navigateTo({
  248. url: `/pages_order/novel/readnovels?id=${this.novelData.id}`
  249. })
  250. },
  251. toggleCollect() {
  252. this.isCollected = !this.isCollected
  253. // TODO: 实现收藏功能
  254. },
  255. recommendNovel() {
  256. if (!this.novelData.id) {
  257. uni.showToast({
  258. title: '无效的小说ID',
  259. icon: 'none'
  260. })
  261. return
  262. }
  263. uni.navigateTo({
  264. url: `/pages_order/novel/vote?id=${this.novelData.id}`
  265. })
  266. },
  267. goToWriteReview() {
  268. // 跳转到写书评页面,传递书名参数
  269. uni.navigateTo({
  270. url: `/pages_order/novel/Review?title=${encodeURIComponent(this.novelData.title)}`
  271. })
  272. },
  273. addToBookshelf() {
  274. // TODO: 实现加入书架功能
  275. uni.showToast({
  276. title: '已加入书架',
  277. icon: 'success'
  278. })
  279. },
  280. toggleInteractive() {
  281. // 跳转到互动打赏页面
  282. uni.navigateTo({
  283. url: `/pages_order/novel/Tipping?id=${this.novelData.id}`
  284. })
  285. },
  286. goToGiftbox() {
  287. uni.navigateTo({ url: '/pages_order/novel/Giftbox' })
  288. },
  289. handleShowCatalog() {
  290. console.log('点击目录区域');
  291. this.showCatalog = true;
  292. },
  293. selectChapter(idx) {
  294. this.currentIndex = idx
  295. this.showCatalog = false
  296. // TODO: 跳转到对应章节内容
  297. },
  298. goToCommentReply() {
  299. uni.navigateTo({
  300. url: '/pages_order/novel/comments'
  301. })
  302. }
  303. }
  304. }
  305. </script>
  306. <style lang="scss" scoped>
  307. .novel-detail {
  308. min-height: 100vh;
  309. background-color: #f5f5f5;
  310. padding-bottom: 30rpx;
  311. }
  312. .nav-header {
  313. display: flex;
  314. justify-content: space-between;
  315. align-items: center;
  316. padding: 20rpx 30rpx;
  317. background-color: transparent;
  318. position: fixed;
  319. top: 0;
  320. left: 0;
  321. right: 0;
  322. z-index: 100;
  323. }
  324. .novel-info {
  325. padding: 20rpx;
  326. display: flex;
  327. background: #fff;
  328. }
  329. .novel-cover {
  330. width: 200rpx;
  331. height: 280rpx;
  332. margin-right: 20rpx;
  333. }
  334. .novel-cover image {
  335. width: 100%;
  336. height: 100%;
  337. border-radius: 8rpx;
  338. }
  339. .novel-basic {
  340. flex: 1;
  341. display: flex;
  342. flex-direction: column;
  343. justify-content: space-between;
  344. }
  345. .title {
  346. font-size: 36rpx;
  347. font-weight: bold;
  348. margin-bottom: 16rpx;
  349. }
  350. .author-line, .status-line {
  351. display: flex;
  352. align-items: center;
  353. margin-bottom: 12rpx;
  354. font-size: 28rpx;
  355. color: #666;
  356. }
  357. .label {
  358. color: #999;
  359. margin-right: 8rpx;
  360. }
  361. .score-line {
  362. margin-top: 16rpx;
  363. }
  364. .score {
  365. font-size: 32rpx;
  366. color: #333;
  367. font-weight: bold;
  368. }
  369. .score-label {
  370. font-size: 24rpx;
  371. color: #999;
  372. margin-left: 8rpx;
  373. }
  374. .recommendation-section {
  375. padding: 24rpx 32rpx;
  376. background: #fff;
  377. display: flex;
  378. justify-content: space-between;
  379. align-items: center;
  380. position: relative;
  381. }
  382. .rec-left {
  383. display: flex;
  384. flex-direction: column;
  385. align-items: flex-start;
  386. margin-left: 70rpx;
  387. }
  388. .rec-count {
  389. font-size: 44rpx;
  390. font-weight: 500;
  391. color: #333;
  392. line-height: 1.2;
  393. }
  394. .rec-label {
  395. font-size: 26rpx;
  396. color: #999;
  397. margin-top: 4rpx;
  398. }
  399. .rec-divider {
  400. position: absolute;
  401. right: 160rpx;
  402. top: 20rpx;
  403. bottom: 20rpx;
  404. width: 2rpx;
  405. background: #eee;
  406. }
  407. .rec-right {
  408. flex-shrink: 0;
  409. }
  410. .recommend-btn {
  411. background: #fff;
  412. color: #4a90e2;
  413. border: 2rpx solid #4a90e2;
  414. border-radius: 40rpx;
  415. padding: 12rpx 32rpx;
  416. font-size: 28rpx;
  417. display: flex;
  418. align-items: center;
  419. line-height: 1;
  420. height: 64rpx;
  421. }
  422. .btn-icon {
  423. margin-right: 8rpx;
  424. font-size: 32rpx;
  425. }
  426. .action-buttons {
  427. display: flex;
  428. padding: 30rpx;
  429. gap: 20rpx;
  430. button {
  431. flex: 1;
  432. height: 80rpx;
  433. border-radius: 40rpx;
  434. font-size: 32rpx;
  435. display: flex;
  436. align-items: center;
  437. justify-content: center;
  438. }
  439. .read-btn {
  440. background-color: #4a90e2;
  441. color: #fff;
  442. }
  443. .collect-btn {
  444. background-color: #f0f0f0;
  445. color: #666;
  446. }
  447. }
  448. .user-level {
  449. margin: 20rpx 30rpx;
  450. background-color: #fff;
  451. border-radius: 12rpx;
  452. padding: 24rpx 32rpx;
  453. display: flex;
  454. justify-content: space-between;
  455. align-items: stretch;
  456. }
  457. .level-left {
  458. flex: 1;
  459. }
  460. .level-title {
  461. display: flex;
  462. align-items: center;
  463. gap: 8rpx;
  464. margin-bottom: 20rpx;
  465. margin-left: 20rpx;
  466. .title-icon {
  467. font-size: 36rpx;
  468. color: #FFB800;
  469. }
  470. text {
  471. font-size: 32rpx;
  472. font-weight: 500;
  473. color: #333;
  474. }
  475. }
  476. .level-info {
  477. display: flex;
  478. align-items: flex-start;
  479. gap: 20rpx;
  480. }
  481. .user-avatar {
  482. width: 80rpx;
  483. height: 80rpx;
  484. border-radius: 50%;
  485. border: 2rpx solid #f0f0f0;
  486. }
  487. .user-details {
  488. display: flex;
  489. flex-direction: column;
  490. gap: 8rpx;
  491. }
  492. .username {
  493. font-size: 28rpx;
  494. color: #333;
  495. font-weight: 500;
  496. }
  497. .user-score {
  498. display: flex;
  499. align-items: center;
  500. gap: 8rpx;
  501. .score-value {
  502. font-size: 28rpx;
  503. color: #333;
  504. }
  505. .score-label {
  506. font-size: 24rpx;
  507. color: #999;
  508. }
  509. }
  510. .user-role {
  511. font-size: 24rpx;
  512. color: #666;
  513. background: #f5f5f5;
  514. padding: 4rpx 12rpx;
  515. border-radius: 4rpx;
  516. display: inline-block;
  517. }
  518. .level-right {
  519. display: flex;
  520. align-items: center;
  521. }
  522. .rank-btn {
  523. display: flex;
  524. flex-direction: column;
  525. align-items: center;
  526. justify-content: center;
  527. padding: 0 20rpx;
  528. .rank-icon {
  529. width: 200rpx;
  530. height: 60rpx;
  531. margin-bottom: 8rpx;
  532. }
  533. text {
  534. font-size: 26rpx;
  535. color: #333;
  536. line-height: 1.4;
  537. }
  538. .check-text {
  539. font-size: 22rpx;
  540. color: #999;
  541. }
  542. }
  543. .novel-intro {
  544. margin: 20rpx 30rpx;
  545. background-color: #fff;
  546. border-radius: 12rpx;
  547. padding: 24rpx;
  548. }
  549. .intro-title {
  550. font-size: 32rpx;
  551. font-weight: 500;
  552. color: #333;
  553. margin-bottom: 16rpx;
  554. }
  555. .intro-content {
  556. font-size: 28rpx;
  557. color: #666;
  558. line-height: 1.6;
  559. display: flex;
  560. flex-direction: column;
  561. gap: 16rpx;
  562. text {
  563. display: block;
  564. }
  565. }
  566. .comments-section {
  567. margin: 20rpx 30rpx;
  568. background-color: #fff;
  569. border-radius: 12rpx;
  570. padding: 24rpx;
  571. }
  572. .comments-header {
  573. display: flex;
  574. align-items: center;
  575. margin-bottom: 24rpx;
  576. border-bottom: 2rpx solid #f5f5f5;
  577. padding-bottom: 24rpx;
  578. justify-content: flex-start;
  579. }
  580. .header-left {
  581. display: flex;
  582. align-items: center;
  583. gap: 8rpx;
  584. .title-icon {
  585. font-size: 32rpx;
  586. }
  587. text {
  588. display: flex;
  589. align-items: center;
  590. font-size: 32rpx;
  591. font-weight: 500;
  592. color: #333;
  593. white-space: nowrap;
  594. }
  595. }
  596. .header-right {
  597. margin-left: auto;
  598. }
  599. .comment-list {
  600. display: flex;
  601. flex-direction: column;
  602. gap: 32rpx;
  603. }
  604. .comment-item {
  605. display: flex;
  606. flex-direction: column;
  607. gap: 16rpx;
  608. }
  609. .comment-header {
  610. display: flex;
  611. align-items: center;
  612. gap: 12rpx;
  613. }
  614. .avatar {
  615. width: 64rpx;
  616. height: 64rpx;
  617. border-radius: 50%;
  618. }
  619. .username {
  620. font-size: 28rpx;
  621. color: #333;
  622. font-weight: 500;
  623. }
  624. .comment-body {
  625. padding-left: 76rpx;
  626. }
  627. .content-text {
  628. font-size: 28rpx;
  629. color: #333;
  630. line-height: 1.6;
  631. }
  632. .comment-footer {
  633. display: flex;
  634. justify-content: space-between;
  635. align-items: center;
  636. margin-top: 16rpx;
  637. }
  638. .comment-time {
  639. font-size: 24rpx;
  640. color: #999;
  641. }
  642. .comment-likes {
  643. display: flex;
  644. align-items: center;
  645. gap: 4rpx;
  646. }
  647. .like-icon {
  648. font-size: 24rpx;
  649. color: #999;
  650. }
  651. .like-count {
  652. font-size: 24rpx;
  653. color: #999;
  654. }
  655. .novel-catalog {
  656. margin: 20rpx 30rpx;
  657. background-color: #fff;
  658. border-radius: 12rpx;
  659. padding: 24rpx;
  660. }
  661. .catalog-header {
  662. display: flex;
  663. justify-content: space-between;
  664. align-items: center;
  665. border-bottom: 2rpx solid #f5f5f5;
  666. padding-bottom: 24rpx;
  667. }
  668. .catalog-title {
  669. display: flex;
  670. align-items: center;
  671. gap: 8rpx;
  672. .title-icon {
  673. font-size: 32rpx;
  674. }
  675. text {
  676. font-size: 32rpx;
  677. font-weight: 500;
  678. color: #333;
  679. }
  680. }
  681. .chapter-nav {
  682. display: flex;
  683. align-items: center;
  684. gap: 8rpx;
  685. .current-chapter {
  686. font-size: 28rpx;
  687. color: #666;
  688. }
  689. .nav-arrow {
  690. font-size: 28rpx;
  691. color: #999;
  692. }
  693. }
  694. .novel-bottom {
  695. position: fixed;
  696. bottom: 0;
  697. left: 0;
  698. right: 0;
  699. height: 100rpx;
  700. background: #fff;
  701. display: flex;
  702. align-items: center;
  703. padding: 0 30rpx;
  704. box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
  705. }
  706. .bottom-left {
  707. flex: 1;
  708. display: flex;
  709. gap: 40rpx;
  710. }
  711. .action-btn {
  712. display: flex;
  713. flex-direction: column;
  714. align-items: center;
  715. gap: 4rpx;
  716. .btn-icon {
  717. font-size: 40rpx;
  718. line-height: 1;
  719. }
  720. text {
  721. font-size: 24rpx;
  722. color: #666;
  723. }
  724. }
  725. .bottom-right {
  726. flex-shrink: 0;
  727. }
  728. .read-now-btn {
  729. background: #1a237e;
  730. color: #fff;
  731. font-size: 32rpx;
  732. height: 80rpx;
  733. line-height: 80rpx;
  734. padding: 0 60rpx;
  735. border-radius: 40rpx;
  736. border: none;
  737. }
  738. .catalog-popup-fullscreen {
  739. position: fixed;
  740. left: 0;
  741. top: 196px;
  742. width: 100vw;
  743. background: #fff;
  744. z-index: 9999;
  745. border-top-left-radius: 32rpx;
  746. border-top-right-radius: 32rpx;
  747. border-bottom-left-radius: 0;
  748. border-bottom-right-radius: 0;
  749. display: flex;
  750. flex-direction: column;
  751. box-shadow: 0 8rpx 48rpx rgba(0,0,0,0.18);
  752. overflow: hidden;
  753. min-height: calc(100vh - 196px);
  754. }
  755. .catalog-header {
  756. display: flex;
  757. align-items: center;
  758. justify-content: space-between;
  759. padding: 0 24rpx;
  760. height: 96rpx;
  761. border-bottom: 1px solid #eee;
  762. position: sticky;
  763. top: 0;
  764. background: #fff;
  765. z-index: 2;
  766. }
  767. .header-left {
  768. width: 60rpx;
  769. display: flex;
  770. align-items: center;
  771. justify-content: flex-start;
  772. }
  773. .header-title {
  774. flex: 1;
  775. text-align: center;
  776. font-size: 32rpx;
  777. font-weight: bold;
  778. color: #222;
  779. }
  780. .header-right {
  781. color: #223a7a;
  782. font-size: 28rpx;
  783. font-weight: 500;
  784. min-width: 80rpx;
  785. text-align: right;
  786. }
  787. .catalog-list {
  788. flex: 1;
  789. overflow: auto;
  790. padding-bottom: 40rpx;
  791. }
  792. .catalog-item {
  793. padding: 0 32rpx;
  794. min-height: 80rpx;
  795. display: flex;
  796. flex-direction: column;
  797. justify-content: center;
  798. border-bottom: 1px solid #f5f5f5;
  799. background: #fff;
  800. color: #222;
  801. font-size: 30rpx;
  802. position: relative;
  803. }
  804. .catalog-item.active {
  805. color: #ff5a5f;
  806. background: #fff7f7;
  807. }
  808. .item-main {
  809. display: flex;
  810. align-items: center;
  811. gap: 16rpx;
  812. }
  813. .item-title {
  814. font-size: 30rpx;
  815. }
  816. .vip-tag {
  817. background: #ffe1b2;
  818. color: #ff9900;
  819. border-radius: 20rpx;
  820. font-size: 24rpx;
  821. padding: 2rpx 18rpx;
  822. margin-left: 16rpx;
  823. }
  824. </style>