From a9f4f2262299b4e47928d8c986e161e40b636b6b Mon Sep 17 00:00:00 2001 From: kron Date: Sat, 21 Jun 2025 12:59:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=B8=8D=E5=90=8C=E7=BB=83?= =?UTF-8?q?=E4=B9=A0=E7=94=9F=E6=88=90=E4=B8=8D=E5=90=8C=E6=88=AA=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis.js | 7 +- src/components/Container.vue | 1 + src/components/ScorePanel2.vue | 5 +- src/components/ScoreResult.vue | 14 +++- src/pages/first-try.vue | 1 + src/pages/image-share.vue | 117 +++++++++++++++++------------- src/pages/my-growth.vue | 2 +- src/pages/practise-one.vue | 1 + src/pages/practise-two.vue | 1 + src/static/practise-one-title.png | Bin 0 -> 9154 bytes src/static/practise-two-title.png | Bin 0 -> 8859 bytes src/store.js | 1 + src/util.js | 90 ++++++++++++++++++++++- 13 files changed, 177 insertions(+), 63 deletions(-) create mode 100644 src/static/practise-one-title.png create mode 100644 src/static/practise-two-title.png 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}`, + }); +};