update:新增个人训练重连机制,修复海报
This commit is contained in:
@@ -13,7 +13,7 @@ import PointSwitcher from "@/components/PointSwitcher.vue";
|
||||
import TargetCanvas from "@/components/TargetCanvas.vue";
|
||||
|
||||
import { MESSAGETYPES, MESSAGETYPESV2 } from "@/constants";
|
||||
import { simulShootAPI } from "@/apis";
|
||||
import { simulShootAPI, laserAimAPI, laserCloseAPI } from "@/apis";
|
||||
import useStore from "@/store";
|
||||
import { storeToRefs } from "pinia";
|
||||
const store = useStore();
|
||||
@@ -372,6 +372,14 @@ const simulShoot2 = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
const openAim = async () => {
|
||||
await laserAimAPI();
|
||||
};
|
||||
|
||||
const closeAim = async () => {
|
||||
await laserCloseAPI();
|
||||
};
|
||||
|
||||
const env = computed(() => {
|
||||
const accountInfo = uni.getAccountInfoSync();
|
||||
return accountInfo.miniProgram.envVersion;
|
||||
@@ -557,6 +565,8 @@ onBeforeUnmount(() => {
|
||||
<view class="simul" v-if="env !== 'release'">
|
||||
<button @click="simulShoot">模拟</button>
|
||||
<button @click="simulShoot2">射箭</button>
|
||||
<button @click="openAim">开瞄</button>
|
||||
<button @click="closeAim">关瞄</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user