Commit ad1f1344 by 高淑倩

add: 集点兑换_button_disabled

parent 59fb34f3
......@@ -23,9 +23,9 @@ wxService.page({
goal: 0,
detailImage: '',
countObj: null,
currentPercent: 0 // 当前进度
currentPercent: 0, // 当前进度
isDisabled: false
},
/**
* 生命周期函数--监听页面加载
*/
......@@ -132,7 +132,17 @@ wxService.page({
})
},
handleToGet() {
this.getPointExchange()
// 按钮防止短时间多次点击
this.getPointExchange()
this.setData({
isDisabled: true
})
setTimeout(()=> {
this.setData({
isDisabled: false
})
}, 3000)
},
/**
* 生命周期函数--监听页面初次渲染完成
......
<!--pages/pointDetail/pointDetail.wxml-->
<status-img imgHeight="{{imgHeight}}" img="{{detailImage}}"/>
<status-img imgHeight="{{imgHeight}}" img="{{detailImage}}" />
<view class="detail-info border_box">
<view class="info-top weui-flex df-j--bt">
<view class="info-num">
集点进度
<text class="point_color"> {{countObj.surplusPoints}}</text>/{{goal}}
<text class="point_color"> {{countObj.surplusPoints}}</text>
/{{goal}}
</view>
<view class="info-ready-num">
已达成 {{countObj.exchangeCount}} 次
......@@ -19,11 +20,11 @@
border-radius="{{20}}"
/>
</view>
<view wx:if="{{!countObj.totalPoints}}" class="info-status-btn available breathe-btn border_box" bindtap="handleToGet">
可领取奖励<text class="total-points"> {{countObj.totalPoints}} </text>次
</view>
<view wx:else class="info-status-btn unacommpolished border_box">
还未达成,继续加油呀
<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>次
</button>
<view wx:else class="info-status-btn unacommpolished border_box">
还未达成,继续加油呀
</view>
</view>
<view class="detail-desc">
......@@ -34,4 +35,5 @@
</view>
</view>
<x-dialog dialog="{{dialog}}" bind:handleGo="handleGo" show="{{dialog.show}}"></x-dialog>
\ No newline at end of file
<x-dialog dialog="{{dialog}}" bind:handleGo="handleGo" show="{{dialog.show}}" />
......@@ -30,6 +30,7 @@
line-height: 78rpx;
border-radius: 44rpx;
background-color: #FFFFFF;
font-size: 32rpx;
}
.available{
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