fix:首页调用鉴权接口;用药提醒框:字体太小,需调整展示位置;视力测试:视力结果保留一位小数(例:4.0 5.0)

This commit is contained in:
2024-06-19 22:25:50 +08:00
parent c30fba1ec2
commit db46299b8c
3 changed files with 40 additions and 9 deletions

View File

@@ -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 @@
<uni-icons type="sound-filled" color="#fc9467" size="30"></uni-icons>
<view class="tlb-item-box">
<view class="tlb-item" @tap="todoFunc(1)">
<view class="tlb-time">
{{todayTodoListShow.remindTime}}:
</view>
<view class="tlb-content">{{todayTodoListShow.content}}</view>
<view class="tlb-content text-ellipsis-1">{{todayTodoListShow.remindTime}}: &nbsp;{{todayTodoListShow.content}}</view>
</view>
</view>
</view>
@@ -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;

View File

@@ -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
}
</script>
<template>
<view class="visionTestBox page-box">