计分本修改

This commit is contained in:
kron
2025-10-11 09:06:56 +08:00
parent fb0cf62ca0
commit 5bf3bbccdb
6 changed files with 155 additions and 30 deletions

View File

@@ -31,6 +31,7 @@ const isIOS = computed(() => {
return systemInfo.osName === "ios";
});
const loadImage = ref(false);
const showModal = ref(false);
const showTip = ref(false);
const data = ref({
@@ -75,6 +76,7 @@ const loadData = async () => {
else if (result2.checkInCount >= 5) hot = 3;
else if (result2.checkInCount === 7) hot = 4;
uni.$emit("update-hot", hot);
loadImage.value = true;
const generateHeatmapAsync = async () => {
const weekArrows = result2.weekArrows
.filter((item) => item.x && item.y)
@@ -108,9 +110,11 @@ const loadData = async () => {
}
);
heatMapImageSrc.value = finalPath;
loadImage.value = false;
console.log("热力图图片地址:", finalPath);
} catch (error) {
console.error("生成热力图图片失败:", error);
loadImage.value = false;
}
};
@@ -282,6 +286,9 @@ onShareTimeline(() => {
:src="heatMapImageSrc"
mode="aspectFill"
/>
<view v-if="loadImage" class="load-image">
<text>生成中...</text>
</view>
<canvas
id="heatMapCanvas"
canvas-id="heatMapCanvas"
@@ -445,6 +452,17 @@ onShareTimeline(() => {
top: 0;
left: 0;
}
.load-image {
position: absolute;
width: 160rpx;
top: calc(50% - 65rpx);
left: calc(50% - 75rpx);
color: #525252;
font-size: 20rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.reward {
width: 100%;
display: flex;