update:砍价新增骰子(需测试)
@ -302,6 +302,59 @@
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mask" v-if="showMask && !showImg">
|
||||
|
||||
<text class="mask-close" @tap="maskClose">✕</text>
|
||||
<text class="mask-text-wrap sign">恭喜你!</text>
|
||||
<text class="mask-text-wrap">获得一次摇骰子机会</text>
|
||||
<view class='yaotouzi'>
|
||||
|
||||
<image
|
||||
class="mask-img"
|
||||
src="/static/images/cutPrice/zero.png"
|
||||
mode="widthFix"
|
||||
v-if="tossResult==0"
|
||||
/>
|
||||
<image
|
||||
class="mask-img"
|
||||
src="/static/images/cutPrice/one.gif"
|
||||
mode="widthFix"
|
||||
v-if="maskImg&&tossResult==1"
|
||||
/>
|
||||
<image
|
||||
class="mask-img"
|
||||
src="/static/images/cutPrice/two.gif"
|
||||
mode="widthFix"
|
||||
v-if="maskImg&&tossResult==2"
|
||||
/>
|
||||
<image
|
||||
class="mask-img"
|
||||
src="/static/images/cutPrice/three.gif"
|
||||
mode="widthFix"
|
||||
v-if="maskImg&&tossResult==3"
|
||||
/>
|
||||
<image
|
||||
class="mask-img"
|
||||
src="/static/images/cutPrice/four.gif"
|
||||
mode="widthFix"
|
||||
v-if="maskImg&&tossResult==4"
|
||||
/>
|
||||
<image
|
||||
class="mask-img"
|
||||
src="/static/images/cutPrice/five.gif"
|
||||
mode="widthFix"
|
||||
v-if="maskImg&&tossResult==5"
|
||||
/>
|
||||
<image
|
||||
class="mask-img"
|
||||
src="/static/images/cutPrice/six.gif"
|
||||
mode="widthFix"
|
||||
v-if="maskImg&&tossResult==6"
|
||||
/>
|
||||
<button @tap='showMaskImg' class="breath-btn">点我开始翻倍</button>
|
||||
</view>
|
||||
</view>
|
||||
<view :class="['msk']" @tap="back" v-if="showImg">
|
||||
<view class="msk_box">
|
||||
<navigator
|
||||
@ -366,7 +419,10 @@ export default {
|
||||
hours: "",
|
||||
show: false,
|
||||
showImg: false,
|
||||
showMask: false, // 遮罩层
|
||||
showPrice: false,
|
||||
maskImg:false,
|
||||
tossResult:0,
|
||||
isCut: true,
|
||||
imgPath: "",
|
||||
user_nickname: "",
|
||||
@ -556,6 +612,34 @@ export default {
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
showMaskImg(){
|
||||
this.maskImg=true;
|
||||
const that = this
|
||||
$.request({
|
||||
url: this.Config.URL.user.dolookTurnCutPrice,
|
||||
data: {ac_id:this.ac_id},
|
||||
success:function(data, status, msg, code){
|
||||
if(status==200){
|
||||
that.tossResult=data.point
|
||||
setTimeout(()=>{
|
||||
wx.showModal({
|
||||
title: '幸运骰子',
|
||||
content: `恭喜你,摇到了${data.point}点,幸运暴击${data.point}倍,砍了${data.achPrice}元`,
|
||||
showCancel: false,
|
||||
confirmText: '确定',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
that.maskClose()
|
||||
}
|
||||
}
|
||||
});
|
||||
},2500)
|
||||
}
|
||||
console.log("hhhhhh",that.tossResult)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 头像区域点击事件
|
||||
handleAvatarClick() {
|
||||
@ -744,7 +828,23 @@ export default {
|
||||
that.setData({
|
||||
money: data.ach_price,
|
||||
ac_id: data.ac_id,
|
||||
showImg: true,
|
||||
// showMask: true,
|
||||
});
|
||||
wx.showModal({
|
||||
title: '恭喜',
|
||||
content: `成功砍了${data.ach_price_pre}元`,
|
||||
showCancel: false,
|
||||
confirmText: '确定',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
setTimeout(()=>{
|
||||
that.setData({
|
||||
showMask: true,
|
||||
})
|
||||
},200)
|
||||
}
|
||||
}
|
||||
});
|
||||
that.GetVendorCutPriceEventDetail();
|
||||
that.GetOtherCutPriceActivityList();
|
||||
@ -753,6 +853,9 @@ export default {
|
||||
}
|
||||
},
|
||||
});
|
||||
// that.setData({
|
||||
// showMask: true,
|
||||
// });
|
||||
},
|
||||
onShareAppMessage: function () {
|
||||
// #ifdef MP-WEIXIN
|
||||
@ -1027,6 +1130,10 @@ export default {
|
||||
urls: [this.PageQRCodeInfo.Path],
|
||||
});
|
||||
},
|
||||
maskClose:function() {
|
||||
this.showMask = false;
|
||||
this.showImg = true; // 关闭遮罩后立刻展示动画图
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -1679,4 +1786,117 @@ export default {
|
||||
font-size: 28rpx;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
.mask {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.75);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 999;
|
||||
flex-direction: column;
|
||||
padding: 40rpx 0;
|
||||
}
|
||||
.mask-box{
|
||||
width:602rpx;
|
||||
background:#fff;
|
||||
border-radius:16rpx;
|
||||
padding:40rpx;
|
||||
position:relative;
|
||||
}
|
||||
.mask-close{
|
||||
position:absolute;
|
||||
right:20rpx;
|
||||
top:20rpx;
|
||||
font-size:40rpx;
|
||||
color:#fff;
|
||||
}
|
||||
.mask-text-wrap {
|
||||
font-size: 40rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
margin-bottom: 30rpx;
|
||||
font-weight: bold;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
.mask-text{
|
||||
position:absolute;
|
||||
top:0rpx;
|
||||
font-size:30rpx;
|
||||
color:#999;
|
||||
}
|
||||
.mask-img{
|
||||
width:60%;
|
||||
height:auto;
|
||||
margin:0 auto;
|
||||
}
|
||||
.mask-btn{
|
||||
width:100%;
|
||||
height:80rpx;
|
||||
line-height:80rpx;
|
||||
background:#ff6803;
|
||||
color:#fff;
|
||||
font-size:32rpx;
|
||||
border-radius:12rpx;
|
||||
}
|
||||
.yaotouzi{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
/* 呼吸按钮核心样式 */
|
||||
.breath-btn {
|
||||
/* 基础按钮样式(可根据你的UI调整) */
|
||||
width: 280rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
background: #ff6803;
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
border-radius: 40rpx;
|
||||
border: none;
|
||||
outline: none;
|
||||
|
||||
/* 呼吸动画核心 */
|
||||
animation: breath 2s ease-in-out infinite; /* 2秒一个周期,匀速循环 */
|
||||
}
|
||||
|
||||
/* 定义呼吸动画(缩放) */
|
||||
@keyframes breath {
|
||||
0% {
|
||||
transform: scale(1); /* 原始大小 */
|
||||
}
|
||||
50% {
|
||||
transform: scale(1.1); /* 放大10%(可调整幅度) */
|
||||
}
|
||||
100% {
|
||||
transform: scale(1); /* 回到原始大小 */
|
||||
}
|
||||
}
|
||||
|
||||
/* 可选:点击时的按压效果,增强交互 */
|
||||
.breath-btn:active {
|
||||
transform: scale(0.95); /* 点击时稍微缩小 */
|
||||
animation: none; /* 点击时暂停呼吸动画 */
|
||||
}
|
||||
/* 温馨提示文本样式(核心) */
|
||||
.warm-tip {
|
||||
font-size: 30rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
margin-top: 10rpx;
|
||||
line-height: 32rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.sign{
|
||||
font-size: 70rpx;
|
||||
color: red;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@ -586,6 +586,7 @@ export default {
|
||||
"listsCutPriceActivity": iu + "?ctl=Activity&met=listsCutPriceActivity&typ=json",
|
||||
// "getCutPriceActivity": iu + "?ctl=Activity&met=getCutPriceActivity&typ=json",
|
||||
"getCutPriceActivity": ip + "shop/userActivity/getCutPriceActivity",
|
||||
"dolookTurnCutPrice":ip+"shop/userActivity/dolookTurnCutPrice",
|
||||
// "listsCutPriceHistory": iu + "?ctl=Activity&met=listsCutPriceHistory&typ=json",
|
||||
"listsCutPriceHistory": ip + "shop/userActivity/listsCutPriceHistory",
|
||||
"listsGroupbookingActivity": iu + "?ctl=Activity&met=listsGroupbookingActivity&typ=json",
|
||||
|
||||
BIN
static/images/cutPrice/five.gif
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
static/images/cutPrice/four.gif
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
static/images/cutPrice/one.gif
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
static/images/cutPrice/six.gif
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
static/images/cutPrice/three.gif
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
static/images/cutPrice/two.gif
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
static/images/cutPrice/zero.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |