<!--packageA/mycomponent/coupon_item/coupon_item.wxml-->

	
<view class="coupon_voucher" wx:if="{{ind == 1}}">
	<van-swipe-cell right-width="{{ 65 }}">
	<van-cell-group>
	<view class="coupon_voucher_wrapper" catchtap="tapGo" data-info="{{item}}">
		<view class="coupon_voucher_left">
			<image src="../../../image/couponsbg_{{item.type}}.png"  class="bg_icon" ></image>
			<view class="wrapper">
				<block wx:if="{{item.belongs_to_coupon.coupon_method==2}}">
					<view class="discount">{{item.belongs_to_coupon.discount}}折</view>
					<view class="limit">满{{item.belongs_to_coupon.enough}}可用</view>
				</block>
				<block wx:if="{{item.belongs_to_coupon.coupon_method==1}}">
					<view class="{{item.belongs_to_coupon.deduct.length >= 6?'discount_none':'discount'}}" ><text>{{language['money']}}</text>{{item.belongs_to_coupon.deduct}}</view>
					<view class="limit">满{{item.belongs_to_coupon.enough}}立减</view>
				</block>
			</view>
		</view>
		<view class="coupon_voucher_right">
			<view class="status" wx:if="{{item.over_due}}">快过期</view>
			<view class="c1">
				<view class="label" style="background:{{colors[item.type-1]}}">{{item.belongs_to_coupon.coupon_type_name}}</view>
				<view class="title" wx:if="{{item.combine && item.num != 1}}">{{item.num}}张</view>
			</view>
			<view class="c2">
				{{item.belongs_to_coupon.name}}
			</view>
			<view class="time">有效期:{{item.time_start}}-{{item.time_end}}</view>
		</view>
	</view>
	<view wx:if="{{item.openIs}}" class="coupon_voucher_btm">{{item.api_limit}}</view>
	</van-cell-group>
		<view slot="right" class="van-swipe-cell__right" catchtap="delteteItem" data-item="{{item}}" data-ind="{{inds}}">删除</view>
	</van-swipe-cell>
</view>

<view class="coupon_voucher" wx:if="{{ind == 2}}">
	<van-swipe-cell right-width="{{ 65 }}">
	<van-cell-group>
	<view class="coupon_voucher_wrapper">
		<view class="coupon_voucher_left">
			<image src="../../../image/couponsbg_7.png"  class="bg_icon" ></image>
			<view class="wrapper">
				<block wx:if="{{item.belongs_to_coupon.coupon_method==2}}">
					<view class="discount">{{item.belongs_to_coupon.discount}}折</view>
					<view class="limit">满{{item.belongs_to_coupon.enough}}可用</view>
				</block>
				<block wx:if="{{item.belongs_to_coupon.coupon_method==1}}">
					<view class="{{item.belongs_to_coupon.deduct.length >= 6?'discount_none':'discount'}}" ><text>{{language['money']}}</text>{{item.belongs_to_coupon.deduct}}</view>
					<view class="limit">满{{item.belongs_to_coupon.enough}}立减</view>
				</block>
			</view>
		</view>
		<view class="coupon_voucher_right">
			<view class="status black" >已过期</view>
			<view class="c1">
				<view class="label" style="background:rgb(206,206,206);">{{item.belongs_to_coupon.coupon_type_name}}</view>
				<!-- <view class="title">{{item.belongs_to_coupon.name}}</view> -->
			</view>
			<view class="c2">
				{{item.belongs_to_coupon.name}}
			</view>
			<view class="time">有效期:{{item.time_start}}-{{item.time_end}}</view>
		</view>
	</view>
	<view wx:if="{{item.openIs}}" class="coupon_voucher_btm">{{item.api_limit}}</view>
	</van-cell-group>
		<view slot="right" class="van-swipe-cell__right">删除</view>
	</van-swipe-cell>
</view>
<view class="coupon_voucher" wx:if="{{ind == 3}}">
	<van-swipe-cell right-width="{{ 65 }}">
	<van-cell-group>
	<view class="coupon_voucher_wrapper">
		<view class="coupon_voucher_left">
			<image src="../../../image/couponsbg_7.png"  class="bg_icon" ></image>
			<view class="wrapper">
				<block wx:if="{{item.belongs_to_coupon.coupon_method==2}}">
					<view class="discount">{{item.belongs_to_coupon.discount}}折</view>
					<view class="limit">满{{item.belongs_to_coupon.enough}}可用</view>
				</block>
				<block wx:if="{{item.belongs_to_coupon.coupon_method==1}}">
					<view class="{{item.belongs_to_coupon.deduct.length >= 6?'discount_none':'discount'}}" ><text>{{language['money']}}</text>{{item.belongs_to_coupon.deduct}}</view>
					<view class="limit">满{{item.belongs_to_coupon.enough}}立减</view>
				</block>
			</view>
		</view>
		<view class="coupon_voucher_right">
			<view class="status black" >已使用</view>
			<view class="c1">
				<view class="label" style="background:rgb(206,206,206);">{{item.belongs_to_coupon.coupon_type_name}}</view>
			</view>
			<view class="c2">
				{{item.belongs_to_coupon.name}}
			</view>
			<view class="time">有效期:{{item.time_start}}-{{item.time_end}}</view>
		</view>
	</view>
	<view wx:if="{{item.openIs}}" class="coupon_voucher_btm">{{item.api_limit}}</view>
	</van-cell-group>
		<view slot="right" class="van-swipe-cell__right">删除</view>
	</van-swipe-cell>
</view>

<van-dialog use-slot asyncClose show="{{presentershow}}" show-cancel-button bind:confirm="onconfirm" bind:cancel="onclose">
	<view style="text-align: center;margin: 20rpx 0;font-weight: 700;">提示</view>
	<view class="usercontent">
		<view class="left">请输入用户ID</view>
		<view class="right"><input value="{{usermessage.value}}" confirm-type='done' bindinput="usermesbutInput" bindblur="getmemberInfo" placeholder="请输入用户ID" type="number" /></view>
		<text style="margin-left:40rpx;">昵称:{{memberInfo}}</text>
	</view>
	<!-- <van-field value="{{ usermessage.value }}" bind:blur="usermesbut" label="用户ID" placeholder="请输入用户ID" /> -->
</van-dialog>
