Browse Source

日常开发

林旭祥 1 day ago
parent
commit
ae23335e7a

BIN
public/static/images/game/basketball.png


+ 1 - 0
src/router/index.ts

@@ -33,6 +33,7 @@ const router = createRouter({
         { path: '/game', component: () => import('@/views/game/index.vue') },
         { path: '/game/square', component: () => import('@/views/game/square.vue') },
         { path: '/game/fruit', component: () => import('@/views/game/fruit.vue') },
+        { path: '/game/basketball', component: () => import('@/views/game/basketball.vue') },
         { path: '/game/humanBody', component: () => import('@/views/game/humanBody.vue') },
         { path: '/score', component: () => import('@/views/score/index.vue') },
       ]

+ 23 - 0
src/views/game/basketball.vue

@@ -0,0 +1,23 @@
+<template>
+  <div>
+
+  </div>
+</template>
+
+<script setup name="Basketball" lang="ts">
+
+
+onBeforeMount(async () => {
+
+});
+
+onMounted(() => {
+
+});
+
+onBeforeUnmount(() => {
+
+});
+</script>
+
+<style lang="scss" scoped></style>

+ 1 - 1
src/views/game/humanBody.vue

@@ -4,7 +4,7 @@
   </div>
 </template>
 
-<script setup name="Fruit" lang="ts">
+<script setup name="HumanBody" lang="ts">
 import { initSpeech, speckText, playMusic, controlMusic, speckCancel, chineseNumber } from '@/utils/speech';
 import { useWebSocket } from '@/utils/bodyposeWs';
 const { proxy } = getCurrentInstance() as any;

+ 2 - 2
src/views/game/index.vue

@@ -22,7 +22,7 @@
   </div>
 </template>
 
-<script setup name="TrainIndex" lang="ts">
+<script setup name="GameIndex" lang="ts">
 import { initSpeech, speckText, playMusic, controlMusic, speckCancel, chineseNumber } from '@/utils/speech';
 import { Swiper, SwiperSlide } from 'swiper/vue';
 import { Grid } from 'swiper/modules';
@@ -70,7 +70,7 @@ onBeforeMount(async () => {
 onMounted(() => {
   //停止播报;
   speckCancel();
-  projectList.value = [{ name: "方块跳一跳", key: "square" }, { name: "水果忍者", key: "fruit" }, { name: "17点位", key: "humanBody" }]
+  projectList.value = [{ name: "方块跳一跳", key: "square" }, { name: "水果忍者", key: "fruit" }, { name: "投篮", key: "basketball" }, { name: "17点位", key: "humanBody" }]
 });
 
 onBeforeUnmount(() => {

+ 1 - 1
src/views/game/square.vue

@@ -129,7 +129,7 @@
   </div>
 </template>
 
-<script setup name="TrainTest" lang="ts">
+<script setup name="Square" lang="ts">
 import useAppStore from '@/store/modules/app';
 import { useWs } from '@/utils/trainWs';
 import { initSpeech, speckText, playMusic, controlMusic, speckCancel, chineseNumber } from '@/utils/speech';