index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851
  1. <template>
  2. <view class="astrology-page">
  3. <!-- 自定义顶部导航栏 -->
  4. <view class="custom-nav">
  5. <view class="nav-left" @click="goBack">
  6. <text class="back-icon">←</text>
  7. </view>
  8. <view class="nav-title">星命运算</view>
  9. <view class="nav-right">
  10. <text class="menu-icon">⋯</text>
  11. </view>
  12. </view>
  13. <!-- 用户资料提示 -->
  14. <view class="profile-tip" v-if="!hasProfile" @click="goToProfile">
  15. <view class="tip-content">
  16. <text class="tip-icon">💫</text>
  17. <view class="tip-text-group">
  18. <text class="tip-title">完善资料,解锁专属运势</text>
  19. <text class="tip-desc">填写出生日期,获取更精准的运势分析</text>
  20. </view>
  21. <text class="tip-arrow">→</text>
  22. </view>
  23. </view>
  24. <!-- 用户信息卡片 -->
  25. <view class="user-profile-card" v-if="hasProfile" @click="goToProfile">
  26. <view class="user-avatar-wrapper">
  27. <image class="user-avatar" :src="userInfo.avatarUrl || userInfo.avatar || defaultAvatar" mode="aspectFill"></image>
  28. </view>
  29. <view class="user-info-content">
  30. <text class="user-nickname">{{ userInfo.nickname || '用户' }}</text>
  31. <view class="user-astro-tags">
  32. <view class="astro-tag" v-if="userConstellation">
  33. <text class="astro-icon">⭐</text>
  34. <text class="astro-text">{{ userConstellation }}</text>
  35. </view>
  36. <view class="astro-tag" v-if="userZodiac">
  37. <text class="astro-icon">🐲</text>
  38. <text class="astro-text">属{{ userZodiac }}</text>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="edit-icon">
  43. <text>›</text>
  44. </view>
  45. </view>
  46. <!-- 测算卡片区域 -->
  47. <view class="cards-section">
  48. <view class="card-item" v-for="(card, index) in cardList" :key="index" @click="handleCardClick(card)">
  49. <view class="card-icon">{{ card.icon }}</view>
  50. <view class="card-name">{{ card.name }}</view>
  51. </view>
  52. </view>
  53. <!-- 我的爱情运势 -->
  54. <view class="love-fortune">
  55. <view class="section-title">
  56. <text class="title-text">❤️ 我的爱情运势</text>
  57. <text class="title-date">{{ todayDate }}</text>
  58. </view>
  59. <view class="fortune-cards">
  60. <view class="fortune-card" v-for="(item, index) in loveFortune" :key="index">
  61. <view class="fortune-icon" :style="{background: item.color}">
  62. <text class="fortune-emoji">{{ item.icon }}</text>
  63. </view>
  64. <view class="fortune-info">
  65. <text class="fortune-label">{{ item.label }}</text>
  66. <view class="fortune-score">
  67. <view class="score-bar">
  68. <view class="score-fill" :style="{width: item.score + '%', background: item.color}"></view>
  69. </view>
  70. <text class="score-text">{{ item.score }}%</text>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. <!-- 本周脱单指数 -->
  77. <view class="single-index">
  78. <view class="section-title">
  79. <text class="title-text">📊 本周脱单指数</text>
  80. </view>
  81. <view class="index-card">
  82. <view class="index-header">
  83. <view class="index-score-wrapper">
  84. <text class="index-score">{{ singleIndex.score }}</text>
  85. <text class="index-unit">分</text>
  86. </view>
  87. <view class="index-level" :style="{background: singleIndex.levelColor}">
  88. {{ singleIndex.level }}
  89. </view>
  90. </view>
  91. <view class="index-tips">
  92. <view class="tip-item" v-for="(tip, index) in singleIndex.tips" :key="index">
  93. <text class="tip-icon">{{ tip.icon }}</text>
  94. <text class="tip-text">{{ tip.text }}</text>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. <!-- 每日幸运推荐 -->
  100. <view class="lucky-recommend">
  101. <view class="section-title">
  102. <text class="title-text">🎁 今日幸运推荐</text>
  103. </view>
  104. <view class="lucky-grid">
  105. <view class="lucky-item" v-for="(item, index) in luckyRecommend" :key="index">
  106. <view class="lucky-icon-wrapper" :style="{background: item.bgColor}">
  107. <text class="lucky-icon">{{ item.icon }}</text>
  108. </view>
  109. <text class="lucky-label">{{ item.label }}</text>
  110. <text class="lucky-value">{{ item.value }}</text>
  111. </view>
  112. </view>
  113. </view>
  114. <!-- 底部占位 -->
  115. <view class="bottom-placeholder"></view>
  116. </view>
  117. </template>
  118. <script>
  119. import fortuneUtil from '@/utils/fortune.js'
  120. import api from '@/utils/api.js'
  121. export default {
  122. data() {
  123. return {
  124. // 今日日期
  125. todayDate: '',
  126. // 用户信息
  127. userInfo: {},
  128. // 是否有完整资料
  129. hasProfile: false,
  130. // 用户星座和生肖
  131. userConstellation: '',
  132. userZodiac: '',
  133. // 默认头像
  134. defaultAvatar: 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI9FhqmIJtfQMh0LLicJxYS9xcd1u9YLnnvibALzycnOXLqm0JtmaNotzzSMyyibBtvBfzic6bg/0',
  135. // 测算卡片
  136. cardList: [
  137. { id: 1, name: '属相卡片', icon: '🐷', type: 'zodiac' },
  138. { id: 2, name: '星座卡片', icon: '♓', type: 'constellation' },
  139. { id: 3, name: '八字卡片', icon: '☯', type: 'bazi' },
  140. { id: 4, name: 'MBTI卡片', icon: '🧩', type: 'mbti' }
  141. ],
  142. // 我的爱情运势(动态计算)
  143. loveFortune: [],
  144. // 本周脱单指数(动态计算)
  145. singleIndex: {
  146. score: 75,
  147. level: '良好',
  148. levelColor: 'linear-gradient(135deg, #2196F3 0%, #03A9F4 100%)',
  149. tips: []
  150. },
  151. // 每日幸运推荐(动态计算)
  152. luckyRecommend: []
  153. }
  154. },
  155. onLoad() {
  156. this.initData()
  157. },
  158. onShow() {
  159. // 每次显示页面时重新加载用户信息和计算运势
  160. this.loadUserInfo()
  161. },
  162. methods: {
  163. // 初始化数据
  164. initData() {
  165. // 设置今日日期
  166. const date = new Date()
  167. const month = date.getMonth() + 1
  168. const day = date.getDate()
  169. const weekDays = ['日', '一', '二', '三', '四', '五', '六']
  170. const weekDay = weekDays[date.getDay()]
  171. this.todayDate = `${month}月${day}日 周${weekDay}`
  172. // 加载用户信息并计算运势
  173. this.loadUserInfo()
  174. },
  175. // 加载用户信息
  176. async loadUserInfo() {
  177. // 先从本地存储获取基础信息
  178. let userInfo = uni.getStorageSync('userInfo') || {}
  179. const userId = uni.getStorageSync('userId')
  180. // 如果有userId,从API获取最新用户信息
  181. if (userId) {
  182. try {
  183. const data = await api.user.getDetailInfo(userId)
  184. if (data) {
  185. // 合并API返回的数据
  186. userInfo = {
  187. ...userInfo,
  188. ...data,
  189. userId: userId
  190. }
  191. // 更新本地存储
  192. uni.setStorageSync('userInfo', userInfo)
  193. }
  194. } catch (error) {
  195. }
  196. }
  197. this.userInfo = userInfo
  198. // 计算运势
  199. this.calculateFortune()
  200. },
  201. // 计算运势数据
  202. calculateFortune() {
  203. const fortuneData = fortuneUtil.getFullFortuneData(this.userInfo)
  204. this.hasProfile = fortuneData.hasProfile
  205. this.userConstellation = fortuneData.constellation || ''
  206. this.userZodiac = fortuneData.zodiac || ''
  207. this.loveFortune = fortuneData.loveFortune
  208. this.singleIndex = fortuneData.singleIndex
  209. this.luckyRecommend = fortuneData.luckyRecommend
  210. },
  211. // 返回上一页
  212. goBack() {
  213. // 检查页面栈
  214. const pages = getCurrentPages()
  215. if (pages.length > 1) {
  216. // 有上一页,正常返回
  217. uni.navigateBack({
  218. delta: 1
  219. })
  220. } else {
  221. // 没有上一页,跳转到首页
  222. uni.switchTab({
  223. url: '/pages/index/index'
  224. })
  225. }
  226. },
  227. // 卡片点击
  228. handleCardClick(card) {
  229. // 根据不同类型跳转到不同页面
  230. const pageMap = {
  231. 'zodiac': '/pages/astrology/zodiac',
  232. 'constellation': '/pages/astrology/constellation',
  233. 'bazi': '/pages/astrology/bazi',
  234. 'mbti': '/pages/astrology/mbti'
  235. }
  236. const page = pageMap[card.type]
  237. if (page) {
  238. uni.navigateTo({
  239. url: page
  240. })
  241. } else {
  242. uni.showToast({
  243. title: `${card.name}功能开发中`,
  244. icon: 'none'
  245. })
  246. }
  247. },
  248. // 跳转到个人资料页面
  249. goToProfile() {
  250. uni.navigateTo({
  251. url: '/pages/profile/index'
  252. })
  253. }
  254. }
  255. }
  256. </script>
  257. <style lang="scss" scoped>
  258. .astrology-page {
  259. min-height: 100vh;
  260. background: linear-gradient(180deg, #FFF9F9 0%, #FFFFFF 50%);
  261. padding-bottom: 40rpx;
  262. }
  263. /* 自定义导航栏 */
  264. .custom-nav {
  265. position: relative;
  266. display: flex;
  267. align-items: center;
  268. justify-content: space-between;
  269. height: 88rpx;
  270. padding: 0 30rpx;
  271. background-color: #FFFFFF;
  272. border-bottom: 1rpx solid #F0F0F0;
  273. .nav-left {
  274. width: 80rpx;
  275. .back-icon {
  276. font-size: 40rpx;
  277. color: #333333;
  278. }
  279. }
  280. .nav-title {
  281. position: absolute;
  282. left: 50%;
  283. transform: translateX(-50%);
  284. font-size: 34rpx;
  285. font-weight: 600;
  286. color: #333333;
  287. }
  288. .nav-right {
  289. width: 80rpx;
  290. text-align: right;
  291. .menu-icon {
  292. font-size: 40rpx;
  293. color: #333333;
  294. }
  295. }
  296. }
  297. /* 用户资料提示 */
  298. .profile-tip {
  299. margin: 20rpx 30rpx;
  300. background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
  301. border-radius: 16rpx;
  302. padding: 24rpx;
  303. box-shadow: 0 4rpx 12rpx rgba(255, 152, 0, 0.15);
  304. .tip-content {
  305. display: flex;
  306. align-items: center;
  307. .tip-icon {
  308. font-size: 40rpx;
  309. margin-right: 20rpx;
  310. }
  311. .tip-text-group {
  312. flex: 1;
  313. .tip-title {
  314. font-size: 28rpx;
  315. font-weight: 600;
  316. color: #E65100;
  317. display: block;
  318. margin-bottom: 6rpx;
  319. }
  320. .tip-desc {
  321. font-size: 24rpx;
  322. color: #FF8F00;
  323. }
  324. }
  325. .tip-arrow {
  326. font-size: 32rpx;
  327. color: #E65100;
  328. font-weight: bold;
  329. }
  330. }
  331. }
  332. /* 用户信息卡片 */
  333. .user-profile-card {
  334. display: flex;
  335. align-items: center;
  336. margin: 20rpx 30rpx;
  337. padding: 24rpx;
  338. background: linear-gradient(135deg, #FFFFFF 0%, #FFF9FB 100%);
  339. border-radius: 20rpx;
  340. box-shadow: 0 4rpx 16rpx rgba(233, 30, 99, 0.1);
  341. border: 1rpx solid rgba(233, 30, 99, 0.1);
  342. .user-avatar-wrapper {
  343. width: 100rpx;
  344. height: 100rpx;
  345. border-radius: 50%;
  346. overflow: hidden;
  347. margin-right: 24rpx;
  348. border: 4rpx solid #FFE4EC;
  349. box-shadow: 0 4rpx 12rpx rgba(233, 30, 99, 0.15);
  350. .user-avatar {
  351. width: 100%;
  352. height: 100%;
  353. }
  354. }
  355. .user-info-content {
  356. flex: 1;
  357. .user-nickname {
  358. font-size: 32rpx;
  359. font-weight: 600;
  360. color: #333333;
  361. display: block;
  362. margin-bottom: 12rpx;
  363. }
  364. .user-astro-tags {
  365. display: flex;
  366. gap: 16rpx;
  367. .astro-tag {
  368. display: flex;
  369. align-items: center;
  370. background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD9 100%);
  371. padding: 8rpx 16rpx;
  372. border-radius: 20rpx;
  373. .astro-icon {
  374. font-size: 22rpx;
  375. margin-right: 6rpx;
  376. }
  377. .astro-text {
  378. font-size: 24rpx;
  379. color: #E91E63;
  380. font-weight: 500;
  381. }
  382. }
  383. }
  384. }
  385. .edit-icon {
  386. font-size: 40rpx;
  387. color: #CCCCCC;
  388. font-weight: 300;
  389. }
  390. }
  391. /* 测算卡片区域 */
  392. .cards-section {
  393. display: flex;
  394. justify-content: space-around;
  395. padding: 40rpx 30rpx 30rpx;
  396. background-color: #FFFFFF;
  397. .card-item {
  398. display: flex;
  399. flex-direction: column;
  400. align-items: center;
  401. width: 160rpx;
  402. transition: transform 0.2s;
  403. &:active {
  404. transform: scale(0.95);
  405. }
  406. .card-icon {
  407. width: 120rpx;
  408. height: 120rpx;
  409. display: flex;
  410. align-items: center;
  411. justify-content: center;
  412. background: linear-gradient(135deg, #F3E5F5 0%, #E1BEE7 100%);
  413. border-radius: 20rpx;
  414. font-size: 60rpx;
  415. margin-bottom: 15rpx;
  416. box-shadow: 0 4rpx 12rpx rgba(156, 39, 176, 0.15);
  417. }
  418. .card-name {
  419. font-size: 28rpx;
  420. color: #333333;
  421. font-weight: 500;
  422. }
  423. }
  424. }
  425. /* 通用标题样式 */
  426. .section-title {
  427. display: flex;
  428. justify-content: space-between;
  429. align-items: center;
  430. margin-bottom: 20rpx;
  431. .title-text {
  432. font-size: 32rpx;
  433. font-weight: 600;
  434. color: #333333;
  435. }
  436. .title-date {
  437. font-size: 24rpx;
  438. color: #999999;
  439. }
  440. .title-more {
  441. font-size: 24rpx;
  442. color: #E91E63;
  443. }
  444. }
  445. /* 缘分配对测试 */
  446. .match-test-banner {
  447. margin: 30rpx;
  448. background: linear-gradient(135deg, #FF6B9D 0%, #FFA5C6 100%);
  449. border-radius: 20rpx;
  450. padding: 30rpx;
  451. box-shadow: 0 8rpx 20rpx rgba(233, 30, 99, 0.25);
  452. transition: transform 0.2s;
  453. &:active {
  454. transform: scale(0.98);
  455. }
  456. .match-banner-content {
  457. display: flex;
  458. align-items: center;
  459. margin-bottom: 15rpx;
  460. .match-icon-group {
  461. width: 80rpx;
  462. height: 80rpx;
  463. background-color: rgba(255, 255, 255, 0.3);
  464. border-radius: 50%;
  465. display: flex;
  466. align-items: center;
  467. justify-content: center;
  468. margin-right: 20rpx;
  469. .match-icon {
  470. font-size: 48rpx;
  471. }
  472. }
  473. .match-text-group {
  474. flex: 1;
  475. .match-title {
  476. font-size: 32rpx;
  477. font-weight: 600;
  478. color: #FFFFFF;
  479. margin-bottom: 8rpx;
  480. }
  481. .match-subtitle {
  482. font-size: 24rpx;
  483. color: rgba(255, 255, 255, 0.9);
  484. }
  485. }
  486. .match-arrow {
  487. font-size: 40rpx;
  488. color: #FFFFFF;
  489. font-weight: bold;
  490. }
  491. }
  492. .match-stats {
  493. .match-stats-text {
  494. font-size: 22rpx;
  495. color: rgba(255, 255, 255, 0.85);
  496. }
  497. }
  498. }
  499. /* 我的爱情运势 */
  500. .love-fortune {
  501. margin: 30rpx;
  502. .fortune-cards {
  503. display: flex;
  504. flex-direction: column;
  505. gap: 15rpx;
  506. .fortune-card {
  507. display: flex;
  508. align-items: center;
  509. background-color: #FFFFFF;
  510. border-radius: 15rpx;
  511. padding: 25rpx;
  512. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.06);
  513. .fortune-icon {
  514. width: 70rpx;
  515. height: 70rpx;
  516. border-radius: 50%;
  517. display: flex;
  518. align-items: center;
  519. justify-content: center;
  520. margin-right: 20rpx;
  521. .fortune-emoji {
  522. font-size: 36rpx;
  523. }
  524. }
  525. .fortune-info {
  526. flex: 1;
  527. .fortune-label {
  528. font-size: 28rpx;
  529. color: #333333;
  530. font-weight: 500;
  531. margin-bottom: 12rpx;
  532. display: block;
  533. }
  534. .fortune-score {
  535. display: flex;
  536. align-items: center;
  537. .score-bar {
  538. flex: 1;
  539. height: 12rpx;
  540. background-color: #F0F0F0;
  541. border-radius: 6rpx;
  542. overflow: hidden;
  543. margin-right: 15rpx;
  544. .score-fill {
  545. height: 100%;
  546. border-radius: 6rpx;
  547. transition: width 0.6s ease;
  548. }
  549. }
  550. .score-text {
  551. font-size: 26rpx;
  552. color: #E91E63;
  553. font-weight: 600;
  554. min-width: 60rpx;
  555. text-align: right;
  556. }
  557. }
  558. }
  559. }
  560. }
  561. }
  562. /* 本周脱单指数 */
  563. .single-index {
  564. margin: 30rpx;
  565. .index-card {
  566. background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
  567. border-radius: 20rpx;
  568. padding: 30rpx;
  569. box-shadow: 0 4rpx 12rpx rgba(255, 152, 0, 0.15);
  570. .index-header {
  571. display: flex;
  572. justify-content: space-between;
  573. align-items: center;
  574. margin-bottom: 25rpx;
  575. .index-score-wrapper {
  576. display: flex;
  577. align-items: baseline;
  578. .index-score {
  579. font-size: 72rpx;
  580. font-weight: bold;
  581. color: #FF6B6B;
  582. line-height: 1;
  583. }
  584. .index-unit {
  585. font-size: 28rpx;
  586. color: #666666;
  587. margin-left: 8rpx;
  588. }
  589. }
  590. .index-level {
  591. padding: 10rpx 25rpx;
  592. border-radius: 30rpx;
  593. font-size: 28rpx;
  594. color: #FFFFFF;
  595. font-weight: 600;
  596. }
  597. }
  598. .index-tips {
  599. display: flex;
  600. flex-direction: column;
  601. gap: 12rpx;
  602. .tip-item {
  603. display: flex;
  604. align-items: center;
  605. background-color: rgba(255, 255, 255, 0.7);
  606. border-radius: 10rpx;
  607. padding: 15rpx 20rpx;
  608. .tip-icon {
  609. font-size: 28rpx;
  610. margin-right: 12rpx;
  611. }
  612. .tip-text {
  613. font-size: 26rpx;
  614. color: #333333;
  615. }
  616. }
  617. }
  618. }
  619. }
  620. /* 每日幸运推荐 */
  621. .lucky-recommend {
  622. margin: 30rpx;
  623. .lucky-grid {
  624. display: grid;
  625. grid-template-columns: repeat(4, 1fr);
  626. gap: 16rpx;
  627. .lucky-item {
  628. display: flex;
  629. flex-direction: column;
  630. align-items: center;
  631. background-color: #FFFFFF;
  632. border-radius: 12rpx;
  633. padding: 20rpx 10rpx;
  634. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.06);
  635. .lucky-icon-wrapper {
  636. width: 60rpx;
  637. height: 60rpx;
  638. border-radius: 50%;
  639. display: flex;
  640. align-items: center;
  641. justify-content: center;
  642. margin-bottom: 10rpx;
  643. .lucky-icon {
  644. font-size: 32rpx;
  645. }
  646. }
  647. .lucky-label {
  648. font-size: 22rpx;
  649. color: #999999;
  650. margin-bottom: 6rpx;
  651. }
  652. .lucky-value {
  653. font-size: 24rpx;
  654. color: #333333;
  655. font-weight: 600;
  656. text-align: center;
  657. word-break: break-all;
  658. }
  659. }
  660. }
  661. }
  662. /* 热门测试榜单 */
  663. .hot-tests {
  664. margin: 30rpx;
  665. .test-list {
  666. background-color: #FFFFFF;
  667. border-radius: 20rpx;
  668. overflow: hidden;
  669. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.06);
  670. .test-item {
  671. display: flex;
  672. align-items: center;
  673. padding: 25rpx 30rpx;
  674. border-bottom: 1rpx solid #F5F5F5;
  675. position: relative;
  676. transition: background-color 0.2s;
  677. &:last-child {
  678. border-bottom: none;
  679. }
  680. &:active {
  681. background-color: #F9F9F9;
  682. }
  683. .test-rank {
  684. width: 50rpx;
  685. height: 50rpx;
  686. background-color: #F0F0F0;
  687. border-radius: 10rpx;
  688. display: flex;
  689. align-items: center;
  690. justify-content: center;
  691. font-size: 26rpx;
  692. font-weight: bold;
  693. color: #666666;
  694. margin-right: 20rpx;
  695. &.top-rank {
  696. background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
  697. color: #FFFFFF;
  698. }
  699. }
  700. .test-info {
  701. flex: 1;
  702. .test-name {
  703. font-size: 28rpx;
  704. color: #333333;
  705. font-weight: 500;
  706. display: block;
  707. margin-bottom: 8rpx;
  708. }
  709. .test-count {
  710. font-size: 22rpx;
  711. color: #999999;
  712. }
  713. }
  714. .test-tag {
  715. position: absolute;
  716. top: 15rpx;
  717. right: 30rpx;
  718. padding: 4rpx 12rpx;
  719. background: linear-gradient(135deg, #E91E63 0%, #FF6B9D 100%);
  720. color: #FFFFFF;
  721. font-size: 20rpx;
  722. border-radius: 6rpx;
  723. font-weight: bold;
  724. }
  725. }
  726. }
  727. }
  728. /* 底部占位 */
  729. .bottom-placeholder {
  730. height: 40rpx;
  731. }
  732. </style>