index.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. page {
  2. background-color: $page-bg;
  3. color: $uni-text-color;
  4. }
  5. /* 顶部横向导航 */
  6. .top-nav-wrapper {
  7. position: fixed;
  8. top: calc(var(--status-bar-height) + 44px);
  9. left: 0;
  10. right: 0;
  11. z-index: 999;
  12. background-color: #fff;
  13. border-bottom: 1rpx solid #eee;
  14. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  15. }
  16. .top-nav {
  17. width: 100%;
  18. white-space: nowrap;
  19. padding: 0 10rpx;
  20. height: 88rpx;
  21. box-sizing: border-box;
  22. }
  23. .nav-tab {
  24. display: inline-block;
  25. padding: 0 28rpx;
  26. height: 88rpx;
  27. line-height: 88rpx;
  28. font-size: 28rpx;
  29. color: #666;
  30. text-align: center;
  31. flex-shrink: 0;
  32. position: relative;
  33. transition: color 0.25s ease;
  34. }
  35. .nav-tab.active {
  36. color: $j-primary-border-green;
  37. font-weight: 600;
  38. }
  39. .nav-tab.active::after {
  40. content: '';
  41. position: absolute;
  42. bottom: 0;
  43. left: 50%;
  44. transform: translateX(-50%);
  45. width: 48rpx;
  46. height: 6rpx;
  47. background-color: $j-primary-border-green;
  48. border-radius: 3rpx;
  49. }
  50. /* 内容区域 - 减少顶部空白 */
  51. .content-wrapper {
  52. padding-top: calc(var(--status-bar-height) + 80rpx);
  53. padding-bottom: env(safe-area-inset-bottom);
  54. }
  55. /* 模块卡片容器 */
  56. .nav {
  57. margin: 0 24rpx 24rpx;
  58. background-color: $uni-bg-color;
  59. border-radius: 16rpx;
  60. box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.06);
  61. overflow: hidden;
  62. .nav-content {
  63. padding: 24rpx 10rpx 10rpx;
  64. display: flex;
  65. flex-direction: row;
  66. flex-wrap: wrap;
  67. .nav-item {
  68. position: relative;
  69. display: flex;
  70. flex-direction: column;
  71. align-items: center;
  72. justify-content: flex-start;
  73. width: 25%;
  74. padding: 16rpx 0 24rpx;
  75. box-sizing: border-box;
  76. &:active {
  77. opacity: 0.7;
  78. }
  79. span {
  80. font-size: 56rpx;
  81. color: $j-primary-border-green;
  82. margin-bottom: 12rpx;
  83. line-height: 1;
  84. }
  85. label {
  86. font-size: 24rpx;
  87. color: $uni-text-color;
  88. width: 90%;
  89. text-align: center;
  90. overflow: hidden;
  91. text-overflow: ellipsis;
  92. white-space: nowrap;
  93. line-height: 1.4;
  94. }
  95. .badge {
  96. position: absolute;
  97. top: 6rpx;
  98. left: 55%;
  99. min-width: 32rpx;
  100. height: 32rpx;
  101. line-height: 32rpx;
  102. font-size: 20rpx;
  103. padding: 0 8rpx;
  104. border-radius: 32rpx;
  105. background-color: #ff4949;
  106. color: #fff;
  107. font-style: normal;
  108. text-align: center;
  109. box-sizing: border-box;
  110. margin-left: 10rpx;
  111. }
  112. }
  113. }
  114. }