111
This commit is contained in:
parent
6fa0681905
commit
7fe88a2b4e
|
|
@ -41,7 +41,7 @@ const testing = {
|
|||
|
||||
|
||||
// 根据环境变量选择对应配置
|
||||
let currentEnv = production;//production;//testing;//production_wz;
|
||||
let currentEnv = testing;//production;//testing;//production_wz;
|
||||
|
||||
// 判断当前环境
|
||||
// #ifdef H5
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user