hookehuyr

fix: 修正模拟数据中步数对应的value值错误

...@@ -60,16 +60,16 @@ const isCollecting = ref(false) // 是否正在收集,防止重复触发 ...@@ -60,16 +60,16 @@ const isCollecting = ref(false) // 是否正在收集,防止重复触发
60 */ 60 */
61 const generateMockData = () => { 61 const generateMockData = () => {
62 const mockItems = [ 62 const mockItems = [
63 - { id: 1, type: 'steps', value: 5000, steps: 5000 }, 63 + { id: 1, type: 'steps', value: 500, steps: 5000 },
64 { id: 2, type: 'points', value: 500 }, 64 { id: 2, type: 'points', value: 500 },
65 - { id: 3, type: 'steps', value: 8000, steps: 5000 }, 65 + { id: 3, type: 'steps', value: 800, steps: 5000 },
66 { id: 4, type: 'points', value: 30 }, 66 { id: 4, type: 'points', value: 30 },
67 - { id: 5, type: 'steps', value: 12000, steps: 12000 }, 67 + { id: 5, type: 'steps', value: 1200, steps: 12000 },
68 { id: 6, type: 'points', value: 800 }, 68 { id: 6, type: 'points', value: 800 },
69 { id: 7, type: 'points', value: 250 }, 69 { id: 7, type: 'points', value: 250 },
70 - { id: 8, type: 'steps', value: 6000, steps: 6000 }, 70 + { id: 8, type: 'steps', value: 600, steps: 6000 },
71 { id: 9, type: 'points', value: 1000 }, 71 { id: 9, type: 'points', value: 1000 },
72 - { id: 10, type: 'steps', value: 10000, steps: 10000 }, 72 + { id: 10, type: 'steps', value: 1000, steps: 10000 },
73 ].map(item => ({ ...item, collecting: false })); // 初始化collecting状态 73 ].map(item => ({ ...item, collecting: false })); // 初始化collecting状态
74 74
75 const maxValue = Math.max(...mockItems.map(i => i.value)); 75 const maxValue = Math.max(...mockItems.map(i => i.value));
......