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

@@ -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 () => {