Commit 85e65b1e by 高淑倩

modify: 集点详情_hidden_btn

parent 7c6611d4
...@@ -29,7 +29,9 @@ wxService.page({ ...@@ -29,7 +29,9 @@ wxService.page({
surplusExchangeCount: 0 surplusExchangeCount: 0
}, },
currentPercent: 0, // 当前进度 currentPercent: 0, // 当前进度
isDisabled: false isDisabled: false,
hideGetBtn: true, // 默认隐藏 可领取按钮
showGetBtn: true, // 默认展示 未达成按钮
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -110,7 +112,9 @@ wxService.page({ ...@@ -110,7 +112,9 @@ wxService.page({
this.setData({ this.setData({
countObj: data, countObj: data,
currentPercent: 100 / (this.data.goal / newPercent), currentPercent: 100 / (this.data.goal / newPercent),
surplusExchangeCount: data.surplusExchangeCount surplusExchangeCount: data.surplusExchangeCount,
hideGetBtn: hasNum ? false : true,
showGetBtn: hasNum ? true : false,
}, () => { }, () => {
wx.hideLoading() wx.hideLoading()
}) })
......
<!--pages/pointDetail/pointDetail.wxml--> <!--pages/pointDetail/pointDetail.wxml-->
<wxs src="./tools.wxs" module="tools" /> <wxs src="./tools.wxs" module="tools" />
<status-img imgHeight="{{imgHeight}}" img="{{detailImage}}" /> <status-img imgHeight="{{imgHeight}}" img="{{detailImage}}" />
<view class="detail-info border_box" wx:if="{{detailImage}}"> <view class="detail-info border_box" wx:if="{{goal}}">
<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">
进度: 进度:
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</view> </view>
<!-- 活动剩余点数 >= 目标点数 wx:if="{{countObj.surplusPoints >= goal}}"--> <!-- 活动剩余点数 >= 目标点数 wx:if="{{countObj.surplusPoints >= goal}}"-->
<button <button
wx:if="{{countObj.surplusExchangeCount}}" hidden="{{hideGetBtn}}"
bindtap="handleToGet" bindtap="handleToGet"
class="info-status-btn border_box available breathe-btn" class="info-status-btn border_box available breathe-btn"
disabled="{{isDisabled}}" disabled="{{isDisabled}}"
...@@ -40,9 +40,10 @@ ...@@ -40,9 +40,10 @@
<text class="total-points"> {{countObj.surplusExchangeCount}} </text> <text class="total-points"> {{countObj.surplusExchangeCount}} </text>
</button> </button>
<view wx:else class="info-status-btn unacommpolished border_box"> <view hidden="{{showGetBtn}}" class="info-status-btn unacommpolished border_box">
还未达成,继续加油呀 还未达成,继续加油呀
</view> </view>
</view> </view>
<view class="detail-desc"> <view class="detail-desc">
<view class="detail-active point_color" bindtap="handleCheckGoods" wx:if="{{type == 1}}">查看活动商品 ></view> <view class="detail-active point_color" bindtap="handleCheckGoods" wx:if="{{type == 1}}">查看活动商品 ></view>
...@@ -52,5 +53,10 @@ ...@@ -52,5 +53,10 @@
</view> </view>
</view> </view>
<x-dialog dialog="{{dialog}}" bind:handleGo="handleGo" bind:_closeDialog="_closeDialog" show="{{dialog.show}}" /> <x-dialog
dialog="{{dialog}}"
bind:handleGo="handleGo"
bind:_closeDialog="_closeDialog"
show="{{dialog.show}}"
/>
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