12121
This commit is contained in:
@@ -1 +1,70 @@
|
||||
<template></template>
|
||||
<template>
|
||||
<div class="content" style="font-size: 16px;">
|
||||
{{ data.busTips }}
|
||||
</div>
|
||||
<div class="content" v-if="data.busType == 'ToMap'">
|
||||
<div class="common" v-if="needs.length > 0">
|
||||
传送要求:<br>
|
||||
<GamePropVerify :data="verifyData.needs"></GamePropVerify>
|
||||
</div>
|
||||
<div class="common" v-if="verifyData.result">
|
||||
<div class="item" v-for="(item, index) in content" :key="index">
|
||||
➢<Abutton @click="MapTo(index)">{{ item.name }}</Abutton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content" v-if="data.busType == 'Box'">
|
||||
222
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
definePageMeta({
|
||||
layout: layout.default,
|
||||
middleware: 'page-loading'
|
||||
})
|
||||
const data = ref<any>({});
|
||||
const verifyData = ref<any>({});
|
||||
const needs = ref<Array<any>>([]);
|
||||
const content = ref<Array<any>>([]);
|
||||
let busId = PageExtend.QueryString("id");
|
||||
onMounted(async () => {
|
||||
try {
|
||||
await BindData();
|
||||
}
|
||||
finally {
|
||||
PageLoading.Close();
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
const BindData = async (): Promise<void> => {
|
||||
let result = await MapBusService.GetBusiness(Number(busId));
|
||||
if (result.code == 0) {
|
||||
data.value = result.data.data;
|
||||
verifyData.value = result.data.result;
|
||||
needs.value = verifyData.value.needs;
|
||||
content.value = JSON.parse(data.value.busContent);
|
||||
console.log(result.data);
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialogEvent("提示", result.msg, () => {
|
||||
PageExtend.Redirect("/map");
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const MapTo = async (index: number) => {
|
||||
MessageExtend.LoadingToast("传送中...");
|
||||
let result = await MapBusService.MapBusTo(Number(busId), index);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
PageExtend.RedirectTo("/map");
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowToast(result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -171,7 +171,7 @@ 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;
|
||||
business.value = result.data.business;
|
||||
mapRes.value = result.data.mapRes;
|
||||
broadcast.value = result.data.broadcast;
|
||||
MapVent(result.data.mapInfo.near);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="content">
|
||||
<Abar href="/user/maxname">更换称号</Abar><br>
|
||||
ID:{{ userData.userNo }} [<Abar href="/privilege/liang">升靓号</Abar>]<br>
|
||||
ID:{{ userData.userNo }} <br>
|
||||
昵称:<Abar href="/user/nick">{{ userData.nick }}</Abar><br>
|
||||
性别:<Abar href="/user/sex">{{ userData.sex }}</Abar><br>
|
||||
<Abar href="/privilege/">特权</Abar>:<br>
|
||||
|
||||
17
Web/src/services/map/MapBusService.ts
Normal file
17
Web/src/services/map/MapBusService.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
export class MapBusService {
|
||||
/**
|
||||
* 获取业务信息
|
||||
* GET /Map/MapBus/GetBusiness
|
||||
*/
|
||||
static async GetBusiness(id: number) {
|
||||
return await ApiService.Request("get", "/Map/MapBus/GetBusiness", { id });
|
||||
}
|
||||
|
||||
/**
|
||||
* 传送
|
||||
* GET /Map/MapBus/MapBusTo
|
||||
*/
|
||||
static async MapBusTo(id: number, num: number) {
|
||||
return await ApiService.Request("get", "/Map/MapBus/MapBusTo", { id, num });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user