<!--pages/pointDetail/pointDetail.wxml-->
<wxs src="./tools.wxs" module="tools" />

<status-img
 imgHeight="{{imgHeight}}"
 img="{{detailImage}}"
 currentStatus="{{currentStatus}}"
 currentTimeStatus="{{currentTimeStatus}}"
/>
<view class="detail-info border_box" wx:if="{{goal}}">
	<view class="info-top weui-flex df-j--bt">
		<view class="info-num">
			进度:
			<!--可领取次数_surplusExchangeCount 存在 3/3  不存在 0/3 -->
			<span wx:if="{{countObj.surplusExchangeCount}}">
				<!-- 被整除 是 显示目标集点 否 显示余数-->
				<text class="point_color" wx:if="{{tools.parse(countObj.totalPoints % goal) == 0}}"> {{goal}}</text>
				<text class="point_color" wx:else> {{countObj.totalPoints ? tools.parse(countObj.totalPoints % goal) : 0}}</text>
			</span>
			<text class="point_color" wx:else> {{countObj.totalPoints ? tools.parse(countObj.totalPoints % goal) : 0}}</text>
			/ {{goal}}
		</view>
		<view class="info-ready-num">
			<!--	已达成次数 总集点数/目标节点  取整 -->
			已达成 {{countObj.totalPoints ? tools.parse(countObj.totalPoints / goal) : 0}} 次
		</view>
	</view>
	<view class="info-progress border_box">
		<!--	<x-progress-point
		 active-color='#3EEB9A, #04C25C'
		 percent='{{currentPercent != null ? currentPercent : 0}}'
		 stroke-width='20'
		 radius='20'
		/>-->
		<x-progress-image
		 goal="{{goal}}"
		 iconImageFinsh="{{iconImageFinsh}}"
		 iconImage="{{iconImage}}"
		 AvailableNum="{{countObj.surplusExchangeCount}}"
		 showRemNum="{{countObj.totalPoints ? tools.parse(countObj.totalPoints % goal) : 0}}"
		 showNum="{{tools.parse(countObj.totalPoints % goal) == 0}}"
		/>
	</view>
	<!-- 活动剩余点数 >= 目标点数   wx:if="{{countObj.surplusPoints >= goal}}"-->
	<button
	 hidden="{{hideGetBtn}}"
	 bindtap="handleToGet"
	 class="info-status-btn border_box available breathe-btn"
	 disabled="{{isDisabled}}"
	>可领取奖励
		<text class="total-points"> {{countObj.surplusExchangeCount}} </text>
		次
	</button>
	<view hidden="{{showGetBtn}}" class="info-status-btn unacommpolished border_box">
		还未达成，继续加油呀
	</view>

</view>
<view class="detail-desc">
	<view class="detail-active point_color" bindtap="handleCheckGoods" wx:if="{{type == 1}}">查看活动商品 ></view>
	<view class='integral-list' wx:for="{{desc}}" wx:key="{{index}}">
		<text class='integral-title'>{{item.title}}</text>
		<text class='integral-desc wpl'>{{item.value}}</text>
	</view>
</view>

<x-dialog
 dialog="{{dialog}}"
 bind:handleGo="handleGo"
 bind:_closeDialog="_closeDialog"
 show="{{dialog.show}}"
/>
<!--goHome-->
<go-home/>
<authorization-modal-point isAuthorization='{{isAuthorization}}' />

