222
This commit is contained in:
@@ -5,16 +5,16 @@
|
||||
<div class="content">
|
||||
{{ cityInfo.cityName }}·{{ mapInfo.mapName }}
|
||||
<Abutton @click="Refresh">刷新</Abutton>
|
||||
<Abar href="">任务</Abar>
|
||||
<Abar href="">消息</Abar>
|
||||
<Abar href="/task/">任务</Abar>
|
||||
<Abar href="/message/">消息</Abar>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<GameChat :data="chatData" :show-time="0"></GameChat>
|
||||
<GameChat :data="chatData" :show-time="0"></GameChat>
|
||||
</div>
|
||||
<div class="content">
|
||||
您看到:
|
||||
<a class="" href="/Map/Index/MapUser/16_27?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">
|
||||
<a class="" href="/Map/Index/MapUser/16_27?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">1111
|
||||
</a>
|
||||
</div>
|
||||
<div class="content">
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
【<a class="" href="/Map/Index/MapCity/16_27?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">城内地图</a>】.<a class=""
|
||||
【<Abutton @click="ShowCityProp">城内地图</Abutton>】.<a class=""
|
||||
href="/Business/Help/Index?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">帮助</a>.<a class=""
|
||||
href="/Privilege/Purdiam/MapTo?sid=W6Wg8iH9gY7wIBNSEdtFcQ3KbI5YiKDo">传送</a><br />
|
||||
</div>
|
||||
@@ -45,16 +45,30 @@
|
||||
<MapMenu></MapMenu>
|
||||
</div>
|
||||
<Footer></Footer>
|
||||
<!-- 城内地图 -->
|
||||
<GamePopup v-model:show="showCity" title="【城市地图】">
|
||||
<!-- 自定义内容 -->
|
||||
<div class="">
|
||||
<span v-for="(item, index) in cityShow" :key="index">
|
||||
<Abutton @click="ChangeMap(item.mapId)">{{ item.mapName }}</Abutton>
|
||||
<br v-if="(index + 1) % 4 == 0">
|
||||
</span>
|
||||
</div>
|
||||
</GamePopup>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
layout: layout.empty,
|
||||
middleware: 'page-loading'
|
||||
})
|
||||
const onMap = ref('');
|
||||
const mapInfo = ref<any>({});
|
||||
const cityInfo = ref<any>({});
|
||||
const npcData = ref<Array<any>>([]);
|
||||
const chatData = ref<Array<any>>([]);
|
||||
const cityShow = ref<Array<any>>([]);
|
||||
// 城内地图显示
|
||||
const showCity = ref(false)
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
@@ -73,7 +87,9 @@ const BindData = async (map: string): Promise<void> => {
|
||||
cityInfo.value = result.data.cityInfo;
|
||||
npcData.value = result.data.npcData;
|
||||
chatData.value = result.data.chatData;
|
||||
cityShow.value = result.data.cityShow;
|
||||
MapVent(result.data.mapInfo.near);
|
||||
onMap.value = mapInfo.value.mapId;
|
||||
console.log(result.data);
|
||||
|
||||
}
|
||||
@@ -87,7 +103,6 @@ const Refresh = async (): Promise<void> => {
|
||||
MessageExtend.LoadingToast("刷新中...");
|
||||
await BindData("");
|
||||
MessageExtend.LoadingClose();
|
||||
MessageExtend.Notify("刷新成功!", "success");
|
||||
|
||||
}
|
||||
|
||||
@@ -103,4 +118,18 @@ const MapVent = (near: Array<any>): void => {
|
||||
mapBei.value = near.find(item => item.positition == '北');
|
||||
}
|
||||
|
||||
/**城市地图切换 */
|
||||
const ShowCityProp = () => {
|
||||
showCity.value = true;
|
||||
}
|
||||
let changLock = true;//切换锁
|
||||
const ChangeMap = async (mapId: string): Promise<void> => {
|
||||
if (mapId != onMap.value && changLock) {
|
||||
changLock = false;
|
||||
await BindData(mapId);
|
||||
changLock = true;
|
||||
}
|
||||
showCity.value = false;
|
||||
};
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user