diff --git a/pages/index/index.vue b/pages/index/index.vue index 9a28e68..84735e3 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -61,6 +61,18 @@ const res = await api.todayTodoList({userId:user_info.userId}) if(res.code == 0) { todayTodoList.value = res.data + // 测试开始 + // let o = [ + // { + // remindTime: '2024.1.1', + // content: '测试' + // }, + // { + // remindTime: '2024.1.1', + // content: '快去测试343232423快去测试快去测试快去测试快去测试快去测试' + // }] + // todayTodoList.value.push(...o) + // 测试结束 if(todayTodoList.value.length > 0) { showTodo() } @@ -76,7 +88,7 @@ } todayTodoListShow.value = todayTodoList.value[start_num] start_num++ - }, 1000) + }, 2000) } function subscribeFunc() { uni.requestSubscribeMessage({ @@ -243,10 +255,7 @@ - - {{todayTodoListShow.remindTime}}: - - {{todayTodoListShow.content}} + {{todayTodoListShow.remindTime}}:  {{todayTodoListShow.content}} @@ -348,8 +357,11 @@ .todayTodoListBox{ display: flex; align-items: center; + margin-top: 1vh; .tlb-item-box{ - color: gray; + color: #f97a44; + font-weight: 900; + font-size: 4.2vw; .tlb-item{ display: flex; align-items: center; diff --git a/pages/index/result.vue b/pages/index/result.vue index fa54a66..577f651 100644 --- a/pages/index/result.vue +++ b/pages/index/result.vue @@ -53,16 +53,24 @@ src: bg_list.value[bg_list_index.value], success:function(res) { avatarUrl.value = uni.getStorageSync('avatarUrl') - info.value.left = parseFloat(res_.value.leftEyeVision) - info.value.right = parseFloat(res_.value.rightEyeVision) + // info.value.left = parseFloat(res_.value.leftEyeVision) + // info.value.right = parseFloat(res_.value.rightEyeVision) show_.value = true - + // 判断度数长度是否只有一位 + info.value.left = getRightNum(info.value.left) + info.value.right = getRightNum(info.value.right) }, fail(err) { console.log(err) } }) } + function getRightNum(num) { + if((num+'').length === 1) { + num = num+'.0' + } + return num + }