Commit ad1f1344 by 高淑倩

add: 集点兑换_button_disabled

parent 59fb34f3
...@@ -23,9 +23,9 @@ wxService.page({ ...@@ -23,9 +23,9 @@ wxService.page({
goal: 0, goal: 0,
detailImage: '', detailImage: '',
countObj: null, countObj: null,
currentPercent: 0 // 当前进度 currentPercent: 0, // 当前进度
isDisabled: false
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
...@@ -132,7 +132,17 @@ wxService.page({ ...@@ -132,7 +132,17 @@ wxService.page({
}) })
}, },
handleToGet() { handleToGet() {
// 按钮防止短时间多次点击
this.getPointExchange() this.getPointExchange()
this.setData({
isDisabled: true
})
setTimeout(()=> {
this.setData({
isDisabled: false
})
}, 3000)
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
......
<!--pages/pointDetail/pointDetail.wxml--> <!--pages/pointDetail/pointDetail.wxml-->
<status-img imgHeight="{{imgHeight}}" img="{{detailImage}}"/> <status-img imgHeight="{{imgHeight}}" img="{{detailImage}}" />
<view class="detail-info border_box"> <view class="detail-info border_box">
<view class="info-top weui-flex df-j--bt"> <view class="info-top weui-flex df-j--bt">
<view class="info-num"> <view class="info-num">
集点进度 集点进度
<text class="point_color"> {{countObj.surplusPoints}}</text>/{{goal}} <text class="point_color"> {{countObj.surplusPoints}}</text>
/{{goal}}
</view> </view>
<view class="info-ready-num"> <view class="info-ready-num">
已达成 {{countObj.exchangeCount}} 次 已达成 {{countObj.exchangeCount}} 次
...@@ -19,9 +20,9 @@ ...@@ -19,9 +20,9 @@
border-radius="{{20}}" border-radius="{{20}}"
/> />
</view> </view>
<view wx:if="{{!countObj.totalPoints}}" class="info-status-btn available breathe-btn border_box" bindtap="handleToGet"> <button wx:if="{{!countObj.totalPoints}}" bindtap="handleToGet" class="info-status-btn border_box available breathe-btn" disabled="{{isDisabled}}">可领取奖励
可领取奖励<text class="total-points"> {{countObj.totalPoints}} </text>次 <text class="total-points"> {{countObj.totalPoints}} </text>次
</view> </button>
<view wx:else class="info-status-btn unacommpolished border_box"> <view wx:else class="info-status-btn unacommpolished border_box">
还未达成,继续加油呀 还未达成,继续加油呀
</view> </view>
...@@ -34,4 +35,5 @@ ...@@ -34,4 +35,5 @@
</view> </view>
</view> </view>
<x-dialog dialog="{{dialog}}" bind:handleGo="handleGo" show="{{dialog.show}}"></x-dialog> <x-dialog dialog="{{dialog}}" bind:handleGo="handleGo" show="{{dialog.show}}" />
\ No newline at end of file
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
line-height: 78rpx; line-height: 78rpx;
border-radius: 44rpx; border-radius: 44rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
font-size: 32rpx;
} }
.available{ .available{
box-shadow: 0px 2rpx 14rpx -3rpx rgba(255, 51, 51, 1); box-shadow: 0px 2rpx 14rpx -3rpx rgba(255, 51, 51, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment