Ver Fonte

refactor(date): 移除未使用的日期工具函数导入

- 从多个组件中移除了未使用的 getWeekEnd 和 weekDayIndex 导入
- 清理了 useUChart 中不必要的日期工具函数引用
- 统一优化了日期相关工具函数的使用方式
- 将图片资源从 PNG 格式统一转换为 JPG 格式
- 更新了轮播图图片路径引用以匹配新格式
mcbaiyun há 1 mês atrás
pai
commit
90e2b7eb84

+ 1 - 1
src/components/scale-ruler.vue

@@ -20,7 +20,7 @@
 </template>
 
 <script setup lang="ts">
-import { ref, computed, watch, onMounted } from 'vue'
+import { ref, computed, onMounted } from 'vue'
 import { getCurrentInstance } from 'vue'
 
 interface GridItem { num: number; displayNum: number | string; isLongGrid: boolean; showText: boolean }

+ 1 - 1
src/composables/useUChart.ts

@@ -1,6 +1,6 @@
 import { ref } from 'vue'
 import uCharts from '@qiun/ucharts'
-import { getWeekStart, getWeekEnd, formatDisplayDate, daysInMonth } from '@/utils/date'
+import { getWeekStart, daysInMonth } from '@/utils/date'
 
 type Params = {
   canvasId: string,

+ 1 - 1
src/pages/patient/health/details/blood-glucose.vue

@@ -94,7 +94,7 @@ import CustomNav from '@/components/custom-nav.vue'
 
 import ScaleRuler from '@/components/scale-ruler.vue'
 import { createUChart } from '@/composables/useUChart'
-import { getWeekStart, getWeekEnd, getWeekNumber, formatDisplayDate, formatPickerDate, daysInMonth, weekDayIndex } from '@/utils/date'
+import { getWeekStart, getWeekEnd, formatDisplayDate, formatPickerDate, daysInMonth } from '@/utils/date'
 
 type RecordItem = { id: string; date: string; value: number; type: string }
 

+ 1 - 1
src/pages/patient/health/details/blood-pressure.vue

@@ -96,7 +96,7 @@ import { createUChart } from '@/composables/useUChart'
 import CustomNav from '@/components/custom-nav.vue'
 
 import ScaleRuler from '@/components/scale-ruler.vue'
-import { getWeekStart, getWeekEnd, getWeekNumber, formatDisplayDate, formatPickerDate, daysInMonth, weekDayIndex } from '@/utils/date'
+import { getWeekStart, getWeekEnd, formatDisplayDate, formatPickerDate, daysInMonth } from '@/utils/date'
 
 type RecordItem = { id: string; date: string; s: number; d: number }
 

+ 1 - 1
src/pages/patient/health/details/heart-rate.vue

@@ -86,7 +86,7 @@ import { createUChart } from '@/composables/useUChart'
 import CustomNav from '@/components/custom-nav.vue'
 
 import ScaleRuler from '@/components/scale-ruler.vue'
-import { getWeekStart, getWeekEnd, getWeekNumber, formatDisplayDate, formatPickerDate, daysInMonth, weekDayIndex } from '@/utils/date'
+import { getWeekStart, getWeekEnd, formatDisplayDate, formatPickerDate, daysInMonth } from '@/utils/date'
 
 type RecordItem = { id: string; date: string; hr: number }
 

+ 1 - 1
src/pages/patient/health/details/height.vue

@@ -87,7 +87,7 @@ import { createUChart } from '@/composables/useUChart'
 import CustomNav from '@/components/custom-nav.vue'
 
 import ScaleRuler from '@/components/scale-ruler.vue'
-import { getWeekStart, getWeekEnd, getWeekNumber, formatDisplayDate, formatPickerDate, daysInMonth, weekDayIndex } from '@/utils/date'
+import { getWeekStart, getWeekEnd, formatDisplayDate, formatPickerDate, daysInMonth } from '@/utils/date'
 
 type RecordItem = { id: string; date: string; height: number }
 

+ 1 - 1
src/pages/patient/health/details/weight.vue

@@ -85,7 +85,7 @@ import { createUChart } from '@/composables/useUChart'
 import CustomNav from '@/components/custom-nav.vue'
 
 import ScaleRuler from '@/components/scale-ruler.vue'
-import { getWeekStart, getWeekEnd, getWeekNumber, formatDisplayDate, formatPickerDate, daysInMonth, weekDayIndex } from '@/utils/date'
+import { getWeekStart, getWeekEnd,formatDisplayDate, formatPickerDate, daysInMonth } from '@/utils/date'
 
 type RecordItem = { id: string; date: string; weight: number }
 

+ 1 - 1
src/pages/patient/index/index.vue

@@ -117,7 +117,7 @@ const newsList = ref([
   {
     title: '健康饮食指南',
     desc: '了解均衡饮食的重要性,掌握健康饮食的基本原则。',
-    image: '/static/carousel/BHFIIABBCDJII-5kCEkD6zh9.png'
+    image: '/static/carousel/BHFIIABBCDJII-5kCEkD6zh9.jpg'
   },
   {
     title: '运动与健康',

+ 3 - 3
src/pages/public/index/index.vue

@@ -27,9 +27,9 @@ import { isLoggedIn as checkLogin, getRole } from '@/composables/useAuth'
 const title = ref('Hello')
 
 const bannerImages = [
-  '/static/carousel/BHFIIABBCDJII-5kCEkD6zh9.png',
-  '/static/carousel/BHFIIABBDGHEA-wtWLrLS75o.png',
-  '/static/carousel/BHFIIABBHJBAH-yDeckRiiQP.png'
+  '/static/carousel/BHFIIABBCDJII-5kCEkD6zh9.jpg',
+  '/static/carousel/BHFIIABBDGHEA-wtWLrLS75o.jpg',
+  '/static/carousel/BHFIIABBHJBAH-yDeckRiiQP.jpg'
 ]
 
 const cards = [

BIN
src/static/carousel/BHFIIABBCDJII-5kCEkD6zh9.jpg


BIN
src/static/carousel/BHFIIABBCDJII-5kCEkD6zh9.png


BIN
src/static/carousel/BHFIIABBDGHEA-wtWLrLS75o.jpg


BIN
src/static/carousel/BHFIIABBDGHEA-wtWLrLS75o.png


BIN
src/static/carousel/BHFIIABBHJBAH-yDeckRiiQP.jpg


BIN
src/static/carousel/BHFIIABBHJBAH-yDeckRiiQP.png