health.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <CustomNav title="健康数据" leftType="none" />
  3. <view class="content">
  4. <view class="menu-card">
  5. <view class="menu-list">
  6. <view class="menu-item" @click="openDetail('height')">
  7. <image src="/static/icons/remixicon/height.svg" class="menu-icon" mode="widthFix" />
  8. <text class="menu-text">身高</text>
  9. <text class="menu-value">--</text>
  10. <uni-icons class="menu-arrow" type="arrowright" size="20" color="#c0c0c0" />
  11. </view>
  12. <view class="menu-item" @click="openDetail('weight')">
  13. <image src="/static/icons/remixicon/weight.svg" class="menu-icon" mode="widthFix" />
  14. <text class="menu-text">体重</text>
  15. <text class="menu-value">80.0 公斤</text>
  16. <uni-icons class="menu-arrow" type="arrowright" size="20" color="#c0c0c0" />
  17. </view>
  18. <view class="menu-item" @click="openDetail('bmi')">
  19. <image src="/static/icons/remixicon/bmi.svg" class="menu-icon" mode="widthFix" />
  20. <text class="menu-text">BMI</text>
  21. <text class="menu-value">--</text>
  22. <uni-icons class="menu-arrow" type="arrowright" size="20" color="#c0c0c0" />
  23. </view>
  24. <view class="menu-item" @click="openDetail('blood-pressure')"><image src="/static/icons/remixicon/scan-line.svg" class="menu-icon" mode="widthFix" />
  25. <text class="menu-text">血压</text>
  26. <text class="menu-value">--</text>
  27. <uni-icons class="menu-arrow" type="arrowright" size="20" color="#c0c0c0" />
  28. </view>
  29. <view class="menu-item" @click="openDetail('blood-glucose')"><image src="/static/icons/remixicon/contrast-drop-2-line.svg" class="menu-icon" mode="widthFix" />
  30. <text class="menu-text">血糖</text>
  31. <text class="menu-value">--</text>
  32. <uni-icons class="menu-arrow" type="arrowright" size="20" color="#c0c0c0" />
  33. </view>
  34. <view class="menu-item" @click="openDetail('heart-rate')">
  35. <image src="/static/icons/remixicon/heart-pulse.svg" class="menu-icon" mode="widthFix" />
  36. <text class="menu-text">心率</text>
  37. <text class="menu-value">--</text>
  38. <uni-icons class="menu-arrow" type="arrowright" size="20" color="#c0c0c0" />
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. <TabBar />
  44. </template>
  45. <script setup lang="ts">
  46. import { ref } from 'vue'
  47. import CustomNav from '@/components/CustomNav.vue'
  48. import TabBar from '@/components/TabBar.vue'
  49. const title = ref('健康数据')
  50. const openDetail = (type: string) => {
  51. uni.navigateTo({ url: `/pages/health/${type}` })
  52. }
  53. </script>
  54. <style scoped>
  55. .content {
  56. padding-top: calc(var(--status-bar-height) + 44px);
  57. min-height: 100vh;
  58. background-color: #f5f5f5;
  59. box-sizing: border-box;
  60. }
  61. .text-area {
  62. display: flex;
  63. justify-content: center;
  64. }
  65. .title {
  66. font-size: 36rpx;
  67. color: #8f8f94;
  68. }
  69. .menu-card {
  70. padding: 50rpx 0rpx;
  71. }
  72. .menu-list {
  73. background-color: #fff;
  74. border-radius: 12rpx;
  75. overflow: hidden;
  76. }
  77. .menu-item {
  78. display: flex;
  79. justify-content: flex-start;
  80. align-items: center;
  81. padding: 30rpx 40rpx;
  82. border-bottom: 1rpx solid #eee;
  83. }
  84. .menu-item:last-child {
  85. border-bottom: none
  86. }
  87. .menu-text {
  88. font-size: 32rpx;
  89. color: #000000;
  90. flex: 1;
  91. /* 字符间距,调整数值以获得所需视觉效果 */
  92. letter-spacing: 1rpx;
  93. }
  94. .menu-value {
  95. font-size: 28rpx;
  96. color: #5a5a5a;
  97. margin-right: 10rpx
  98. }
  99. .menu-arrow {
  100. display: inline-flex;
  101. align-items: center;
  102. justify-content: center;
  103. width: 44rpx;
  104. height: 44rpx;
  105. }
  106. .menu-icon {
  107. width: 40rpx;
  108. height: 40rpx;
  109. margin-right: 30rpx;
  110. display: inline-block;
  111. }
  112. </style>