Initial commit

This commit is contained in:
2026-04-24 08:53:56 +08:00
parent 267eba1eca
commit 5bc750360b
25 changed files with 77 additions and 6 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 626 KiB

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -158,7 +158,7 @@
:key="index"
>
<div class="bottom_I_I center">
<img :src="item.imageUrl|fullPath" alt width="100%" />
<img :src="getPrizeImg(item)" alt width="100%" />
</div>
<div class="textover-f">{{ item.shortName || item.name }}</div>
<div>
@@ -265,6 +265,17 @@ export default {
isOver: "加载中",
totalOrnamentNumber: 0,
totalOrnamentPrice: 0,
// 价格 → 本地奖品图片映射
priceImgMap: {
1.88: require("@/assets/bonus/jb1.png"), // 金币1
3.88: require("@/assets/bonus/jb2.png"), // 金币2
6.88: require("@/assets/bonus/jb3.png"), // 金币3
8.88: require("@/assets/bonus/jb4.png"), // 金币4
18.88: require("@/assets/bonus/hb1.png"), // 红包1
38.88: require("@/assets/bonus/hb2.png"), // 红包2
68.88: require("@/assets/bonus/hb3.png"), // 红包3
88.88: require("@/assets/bonus/hb4.png"), // 红包4
},
};
},
computed: {
@@ -285,6 +296,18 @@ export default {
},
methods: {
// 根据价格获取本地奖品图无映射时降级使用服务器imageUrl
getPrizeImg(item) {
const price = parseFloat(item.ornamentsPrice);
if (this.priceImgMap[price]) return this.priceImgMap[price];
if (item.imageUrl) {
const baseUrl = 'http://95.40.65.4:8081';
const url = item.imageUrl.trim();
if (/^(http|https):\/\//i.test(url)) return url;
return baseUrl + url;
}
return '';
},
playAudio() {
this.$store.commit("playAudio");
},

View File

@@ -271,7 +271,7 @@
:style="{ 'background-image': `url(${item.ornamentLevelImg})` }"
>
<div class="main_w_0_img">
<img :src="item.imgUrl|fullPath" alt style="width: 100%; height: 100%" />
<img :src="getPrizeImg(item)" alt style="width: 100%; height: 100%" />
</div>
</div>
<div class="textover-f">{{ item.ornamentName }}</div>
@@ -301,7 +301,7 @@
<!-- {{ item }} -->
<div class="main_w_1">
<div class="main_w_1_img">
<img :src="item.imageUrl|fullPath" alt width="100%" height="100%" />
<img :src="getPrizeImg({price: item.ornamentsPrice, imgUrl: item.imageUrl})" alt width="100%" height="100%" />
</div>
</div>
<div class="textover-f">{{ item.ornamentName }}</div>
@@ -407,6 +407,17 @@ export default {
obj: {},
playerList: [],
defaultAvatar: require("@/assets/images/default-header.png"),
// 价格 → 本地奖品图片映射
priceImgMap: {
1.88: require("@/assets/bonus/jb1.png"), // 金币1
3.88: require("@/assets/bonus/jb2.png"), // 金币2
6.88: require("@/assets/bonus/jb3.png"), // 金币3
8.88: require("@/assets/bonus/jb4.png"), // 金币4
18.88: require("@/assets/bonus/hb1.png"), // 红包1
38.88: require("@/assets/bonus/hb2.png"), // 红包2
68.88: require("@/assets/bonus/hb3.png"), // 红包3
88.88: require("@/assets/bonus/hb4.png"), // 红包4
},
awardResult: [],
awardResultIsover: "加载中",
playerListIsover: "加载中",
@@ -595,6 +606,18 @@ export default {
if (/^(http|https):\/\//i.test(trimmed)) return trimmed;
return baseUrl + trimmed;
},
// 根据价格获取本地奖品图无映射时降级使用服务器imgUrl
getPrizeImg(item) {
const price = parseFloat(item.price);
if (this.priceImgMap[price]) return this.priceImgMap[price];
if (item.imgUrl) {
const baseUrl = 'http://95.40.65.4:8081';
const url = item.imgUrl.trim();
if (/^(http|https):\/\//i.test(url)) return url;
return baseUrl + url;
}
return '';
},
},
};
</script>

View File

@@ -118,7 +118,7 @@
'background-size': '60px 60px',
}"
>
<img :src="weapon.imgUrl | fullPath" alt width="60px" />
<img :src="getPrizeImg(weapon)" alt width="60px" />
</div>
</div>
</div>
@@ -257,6 +257,17 @@ export default {
rolllist: [],
isloading: true,
daqweq: "roll",
// 价格 → 本地奖品图片映射
priceImgMap: {
1.88: require("@/assets/bonus/jb1.png"), // 金币1
3.88: require("@/assets/bonus/jb2.png"), // 金币2
6.88: require("@/assets/bonus/jb3.png"), // 金币3
8.88: require("@/assets/bonus/jb4.png"), // 金币4
18.88: require("@/assets/bonus/hb1.png"), // 红包1
38.88: require("@/assets/bonus/hb2.png"), // 红包2
68.88: require("@/assets/bonus/hb3.png"), // 红包3
88.88: require("@/assets/bonus/hb4.png"), // 红包4
},
};
},
mounted() {
@@ -346,6 +357,18 @@ export default {
}
});
},
// 根据价格获取本地奖品图无映射时降级使用服务器imgUrl
getPrizeImg(weapon) {
const price = parseFloat(weapon.price);
if (this.priceImgMap[price]) return this.priceImgMap[price];
if (weapon.imgUrl) {
const baseUrl = 'http://95.40.65.4:8081';
const url = weapon.imgUrl.trim();
if (/^(http|https):\/\//i.test(url)) return url;
return baseUrl + url;
}
return '';
},
},
};
</script>