111
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<GameBroadcast :data="broadcast"></GameBroadcast>
|
||||
<GameBroadcast :data="broadcast"></GameBroadcast>
|
||||
<div class="content">
|
||||
{{ cityInfo.cityName }}·{{ mapInfo.mapName }}
|
||||
{{ cityInfo.cityName }}·{{ mapInfo.mapName }}({{ mapInfo.x }},{{ mapInfo.y }})
|
||||
<Abutton @click="Refresh">刷新</Abutton>
|
||||
<Abar href="/task/">任务</Abar>
|
||||
<Abar href="/user/message/">消息{{ messageCount > 0 ? "(" + messageCount + ")" : "" }}</Abar>
|
||||
@@ -16,6 +16,11 @@
|
||||
<span v-for="item in mapUser">{{ item.nick }} </span>
|
||||
</Abar>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span class="item" v-for="item in monster">
|
||||
<Abutton>{{ item.name }}</Abutton>
|
||||
</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="item" v-for="item in npcData">
|
||||
<Abar :href='"/map/npc?npc=" + item.npcId'>{{ item.npcName }}{{ item.tips }}</Abar>
|
||||
@@ -116,6 +121,7 @@ const cityShow = ref<Array<any>>([]);
|
||||
const mapUser = ref<Array<any>>([]);
|
||||
const business = ref<Array<any>>([]);
|
||||
const mapRes = ref<Array<any>>([]);
|
||||
const monster = ref<Array<any>>([]);
|
||||
const messageCount = ref(0);
|
||||
const broadcast = ref<Array<any>>([]);
|
||||
// 城内地图显示
|
||||
@@ -137,6 +143,7 @@ const BindData = async (map: string): Promise<void> => {
|
||||
mapInfo.value = result.data.mapInfo;
|
||||
cityInfo.value = result.data.cityInfo;
|
||||
npcData.value = result.data.npcData;
|
||||
monster.value = result.data.monster;
|
||||
chatData.value = result.data.chatData;
|
||||
cityShow.value = result.data.cityShow;
|
||||
mapUser.value = result.data.nearUser;
|
||||
@@ -146,6 +153,7 @@ const BindData = async (map: string): Promise<void> => {
|
||||
broadcast.value = result.data.broadcast;
|
||||
MapVent(result.data.mapInfo.near);
|
||||
onMap.value = mapInfo.value.mapId;
|
||||
console.log(result)
|
||||
}
|
||||
else if (result.code == 103) {
|
||||
PageExtend.Redirect("/map/runing");
|
||||
|
||||
67
Web/src/pages/user/bag/drug.vue
Normal file
67
Web/src/pages/user/bag/drug.vue
Normal file
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<div class="module-title">
|
||||
我的药品栏
|
||||
</div>
|
||||
<div class="module-content">
|
||||
<div class="item" v-for="(item, index) in data" :key="index">
|
||||
{{ index + 1 }}. <Abar :href='"/prop/goods?id=" + item.goodsId'>{{ item.name }}</Abar>({{ item.count }})
|
||||
[<Abutton @click="RemoveDrug(item.id)">移除</Abutton> ]
|
||||
</div>
|
||||
<span v-if="data.length == 0">
|
||||
暂无药品.
|
||||
</span>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="module-content" style="font-size: 15px;">
|
||||
说明:<br>
|
||||
1.药品栏用于备战,在战斗中可以快速使用物品。<br>
|
||||
2.当开启自动使用药品时,按照药品栏的顺序来进行使用物品。<br>
|
||||
3.药品栏为储存战斗临时药品的空间,取回时添加到背包。<br>
|
||||
4.药品栏每个栏的空间上限个数为999个。<br>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
layout: layout.default,
|
||||
middleware: middleware.loading
|
||||
})
|
||||
|
||||
const data = ref<Array<any>>([]);
|
||||
onMounted(async () => {
|
||||
try {
|
||||
await BindData();
|
||||
}
|
||||
finally {
|
||||
PageLoading.Close();
|
||||
}
|
||||
})
|
||||
|
||||
const BindData = async (): Promise<void> => {
|
||||
let result = await UserService.GetUserDrugColumn();
|
||||
if (result.code == 0) {
|
||||
data.value = result.data;
|
||||
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("药品栏", result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
const RemoveDrug = async (id: string): Promise<void> => {
|
||||
MessageExtend.ShowConfirmDialogAsyc("药品栏操作", `您确定要移除该药品吗?`, async () => {
|
||||
let result = await UserService.RemoverUserDrug(id);
|
||||
if (result.code == 0) {
|
||||
await BindData();
|
||||
MessageExtend.Notify("移除成功", "success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.Notify(result.msg, "danger");
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user