refactor(Dashboard): 移除未使用的步数状态管理及相关代码
清理不再使用的useStepsStore导入和变量声明,同时移除相册数据中未使用的createTime字段
Showing
1 changed file
with
0 additions
and
41 deletions
| ... | @@ -195,7 +195,6 @@ import TotalPointsDisplay from '@/components/TotalPointsDisplay.vue'; | ... | @@ -195,7 +195,6 @@ import TotalPointsDisplay from '@/components/TotalPointsDisplay.vue'; |
| 195 | import PointsCollector from '@/components/PointsCollector.vue' | 195 | import PointsCollector from '@/components/PointsCollector.vue' |
| 196 | import WeRunAuth from '@/components/WeRunAuth.vue' | 196 | import WeRunAuth from '@/components/WeRunAuth.vue' |
| 197 | import { useMediaPreview } from '@/composables/useMediaPreview'; | 197 | import { useMediaPreview } from '@/composables/useMediaPreview'; |
| 198 | -import { useStepsStore } from '@/stores/steps'; | ||
| 199 | // 默认家庭封面图 | 198 | // 默认家庭封面图 |
| 200 | const defaultFamilyCover = 'https://cdn.ipadbiz.cn/lls_prog/images/default-family-cover.png'; | 199 | const defaultFamilyCover = 'https://cdn.ipadbiz.cn/lls_prog/images/default-family-cover.png'; |
| 201 | // 默认头像 | 200 | // 默认头像 |
| ... | @@ -203,9 +202,6 @@ const defaultAvatar = 'https://cdn.ipadbiz.cn/mlaj/images/icon_1.jpeg' | ... | @@ -203,9 +202,6 @@ const defaultAvatar = 'https://cdn.ipadbiz.cn/mlaj/images/icon_1.jpeg' |
| 203 | // 接口信息 | 202 | // 接口信息 |
| 204 | import { getFamilyDashboardAPI } from '@/api/family' | 203 | import { getFamilyDashboardAPI } from '@/api/family' |
| 205 | 204 | ||
| 206 | -// 使用步数状态管理 | ||
| 207 | -const stepsStore = useStepsStore(); | ||
| 208 | - | ||
| 209 | const todaySteps = ref(0); | 205 | const todaySteps = ref(0); |
| 210 | const isWeRunAuthorized = ref(false); | 206 | const isWeRunAuthorized = ref(false); |
| 211 | const pointsCollectorRef = ref(null) | 207 | const pointsCollectorRef = ref(null) |
| ... | @@ -241,13 +237,11 @@ const albumData = ref([ | ... | @@ -241,13 +237,11 @@ const albumData = ref([ |
| 241 | { | 237 | { |
| 242 | type: 'image', | 238 | type: 'image', |
| 243 | url: 'https://cdn.ipadbiz.cn/hager/0513-1_FsxMk28AGz6N_D1zZFFOl_EaRdss.png', | 239 | url: 'https://cdn.ipadbiz.cn/hager/0513-1_FsxMk28AGz6N_D1zZFFOl_EaRdss.png', |
| 244 | - createTime: '2024-01-15 10:30' | ||
| 245 | }, | 240 | }, |
| 246 | { | 241 | { |
| 247 | type: 'video', | 242 | type: 'video', |
| 248 | url: 'https://vjs.zencdn.net/v/oceans.mp4', | 243 | url: 'https://vjs.zencdn.net/v/oceans.mp4', |
| 249 | thumbnail: 'https://cdn.ipadbiz.cn/hager/0513-1_FsxMk28AGz6N_D1zZFFOl_EaRdss.png', | 244 | thumbnail: 'https://cdn.ipadbiz.cn/hager/0513-1_FsxMk28AGz6N_D1zZFFOl_EaRdss.png', |
| 250 | - createTime: '2024-01-14 16:20' | ||
| 251 | } | 245 | } |
| 252 | ]); | 246 | ]); |
| 253 | 247 | ||
| ... | @@ -316,7 +310,6 @@ const getTotalSteps = () => { | ... | @@ -316,7 +310,6 @@ const getTotalSteps = () => { |
| 316 | return familyMembers.value.reduce((sum, member) => sum + member.today_step, 0).toLocaleString() | 310 | return familyMembers.value.reduce((sum, member) => sum + member.today_step, 0).toLocaleString() |
| 317 | } | 311 | } |
| 318 | 312 | ||
| 319 | -// Mock data for family members | ||
| 320 | const familyMembers = ref([]); | 313 | const familyMembers = ref([]); |
| 321 | 314 | ||
| 322 | const goToProfile = () => { | 315 | const goToProfile = () => { |
| ... | @@ -415,37 +408,3 @@ useReady(async () => { | ... | @@ -415,37 +408,3 @@ useReady(async () => { |
| 415 | }); | 408 | }); |
| 416 | }) | 409 | }) |
| 417 | </script> | 410 | </script> |
| 418 | - | ||
| 419 | -<style lang="less"> | ||
| 420 | -.loading-dots { | ||
| 421 | - display: inline-block; | ||
| 422 | - | ||
| 423 | - .dot { | ||
| 424 | - display: inline-block; | ||
| 425 | - animation: loading-bounce 1.4s ease-in-out infinite both; | ||
| 426 | - | ||
| 427 | - &:nth-child(1) { | ||
| 428 | - animation-delay: -0.32s; | ||
| 429 | - } | ||
| 430 | - | ||
| 431 | - &:nth-child(2) { | ||
| 432 | - animation-delay: -0.16s; | ||
| 433 | - } | ||
| 434 | - | ||
| 435 | - &:nth-child(3) { | ||
| 436 | - animation-delay: 0s; | ||
| 437 | - } | ||
| 438 | - } | ||
| 439 | -} | ||
| 440 | - | ||
| 441 | -@keyframes loading-bounce { | ||
| 442 | - 0%, 80%, 100% { | ||
| 443 | - transform: scale(0.8); | ||
| 444 | - opacity: 0.5; | ||
| 445 | - } | ||
| 446 | - 40% { | ||
| 447 | - transform: scale(1); | ||
| 448 | - opacity: 1; | ||
| 449 | - } | ||
| 450 | -} | ||
| 451 | -</style> | ... | ... |
-
Please register or login to post a comment