个人练习提示词修改
This commit is contained in:
@@ -14,10 +14,6 @@ const props = defineProps({
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: 0,
|
default: 0,
|
||||||
},
|
},
|
||||||
total: {
|
|
||||||
type: Number,
|
|
||||||
default: 0,
|
|
||||||
},
|
|
||||||
result: {
|
result: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
@@ -42,13 +38,13 @@ setTimeout(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view v-if="result.arrows && result.arrows.length > 0" class="container">
|
<view v-if="result.arrows" class="container">
|
||||||
<view :class="['container-header', showPanel ? 'scale-in' : 'scale-out']">
|
<view :class="['container-header', showPanel ? 'scale-in' : 'scale-out']">
|
||||||
<image :src="tipSrc" mode="widthFix" />
|
<image :src="tipSrc" mode="widthFix" />
|
||||||
<image src="../static/finish-frame.png" mode="widthFix" />
|
<image src="../static/finish-frame.png" mode="widthFix" />
|
||||||
<text
|
<text
|
||||||
>完成<text class="gold-text">{{ total }}</text
|
>完成<text class="gold-text">{{ result.arrows.length }}</text
|
||||||
>箭,获得<text class="gold-text">{{ total }}</text
|
>箭,获得<text class="gold-text">{{ result.arrows.length }}</text
|
||||||
>点经验</text
|
>点经验</text
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -224,11 +224,12 @@ const onClose = () => {
|
|||||||
/>
|
/>
|
||||||
<ScoreResult
|
<ScoreResult
|
||||||
v-if="practiseResult.arrows"
|
v-if="practiseResult.arrows"
|
||||||
:total="total"
|
|
||||||
:rowCount="6"
|
:rowCount="6"
|
||||||
:onClose="onClose"
|
:onClose="onClose"
|
||||||
:result="practiseResult"
|
:result="practiseResult"
|
||||||
tipSrc="../static/first-try-finish-tip.png"
|
:tipSrc="`../static/${
|
||||||
|
practiseResult.arrows.length < total ? 'un' : ''
|
||||||
|
}finish-tip.png`"
|
||||||
/>
|
/>
|
||||||
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ const onReady = async () => {
|
|||||||
|
|
||||||
async function onReceiveMessage(messages = []) {
|
async function onReceiveMessage(messages = []) {
|
||||||
messages.forEach((msg) => {
|
messages.forEach((msg) => {
|
||||||
|
console.log(11111, msg);
|
||||||
if (msg.constructor === MESSAGETYPES.ShootSyncMeArrowID) {
|
if (msg.constructor === MESSAGETYPES.ShootSyncMeArrowID) {
|
||||||
scores.value.push(msg.target);
|
scores.value.push(msg.target);
|
||||||
currentRound.value += 1;
|
currentRound.value += 1;
|
||||||
@@ -49,6 +50,7 @@ async function onReceiveMessage(messages = []) {
|
|||||||
...msg.practice,
|
...msg.practice,
|
||||||
arrows: JSON.parse(msg.practice.arrows),
|
arrows: JSON.parse(msg.practice.arrows),
|
||||||
};
|
};
|
||||||
|
console.log(2222, practiseResult.value);
|
||||||
generateCanvasImage("shareCanvas", 2, user.value, practiseResult.value);
|
generateCanvasImage("shareCanvas", 2, user.value, practiseResult.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -103,11 +105,12 @@ onUnmounted(() => {
|
|||||||
<ScorePanel2 v-if="start" :scores="scores.map((s) => s.ring)" />
|
<ScorePanel2 v-if="start" :scores="scores.map((s) => s.ring)" />
|
||||||
<ScoreResult
|
<ScoreResult
|
||||||
v-if="practiseResult.arrows"
|
v-if="practiseResult.arrows"
|
||||||
:total="total"
|
|
||||||
:rowCount="6"
|
:rowCount="6"
|
||||||
:onClose="onComplete"
|
:onClose="onComplete"
|
||||||
:result="practiseResult"
|
:result="practiseResult"
|
||||||
tipSrc="../static/finish-tip.png"
|
:tipSrc="`../static/${
|
||||||
|
practiseResult.arrows.length < total ? 'un' : ''
|
||||||
|
}finish-tip.png`"
|
||||||
/>
|
/>
|
||||||
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -114,7 +114,9 @@ onUnmounted(() => {
|
|||||||
:rowCount="9"
|
:rowCount="9"
|
||||||
:onClose="onComplete"
|
:onClose="onComplete"
|
||||||
:result="practiseResult"
|
:result="practiseResult"
|
||||||
tipSrc="../static/finish-tip.png"
|
:tipSrc="`../static/${
|
||||||
|
practiseResult.arrows.length < total ? '2un' : ''
|
||||||
|
}finish-tip.png`"
|
||||||
/>
|
/>
|
||||||
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
BIN
src/static/2unfinish-tip.png
Normal file
BIN
src/static/2unfinish-tip.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
BIN
src/static/unfinish-tip.png
Normal file
BIN
src/static/unfinish-tip.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user