diff --git a/src/apis.js b/src/apis.js index d257042..edf3cf0 100644 --- a/src/apis.js +++ b/src/apis.js @@ -78,8 +78,11 @@ export const createPractiseAPI = (arrows) => { }); }; -export const getPractiseAPI = (id) => { - return request("GET", `/user/practice/get?id=${id}`); +export const getPractiseAPI = async (id) => { + const result = await request("GET", `/user/practice/get?id=${id}`); + const data = { ...(result.UserPracticeRound || {}) }; + if (data.arrows) data.arrows = JSON.parse(data.arrows); + return data; }; export const createRoomAPI = (gameType, teamSize) => { diff --git a/src/components/Container.vue b/src/components/Container.vue index 52cc24a..30c7327 100644 --- a/src/components/Container.vue +++ b/src/components/Container.vue @@ -48,5 +48,6 @@ onMounted(() => { flex-direction: column; align-items: center; justify-content: space-between; + overflow-x: hidden; } diff --git a/src/components/ScorePanel2.vue b/src/components/ScorePanel2.vue index 28ac59a..df3596a 100644 --- a/src/components/ScorePanel2.vue +++ b/src/components/ScorePanel2.vue @@ -20,7 +20,6 @@ const roundsName = ["第一轮", "第二轮", "第三轮", "第四轮"]; {{ roundsName[index] }} {{ @@ -47,8 +46,8 @@ const roundsName = ["第一轮", "第二轮", "第三轮", "第四轮"]; .container { width: 100vw; display: flex; - flex-wrap: wrap; - justify-content: flex-start; + flex-direction: column; + overflow-x: hidden; } .container > view { width: calc(100% - 30px); diff --git a/src/components/ScoreResult.vue b/src/components/ScoreResult.vue index cd75482..78b0555 100644 --- a/src/components/ScoreResult.vue +++ b/src/components/ScoreResult.vue @@ -2,7 +2,6 @@ import { ref } from "vue"; import IconButton from "@/components/IconButton.vue"; import SButton from "@/components/SButton.vue"; -import ImageShare from "@/components/ImageShare.vue"; import ScreenHint from "@/components/ScreenHint.vue"; import BowData from "@/components/BowData.vue"; const props = defineProps({ @@ -26,10 +25,13 @@ const props = defineProps({ type: Object, default: () => ({}), }, + dataType: { + type: Number, + default: 0, + }, }); const showPanel = ref(true); const showComment = ref(false); -const showShare = ref(false); const showBowData = ref(false); const closePanel = () => { showPanel.value = false; @@ -40,6 +42,11 @@ const closePanel = () => { setTimeout(() => { showPanel.value = true; }, 300); +const toSharePage = () => { + uni.navigateTo({ + url: `image-share?id=${props.result.id}&type=${props.dataType}`, + }); +};