This commit is contained in:
Putoo
2026-06-04 18:25:31 +08:00
parent 8b8eb732ae
commit 1a1f12abf5
20 changed files with 772 additions and 18 deletions

View File

@@ -0,0 +1 @@
<template></template>

View File

@@ -23,6 +23,17 @@
<Abar :href='"/map/npc?npc=" + item.npcId'>{{ item.npcName }}{{ item.tips }}</Abar>
</div>
</div>
<div class="content" v-if="business.length > 0">
<div class="item" v-for="item in business">
<Abar :href='"/map/business?id=" + item.busId'>{{ item.busName }}</Abar>
</div>
</div>
<div class="content" v-if="mapRes.length > 0">
特产:<br>
<div class="item" v-for="item in mapRes">
<Abutton>{{item.resName}}</Abutton>
</div>
</div>
<div class="content">
请选择出口:<br />
@@ -91,6 +102,8 @@ const npcData = ref<Array<any>>([]);
const chatData = ref<Array<any>>([]);
const cityShow = ref<Array<any>>([]);
const mapUser = ref<Array<any>>([]);
const business = ref<Array<any>>([]);
const mapRes = ref<Array<any>>([]);
const messageCount = ref(0);
// 城内地图显示
const showCity = ref(false);
@@ -115,6 +128,8 @@ const BindData = async (map: string): Promise<void> => {
cityShow.value = result.data.cityShow;
mapUser.value = result.data.nearUser;
messageCount.value = result.data.noReadMsg;
business.value = result.data.business;
mapRes.value = result.data.mapRes;
MapVent(result.data.mapInfo.near);
onMap.value = mapInfo.value.mapId;
console.log(result.data);

View File

@@ -14,6 +14,11 @@
</div>
<div class="content">
您看到<br>
<div class="common">
<span v-for="item in business">
<Abar :href='"/map/business?id="+item.busId'>{{ item.busName }}</Abar>
</span>
</div>
</div>
</template>
<script setup lang="ts">
@@ -28,6 +33,7 @@ const position = ref(0);
const isShip = ref(0);
const safety = ref(0);
const runState = ref(0);
const business = ref<Array<any>>([]);
onMounted(async () => {
try {
await BindData();
@@ -47,6 +53,7 @@ const BindData = async (): Promise<void> => {
position.value = result.data.position;
isShip.value = result.data.isShip;
safety.value = result.data.safety;
business.value = result.data.business;
if (runState.value == 1) {
setTimeout(async () => {
await Runing();
@@ -64,20 +71,26 @@ const BindData = async (): Promise<void> => {
}
};
let runLock = false;
const Runing = async () => {
MessageExtend.LoadingToast("航行中...");
if (runLock) {
return;
}
runLock = true;
let result = await MapService.UserMapRuning();
MessageExtend.LoadingClose();
if (result.code == 0) {
if (result.msg != '') {
MessageExtend.ShowToast(result.msg);
}
await BindData();
}
else if (result.code == 100) {
else if (result.code == 100) {
PageExtend.RedirectTo("/map");
}
else {
MessageExtend.ShowDialog("提示", result.msg);
}
runLock = false;
}
const StopRun = async () => {