分享功能优化
This commit is contained in:
@@ -12,6 +12,7 @@ import Avatar from "@/components/Avatar.vue";
|
||||
import BowPower from "@/components/BowPower.vue";
|
||||
import StartCountdown from "@/components/StartCountdown.vue";
|
||||
import { createPractiseAPI, getHomeData } from "@/apis";
|
||||
import { generateCanvasImage } from "@/util";
|
||||
import { MESSAGETYPES } from "@/constants";
|
||||
import useStore from "@/store";
|
||||
import { storeToRefs } from "pinia";
|
||||
@@ -65,6 +66,7 @@ async function onReceiveMessage(messages = []) {
|
||||
...msg.practice,
|
||||
arrows: JSON.parse(msg.practice.arrows),
|
||||
};
|
||||
generateCanvasImage("shareCanvas", 1, user.value, practiseResult.value);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -95,8 +97,8 @@ const nextStep = async () => {
|
||||
step.value = 4;
|
||||
startCount.value = true;
|
||||
} else if (step.value === 5) {
|
||||
const result = await getHomeData();
|
||||
if (result.user) updateUser(result.user);
|
||||
// const result = await getHomeData();
|
||||
// if (result.user) updateUser(result.user);
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
@@ -220,8 +222,8 @@ const onClose = () => {
|
||||
v-if="step === 4"
|
||||
:onClose="onClose"
|
||||
:result="practiseResult"
|
||||
:dataType="1"
|
||||
/>
|
||||
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
||||
<StartCountdown :start="startCount" :onFinish="onStart" />
|
||||
</view>
|
||||
<view :style="{ marginBottom: '20px' }">
|
||||
|
||||
Reference in New Issue
Block a user