This commit is contained in:
Putoo
2026-05-23 18:36:37 +08:00
parent 05e340801f
commit dbace8a8b2
27 changed files with 729 additions and 52 deletions

View File

@@ -14,16 +14,16 @@
</div>
<div class="content">
您看到:
<a class="" href="/Map/Index/MapUser/16_27?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">1111
</a>
<Abar href="/map/user" v-if="mapUser.length>0">
<span v-for="item in mapUser">{{item.nick}} &nbsp;</span>
</Abar>
</div>
<div class="content">
<div class="item" v-for="item in npcData">
<Abar href="">{{ item.npcName }}{{ item.tips }}</Abar>
</div>
</div>
<div class="content">
</div>
<div class="content">
请选择出口:<br />
<span v-if="mapDong.mapId != ''">东:<Abutton @click="BindData(mapDong.mapId)">{{ mapDong.name }}</Abutton></span>
@@ -34,9 +34,7 @@
</div>
<div class="content">
<Abutton @click="ShowCityProp">城内地图</Abutton>.<a class=""
href="/Business/Help/Index?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">帮助</a>.<a class=""
href="/Privilege/Purdiam/MapTo?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">传送</a><br />
<Abutton @click="ShowCityProp">城内地图</Abutton>.<Abar href="/">寻路</Abar><br />
</div>
<div class="content">
{{ mapInfo.tips }}
@@ -67,6 +65,7 @@ const cityInfo = ref<any>({});
const npcData = ref<Array<any>>([]);
const chatData = ref<Array<any>>([]);
const cityShow = ref<Array<any>>([]);
const mapUser = ref<Array<any>>([]);
// 城内地图显示
const showCity = ref(false)
@@ -88,6 +87,7 @@ const BindData = async (map: string): Promise<void> => {
npcData.value = result.data.npcData;
chatData.value = result.data.chatData;
cityShow.value = result.data.cityShow;
mapUser.value = result.data.nearUser;
MapVent(result.data.mapInfo.near);
onMap.value = mapInfo.value.mapId;
console.log(result.data);

View File

@@ -0,0 +1,61 @@
<template>
<div class="content">
附近的人.<Abutton @click="Refresh">刷新</Abutton>
</div>
<div class="content">
<div class="item" v-for="(item, index) in data" :key="index">
{{ index + 1 }}.<GameUser :data="item" :show-icon="0"></GameUser>
</div>
<span v-if="data.length == 0">暂无玩家.</span>
</div>
<div class="content">
<Pagination :currentPage="currentPage" :limit="10" :total="total" @pageChange="handlePageChange" />
</div>
</template>
<script setup lang="ts">
definePageMeta({
layout: layout.default,
middleware: 'page-loading'
})
const currentPage = ref<number>(1);
const total = ref<number>(0);
const data = ref<Array<any>>([]);
onMounted(async () => {
try {
await BindData();
}
finally {
PageLoading.Close();
}
})
const BindData = async (): Promise<void> => {
let result = await MapService.GetMapUser(currentPage.value);
if (result.code == 0) {
data.value = result.data.data;
total.value = result.data.total;
}
else {
MessageExtend.ShowDialog("提示", result.msg);
}
};
/**刷新 */
const Refresh = async (): Promise<void> => {
MessageExtend.LoadingToast("刷新中...");
currentPage.value = 1;
await BindData();
MessageExtend.LoadingClose();
PageExtend.ScrollToTop();
}
/**翻页 */
const handlePageChange = async (page: number): Promise<void> => {
currentPage.value = page;
await BindData();
};
</script>