From 494f83392e838f95f44b25fe4081b430c4800a99 Mon Sep 17 00:00:00 2001 From: kron Date: Wed, 7 Jan 2026 10:07:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/canvas.js | 10 +++++++++- src/components/PointRankItem.vue | 4 ++-- src/pages/point-book-rank.vue | 14 +++++--------- src/pages/point-book.vue | 7 ++++--- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/canvas.js b/src/canvas.js index b9d107b..b1d06a6 100644 --- a/src/canvas.js +++ b/src/canvas.js @@ -524,7 +524,15 @@ export const sharePractiseData = async (canvasId, data) => { renderText(ctx, data.weekArrow, 36, "#FA2A2A", 84, 152, "center"); ctx.drawImage(bubble2Img, 65, 220, 143, 87); renderText(ctx, "本周消耗", 14, "#FDA103", 139, 248, "center"); - renderText(ctx, data.weekArrow * 1.6, 36, "#FA2A2A", 139, 284, "center"); + renderText( + ctx, + Math.round(data.weekArrow * 1.6), + 36, + "#FA2A2A", + 139, + 284, + "center" + ); ctx.drawImage(bubble3Img, 255, 52, 114, 92); renderText(ctx, "我的名次", 14, "#FDA103", 312, 80, "center"); renderText(ctx, data.rank, 36, "#FA2A2A", 312, 116, "center"); diff --git a/src/components/PointRankItem.vue b/src/components/PointRankItem.vue index 6048a36..3fcab26 100644 --- a/src/components/PointRankItem.vue +++ b/src/components/PointRankItem.vue @@ -147,8 +147,8 @@ const onClick = async () => { align-items: center; font-size: 22rpx; color: #777777; - margin-left: 20rpx; - margin-right: 10rpx; + padding-left: 20rpx; + padding-right: 10rpx; } .rank-item > button:nth-child(5) > image { width: 24rpx; diff --git a/src/pages/point-book-rank.vue b/src/pages/point-book-rank.vue index c8c733e..a1aff4f 100644 --- a/src/pages/point-book-rank.vue +++ b/src/pages/point-book-rank.vue @@ -71,11 +71,7 @@ const shareImage = async () => { {{ list[0].name }}占领了封面 - 整整消耗了{{ - Number((list[0].weekArrow * 1.6).toFixed(0)) - }}大卡! + 整整消耗了{{ Math.round(list[0].weekArrow * 1.6) }}大卡! @@ -173,12 +169,12 @@ const shareImage = async () => { display: flex; align-items: center; text-align: center; - width: 100%; + width: calc(100% - 80rpx); line-height: 80rpx; + padding: 0 40rpx; } .rank-title-bar > text:nth-child(1) { - width: calc(15% - 30rpx); - padding-left: 30rpx; + width: 60rpx; } .rank-title-bar > text:nth-child(2) { flex: 1; @@ -187,7 +183,7 @@ const shareImage = async () => { width: 18%; } .rank-title-bar > text:nth-child(4) { - width: 27%; + width: 24%; } .data-list { background: $uni-white; diff --git a/src/pages/point-book.vue b/src/pages/point-book.vue index db7111f..800da4c 100644 --- a/src/pages/point-book.vue +++ b/src/pages/point-book.vue @@ -648,11 +648,12 @@ onShareTimeline(() => { display: flex; align-items: center; text-align: center; - width: 100%; + width: calc(100% - 40rpx); line-height: 80rpx; + padding: 0 20rpx; } .rank-title-bar > text:nth-child(1) { - width: 15%; + width: 55rpx; } .rank-title-bar > text:nth-child(2) { flex: 1; @@ -661,7 +662,7 @@ onShareTimeline(() => { width: 16%; } .rank-title-bar > text:nth-child(4) { - width: 27%; + width: 25%; } .strength { font-size: 22rpx;