HaniBlindBox/honey_box/pages/other/web-detail-lucky.vue
2026-01-01 21:01:55 +08:00

163 lines
4.1 KiB
Vue

<template>
<page-container title="抽奖动画" :showBack="false">
<DetailLuckyWeb ref="lottery" @end="onLuckyEnd" @lucky-stop="luckyStop"></DetailLuckyWeb>
<button @click="gotoPage(10)">抽10次</button>
<button @click="gotoPage(5)">抽5次</button>
<button @click="gotoPage(3)">抽3次</button>
<button @click="gotoPage(1)">抽1次</button>
</page-container>
</template>
<script>
import PageContainer from '@/components/page-container/page-container.vue'
import DetailLuckyWeb from '@/components/detail-lucky/detail-lucky-web.vue';
export default {
components: {
PageContainer,
DetailLuckyWeb
},
data() {
return {}
},
onLoad() {
},
methods: {
onLuckyEnd(e) {
console.log('抽奖结束');
},
luckyStop() {
this.$c.msg("抽奖而技术")
},
gotoPage(count) {
let m = [];
for (let index = 0; index < count; index++) {
m.push(index);
}
this.$refs.lottery.init(this.getDefaultPrizes(), this, m);
// this.$customRouter.navigateTo("/pages/other/web-detail-lucky-1");
},
Init() {
// this.$refs.lottery.init(this.getDefaultPrizes());
// this.$customRouter.navigateTo("/pages/other/web-detail-lucky-1");
let key = "prizes-lucky" + Date.now();
uni.setStorageSync(key, "prizes-lucky")
uni.preloadPage({
url: "/pages/other/web-detail-lucky-1?key=" + key
});
},
LoadImage() { },
SetSize() {
},
// 获取默认奖品列表
getDefaultPrizes() {
return [{
id: 1128,
title: "兹琪露娜提亚斯",
imgurl: "https://image.zfunbox.cn/topic/20250515/2986e27e673ef675e02771cdebd9b822.jpg",
price: "350.00",
real_pro: "0.02000",
goods_type: 1,
doubling: 1,
is_lingzhu: 0,
},
{
id: 1129,
title: "月岗恋钟",
imgurl: "https://image.zfunbox.cn/topic/20250515/2c5ed2097716db6bef01da718bc3c091.jpg",
price: "132.00",
real_pro: "0.02000",
goods_type: 1,
doubling: 3,
is_lingzhu: 0,
},
{
id: 1130,
title: "BANDAI万代拼装模型 1/100 MG 机动战士高达 倒A 逆A-15岁以上",
imgurl: "https://image.zfunbox.cn/topic/20250515/e35da49b4976f156f2f98dec002274a5.png",
price: "305.00",
real_pro: "0.03000",
goods_type: 1,
doubling: 1,
is_lingzhu: 0,
},
{
id: 1131,
title: "BANDAI 万代拼装模型 MG 主天使-15岁以上",
imgurl: "https://image.zfunbox.cn/topic/20250515/77302c6f1ea9ea6a8516cc1208174aee.png",
price: "289.00",
real_pro: "0.03000",
goods_type: 1,
doubling: 1,
is_lingzhu: 0,
},
{
id: 1132,
title: "BANDAI万代 HG00 09 1/144 座天使高达一型-15岁以上",
imgurl: "https://image.zfunbox.cn/topic/20250515/55e816c93b5e4103a30682c586816b11.jpg",
price: "114.00",
real_pro: "0.50000",
goods_type: 1,
doubling: 3,
is_lingzhu: 0,
},
{
id: 1133,
title: "BANDAI万代拼装模型 HGUC 130 机动战士高达 杰斯塔-15岁以上",
imgurl: "https://image.zfunbox.cn/topic/20250515/aeb6bfb8b4aa8a29796b242e4f5d56d9.png",
price: "113.00",
real_pro: "1.50000",
goods_type: 1,
doubling: 1,
is_lingzhu: 0,
},
{
id: 1134,
title: "BANDAI万代拼装模型HG26 1/144 凯列班高达 异灵高达-15岁以上",
imgurl: "https://image.zfunbox.cn/topic/20250515/329e3a7e21772a63cea03d31f948345d.png",
price: "112.00",
real_pro: "1.00000",
goods_type: 1,
doubling: 2,
is_lingzhu: 0,
},
{
id: 1135,
title: "梦幻",
imgurl: "https://image.zfunbox.cn/topic/20250515/d2c7e48515d393084000595074209042.jpg",
price: "41.00",
real_pro: "2.50000",
goods_type: 1,
doubling: 2,
is_lingzhu: 0,
},
{
id: 1136,
title: "谜拟丘",
imgurl: "https://image.zfunbox.cn/topic/20250515/6031827bc455cbf86ff778d74ddffbd3.jpg",
price: "38.00",
real_pro: "1.50000",
goods_type: 1,
doubling: 1,
is_lingzhu: 0,
},
{
id: 1137,
title: "小提琴模型1个",
imgurl: "https://image.zfunbox.cn/topic/20250515/22846dea5a933ab314998afc51abb7bb.jpg",
price: "13.80",
real_pro: "92.90000",
goods_type: 1,
doubling: 1,
is_lingzhu: 0,
},
];
}
}
}
</script>
<style scoped></style>