<!--packageA//pages/chongzhiDetails/chongzhiDetails.wxml-->
<wxs module="g_filter" src="g_filter.wxs"></wxs>
<view class="container">
	<view>
		<view class="banner-container" wx:if="{{show_img}}">

			<navigator url="{{item.ad_weapplink}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(ad.ad_weapplink,'plugin')>=0}}">
		    	<image class="img-block" src="{{url+show_img}}" mode="widthFix"
		         lazy-load="true" binderror="bind_err" data-errorimg="show_img" ></image>
			</navigator>

			<block wx:else>
				<image class="img-block" src="{{url+show_img}}" mode="widthFix" bindtap="go_url"
					   data-url="{{ad.ad_weapplink}}"
					   lazy-load="true" binderror="bind_err" data-errorimg="show_img" ></image>
			</block>


		</view>

		<view class="title-container" wx:else>
			<view class="title">
				<view>女王专享</view>
				<view>你的美丽我来缔造</view>
			</view>
		</view>

		<view class="list">

			<view >			
				<view class="list-item flex" wx:for="{{result.givelist}}">									
					<!-- 左图片 -->
					<view class="avatar">
						<image wx:if="{{item.GiveType=='0'}}" src="{{url}}/miniapp/images/giftbag/gift05.png"></image><!-- 代金券 -->
						<image wx:if="{{item.GiveType=='1'}}" src="{{url}}/miniapp/images/giftbag/gift02.png"></image><!-- 服务项目 -->
						<image wx:if="{{item.GiveType=='2'}}" src="{{url}}/miniapp/images/giftbag/gift01.png"></image><!-- 商品 -->
						<image wx:if="{{item.Integral>0}}" src="{{url}}/miniapp/images/giftbag/gift03.png"></image><!-- 积分 -->
						<image wx:if="{{item.GradeSum>0}}" src="{{url}}/miniapp/images/giftbag/gift04.png"></image><!-- 成长值 -->
						<image wx:if="{{item.PAdvanceItemId>0}}" src="{{url}}/miniapp/images/giftbag/gift01.png"></image><!-- 预存 -->		
					</view>
					<!-- 右 -->
					<view class="info" style="position: relative;">
						<view wx:if="{{item.GiveType=='0'}}">{{item.CouponSum}}元优惠券</view>
						<view wx:elif="{{item.Integral>0}}">{{item.Integral}}积分</view>
						<view wx:elif="{{item.GradeSum>0}}">{{item.GradeSum}}成长值</view>
						<view wx:else class="max_len_name ellipsis-2">{{item.GiveName}}</view>
						<!-- <view class="fs28 pdv10 txt-justify">节日可免费享受专业美甲，可以享受1次。</view> -->
						<view wx:if="{{item.Qty>0}}" class="fs24">数量：{{item.Qty}}</view>
						<view  wx:if="{{item.GiveType=='2'}}" class="date fs24">{{'兑换截止日期' + ':' + item.BeginDate + '至' + (item.EndDate==''?'不限':item.EndDate) }}</view>

						<!-- 优化显示二维码 -->
						<view class="box_ware_code data-v-3a5b7e36" wx:if="{{item.GiveType=='2' && item.IsQrCode==1}}">
							 <!-- <block wx:if="{{c_state==0}}"> -->
							 <image wx:if="{{item.IsRetrieval}}" src="{{url+'/miniapp/images/hui-ewm.png'}}" lazy-load="true" bindtap="getcode"
									data-index="{{index}}"
									class="data-v-3a5b7e36"></image>
							<image wx:else src="{{url+'/miniapp/images/user_r_code.png'}}" lazy-load="true" bindtap="getcode"
									data-index="{{index}}"
									class="data-v-3a5b7e36 "></image>
						</view>

					</view>
				</view>		
			</view>			
		</view>		
	</view>
	
	<block wx:if="{{result.is_acting}}">		
		<view class="btn-container" >					
				<text wx:if="{{type==0}}" data-advance="{{result.Id}}"  data-money="{{result.BeginSum}}" 
				   class="btn" bindtap="go_buy">立即充值</text>
				<block wx:else>
				  <text wx:if="{{result.AddType==0 || result.AddType=='0'}}" class="btn {{result.IsGQ?'bk_huise':''}}  " bindtap="onUse">立即使用</text>
				  <text wx:if="{{result.AddType==1 || result.AddType=='1'}}" class="btn" >已核销</text>
				</block>		
		</view>
	</block>	
	<block wx:else>
		<view class="btn-container" wx:if="{{result.AddType=='1'}}" >	
		   <text class="btn">已核销</text>
		</view> 
	</block>	
	
	<qrcode id="qrcode"></qrcode>	
</view>
