This commit is contained in:
Putoo
2026-07-06 14:44:15 +08:00
parent a1dbce8a96
commit 63d56b245e
21 changed files with 483 additions and 36 deletions

View File

@@ -100,7 +100,7 @@ const BindData = async (data: string): Promise<void> => {
coolTime.value = result.data.cool;
dataLock = false;
myHarm.value = result.data.myHarm;
otHarm.value = result.data.otHarm;
otHarm.value = result.data.otHarm;
}
else if (result.code == 100) {
PageExtend.RedirectTo("/fight/result?f=" + fightId);

View File

@@ -39,6 +39,12 @@
<Abutton @click="showResProp(item)">{{ item.resName }}({{ item.lev }})</Abutton>
</div>
</div>
<div class="content" v-if="mapGoods.length > 0">
物品:<br>
<div class="item" v-for="item in mapGoods">
<Abutton @click="GetMapGoods(item.mgId)">{{ item.name }}×{{ item.count }}</Abutton>
</div>
</div>
<div class="content">
请选择出口:<br />
@@ -130,6 +136,7 @@ const monster = ref<Array<any>>([]);
const messageCount = ref(0);
const broadcast = ref<Array<any>>([]);
const gameTips = ref('');
const mapGoods = ref<Array<any>>([]);
// 城内地图显示
const showCity = ref(false);
@@ -163,7 +170,8 @@ const BindData = async (map: string): Promise<void> => {
MapVent(result.data.mapInfo.near);
onMap.value = mapInfo.value.mapId;
gameTips.value = result.data.gameTips;
console.log(result)
mapGoods.value = result.data.mapGoods;
// console.log(result)
}
else if (result.code == 103) {
PageExtend.Redirect("/map/runing");
@@ -322,4 +330,19 @@ const AddFight = async (type: number, monsterId: string, sign: string) => {
}
}
/**拾取物品 */
const GetMapGoods = async (mgId: string) => {
MessageExtend.LoadingToast("拾取中...");
let result = await MapService.GetMapGoods(mgId);
MessageExtend.LoadingClose();
if (result.code == 0) {
await BindData("");
MessageExtend.Notify(result.msg,"success");
}
else {
MessageExtend.Notify(result.msg,"danger");
}
}
</script>

View File

@@ -68,7 +68,7 @@ const BindData = async (): Promise<void> => {
const awardTipsStr = (data: any) => {
let result = '';
if (data.type == 'Default') {
result += "<strong style='font-size: 14px;'>怪物掉落几率:" + (100 - data.award.empty) + "%</strong><br>"
result += "<strong style='font-size: 14px;'>怪物掉落几率:" + data.award.empty + "%</strong><br>"
let awData: Array<any> = data.award.data;
awData.forEach(it => {
result += "▸" + it.name + "(" + (data.award.code == 'Chance' ? "概率:" : "权重:") + it.chance + (data.award.code == 'Chance' ? "%" : "") + ")<br>";

View File

@@ -94,4 +94,12 @@ export class MapService {
static async CollectMapRes(resId: string) {
return await ApiService.Request("get", "/Map/Map/CollectMapRes", { resId });
}
/**
* 拾取地图物品
* GET /Map/Map/GetMapGoods
*/
static async GetMapGoods(mgId: string) {
return await ApiService.Request("get", "/Map/Map/GetMapGoods", { mgId });
}
}