细节完善

This commit is contained in:
kron
2025-07-18 15:48:41 +08:00
parent c8dbc1eb5e
commit 115e0cefbb
5 changed files with 9 additions and 1 deletions

View File

@@ -14,7 +14,11 @@ onShow(async () => {
show.value = isGaming; show.value = isGaming;
}); });
const onClick = async () => { const onClick = async () => {
const result = await getCurrentGameAPI(); const isGaming = await isGamingAPI();
show.value = isGaming;
if (isGaming) {
const result = await getCurrentGameAPI();
}
}; };
</script> </script>

View File

@@ -140,6 +140,7 @@ onLoad(async (options) => {
} }
if (battleInfo.fireTime > 0) { if (battleInfo.fireTime > 0) {
const remain = Date.now() / 1000 - battleInfo.fireTime; const remain = Date.now() / 1000 - battleInfo.fireTime;
console.log(`当前箭剩余${remain}`);
if (remain > 0 && remain < 15) { if (remain > 0 && remain < 15) {
// 等渲染好再通知 // 等渲染好再通知
setTimeout(() => { setTimeout(() => {
@@ -165,6 +166,7 @@ onLoad(async (options) => {
scores.value.length ? "下半场-" : "上半场-" scores.value.length ? "下半场-" : "上半场-"
}请连续射出6支箭`; }请连续射出6支箭`;
const remain = Date.now() / 1000 - battleInfo.startTime; const remain = Date.now() / 1000 - battleInfo.startTime;
console.log(`当前局剩余${remain}`);
if (remain <= 90) { if (remain <= 90) {
setTimeout(() => { setTimeout(() => {
uni.$emit("update-ramain", remain); uni.$emit("update-ramain", remain);

View File

@@ -73,6 +73,7 @@ onLoad(async (options) => {
scores.value.length ? "下半场-" : "上半场-" scores.value.length ? "下半场-" : "上半场-"
}请连续射出6支箭`; }请连续射出6支箭`;
const remain = Date.now() / 1000 - battleInfo.startTime; const remain = Date.now() / 1000 - battleInfo.startTime;
console.log(`当前局剩余${remain}`);
if (remain <= 90) { if (remain <= 90) {
setTimeout(() => { setTimeout(() => {
uni.$emit("update-ramain", remain); uni.$emit("update-ramain", remain);

View File

@@ -106,6 +106,7 @@ onLoad(async (options) => {
} }
} }
if (battleInfo.fireTime > 0) { if (battleInfo.fireTime > 0) {
console.log(`当前箭剩余${remain}`);
const remain = Date.now() / 1000 - battleInfo.fireTime; const remain = Date.now() / 1000 - battleInfo.fireTime;
if (remain > 0 && remain <= 15) { if (remain > 0 && remain <= 15) {
// 等渲染好再通知 // 等渲染好再通知

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB