细节调整

This commit is contained in:
kron
2026-01-06 14:41:45 +08:00
parent 3d13f7c880
commit 4275f608fe
5 changed files with 8 additions and 7 deletions

View File

@@ -52,7 +52,7 @@ const onClick = async () => {
<view>
<Avatar :src="data.avatar || '../static/user-icon.png'" :size="36" />
<view>
<text>{{ data.name }}</text>
<text class="truncate">{{ data.name }}</text>
<view>
<text>{{ data.totalDay }}</text>
<view />
@@ -112,7 +112,8 @@ const onClick = async () => {
margin-left: 20rpx;
}
.rank-item > view:nth-child(2) > view:last-child > text:first-child {
font-size: 30rpx;
width: 200rpx;
font-size: 28rpx;
color: #333333;
margin-bottom: 5rpx;
}

View File

@@ -108,6 +108,8 @@ onShow(async () => {
}
const devices = await getMyDevicesAPI();
if (devices.bindings && devices.bindings.length) {
const data = await getDeviceBatteryAPI();
updateOnline(data.online);
updateDevice(
devices.bindings[0].deviceId,
devices.bindings[0].deviceName
@@ -121,8 +123,6 @@ onMounted(async () => {
const config = await getAppConfig();
updateConfig(config);
console.log("全局配置:", config);
const data = await getDeviceBatteryAPI();
updateOnline(data.online);
});
onShareAppMessage(() => {

View File

@@ -48,7 +48,7 @@ const onListLoading = async (page) => {
width: 100%;
font-weight: 500;
font-size: 26rpx;
color: #5c6582;
color: #333;
display: flex;
align-items: center;
justify-content: flex-start;

View File

@@ -73,7 +73,7 @@ const shareImage = async () => {
<text>{{ list[0].name }}占领了封面</text>
<text
>整整消耗了{{
Number(list[0].weekArrow * (1.6).toFixed(0))
Number((list[0].weekArrow * 1.6).toFixed(0))
}}大卡!</text
>
</block>

View File

@@ -157,7 +157,7 @@ const loadData = async () => {
};
const strengthText = computed(() => {
return strength === 10 ? "重度" : strength <= 6 ? "中度" : "轻度";
return strength.value > 10 ? "重度" : strength.value >= 6 ? "中度" : "轻度";
});
watch(