diff --git a/src/components/PointRankItem.vue b/src/components/PointRankItem.vue index 37ccc09..6048a36 100644 --- a/src/components/PointRankItem.vue +++ b/src/components/PointRankItem.vue @@ -52,7 +52,7 @@ const onClick = async () => { - {{ data.name }} + {{ data.name }} {{ data.totalDay }}天 @@ -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; } diff --git a/src/pages/index.vue b/src/pages/index.vue index f13973e..ac11eee 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -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(() => { diff --git a/src/pages/my-like-list.vue b/src/pages/my-like-list.vue index ca3d33c..87c20ce 100644 --- a/src/pages/my-like-list.vue +++ b/src/pages/my-like-list.vue @@ -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; diff --git a/src/pages/point-book-rank.vue b/src/pages/point-book-rank.vue index 8132a87..c8c733e 100644 --- a/src/pages/point-book-rank.vue +++ b/src/pages/point-book-rank.vue @@ -73,7 +73,7 @@ const shareImage = async () => { {{ list[0].name }}占领了封面 整整消耗了{{ - Number(list[0].weekArrow * (1.6).toFixed(0)) + Number((list[0].weekArrow * 1.6).toFixed(0)) }}大卡! diff --git a/src/pages/point-book.vue b/src/pages/point-book.vue index e87a13b..e28ebee 100644 --- a/src/pages/point-book.vue +++ b/src/pages/point-book.vue @@ -157,7 +157,7 @@ const loadData = async () => { }; const strengthText = computed(() => { - return strength === 10 ? "重度" : strength <= 6 ? "中度" : "轻度"; + return strength.value > 10 ? "重度" : strength.value >= 6 ? "中度" : "轻度"; }); watch(