This commit is contained in:
Putoo
2026-07-16 17:52:33 +08:00
parent 2cd2ed02f8
commit 00c2758df2
43 changed files with 897 additions and 72 deletions

View File

@@ -12,6 +12,11 @@
<Abar :href="item.url">{{ item.name }}</Abar>
</div>
</div>
<div class="content" v-if="data.code == 'Event'">
<div class="item" v-for="item in data.bus">
<Abutton @click="HandleEvent(item)">{{ item.name }}</Abutton>
</div>
</div>
<div class="content" v-if="data.code == 'Task'">
<div class="common" v-if="task.length > 0">
当前任务:<br>
@@ -21,7 +26,7 @@
<Abar :href='"/task/info?task=" + item.itemId'>[{{ item.code }}]{{ item.name }}</Abar>
</div>
</div>
<div>
<div>
<div class="item" v-for="item in data.bus">
<Abar :href="item.url">{{ item.name }}</Abar>
</div>
@@ -61,4 +66,20 @@ const BindData = async (): Promise<void> => {
}
};
const HandleEvent = async (item: any) => {
let npc = PageExtend.QueryString("npc");
MessageExtend.LoadingToast("处理中...");
let result = await MapService.HandleNpcEvent(Number(npc), item.code, item.parms)
MessageExtend.LoadingClose();
if (result.code == 0) {
MessageExtend.Notify(result.msg, "success");
if (result.data == 0) {
PageExtend.RedirectTo("/map");
}
}
else {
MessageExtend.ShowDialog("提示", result.msg);
}
}
</script>