This commit is contained in:
zpc 2025-05-18 21:50:23 +08:00
parent 6fa0681905
commit 7fe88a2b4e
4 changed files with 20 additions and 45 deletions

View File

@ -41,7 +41,7 @@ const testing = {
// 根据环境变量选择对应配置
let currentEnv = production;//production;//testing;//production_wz;
let currentEnv = testing;//production;//testing;//production_wz;
// 判断当前环境
// #ifdef H5

View File

@ -1,5 +1,5 @@
<template>
<view class="content-container" v-if="isVisible && isInitialized">
<view class="content-container detail-lucky" v-if="isVisible && isInitialized">
<view class="slot-container">
<view class="slot-icon">
<image src="https://image.zfunbox.cn/static/image/lucky/icon.png" mode="widthFix"
@ -13,7 +13,7 @@
</view>
<view style="color: #484848;font-size: 19rpx;text-align: center;padding-top: 20rpx;">
动画结果因设备差异可能会显示异常获得赏品以恭喜获得结果为准</view>
<view class="skip-animation" @click="skipAnimation" :style="skipButtonStyle">跳过动画</view>
<view class="skip-animation" @click="skipAnimation" :style="[skipButtonStyle()]">跳过动画</view>
</view>
<DetailGrandPrize ref="detailGrandPrize" @end="onLuckyEnd1" />
</view>
@ -98,6 +98,8 @@ export default {
10: "800rpx" // 10使5
};
// 使currentMode使internalMode
console.log(modeMap[this.currentMode],"modeMap[this.currentMode]");
return modeMap[this.currentMode] || "480rpx";
},
//
@ -113,11 +115,15 @@ export default {
},
//
skipButtonStyle() {
return {
return ()=>{
return {
opacity: this.skipButtonOpacity,
transition: 'opacity 0.5s ease'
};
};
}
},
methods: {
onLuckyEnd1() {
@ -799,7 +805,7 @@ export default {
this.batchIndices = resultIndices;
//
this.skipButtonOpacity = 0;
// this.skipButtonOpacity = 0;
//
this.show();
@ -1041,7 +1047,7 @@ export default {
left: 0;
z-index: 999;
}
.detail-lucky{
//
.slot-container {
width: 100%;
@ -1112,4 +1118,6 @@ export default {
.skip-animation:active {
opacity: 0.7;
}
}
</style>

View File

@ -2373,37 +2373,4 @@ export default {
line-height: 32rpx;
}
.slot-pop {
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-image: url($imgurl + 'common/slot_bg.webp');
background-size: cover;
background-position: center;
}
.slot-view {
background-image: url($imgurl + 'common/slot1.png');
background-size: cover;
background-position: center;
width: 100%;
height: 427.78rpx;
}
.item-lottry {
height: 152.78rpx;
width: 152.78rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 30rpx;
border-radius: 16rpx;
color: black;
box-sizing: border-box;
background-color: rgba(255, 255, 255, 0.8);
}
</style>

View File

@ -58,14 +58,14 @@ export default {
},
methods: {
startGrandPrize() {
this.$refs.detailGrandPrize.init();
this.$refs.detailGrandPrize.init([],5);
this.$refs.detailGrandPrize.show();
},
//
initLuckyMachine() {
try {
// 使
this.$refs.detailLucky.init([], 1);
this.$refs.detailLucky.init([], 10);
console.log("老虎机初始化完成");
} catch (error) {
console.error("初始化老虎机时出错:", error);
@ -174,10 +174,10 @@ export default {
//
console.log("所有中奖奖品:", data?.allPrizes);
//
if (data.skipped) {
console.log("用户跳过了动画");
}
// //
// if (data.skipped) {
// console.log("");
// }
this.$refs.detailLucky.hide();