请选择出口:
@@ -130,6 +136,7 @@ const monster = ref
>([]);
const messageCount = ref(0);
const broadcast = ref>([]);
const gameTips = ref('');
+const mapGoods = ref>([]);
// 城内地图显示
const showCity = ref(false);
@@ -163,7 +170,8 @@ const BindData = async (map: string): Promise => {
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");
+ }
+
+}
+
diff --git a/Web/src/pages/prop/monster.vue b/Web/src/pages/prop/monster.vue
index 806b15a..450b3ce 100644
--- a/Web/src/pages/prop/monster.vue
+++ b/Web/src/pages/prop/monster.vue
@@ -68,7 +68,7 @@ const BindData = async (): Promise => {
const awardTipsStr = (data: any) => {
let result = '';
if (data.type == 'Default') {
- result += "怪物掉落几率:" + (100 - data.award.empty) + "%
"
+ result += "怪物掉落几率:" + data.award.empty + "%
"
let awData: Array = data.award.data;
awData.forEach(it => {
result += "▸" + it.name + "(" + (data.award.code == 'Chance' ? "概率:" : "权重:") + it.chance + (data.award.code == 'Chance' ? "%" : "") + ")
";
diff --git a/Web/src/services/map/MapService.ts b/Web/src/services/map/MapService.ts
index 7c0e660..359d090 100644
--- a/Web/src/services/map/MapService.ts
+++ b/Web/src/services/map/MapService.ts
@@ -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 });
+ }
}
\ No newline at end of file