<!--packageE/signin/signin.wxml-->
<wxs module="util">
	var inOf = function(val, str) { if (val) {return val.indexOf(str) }};
	module.exports.inOf = inOf;
</wxs>

<view wx:if="{{!show}}" style="height: 50px;background: white;font-size: 16px;line-height: 50px"> 请先开启签到插件 </view>

  <!--签到静态-->
<view class="signIn" wx:if="{{datas.sign_style == 1 && show}}" style="margin-top:{{datas.margin_top}}px;margin-bottom:{{datas.margin_bottom}}px;margin-left: {{datas.margin_left}}px;margin-right:{{datas.margin_right}}px;">
	<view class="signBox" style="position: relative">
		<image src="{{datas.preview_image? datas.preview_image: emptyImage}}" mode="widthFix" class="bg-img" />
		<view class="left">
			<view class="left_conten">
				<view class="left_one" style="font-size:{{datas.font_size}}px;color: {{datas.font_color}};">已经连续{{signdata.sign_name || '签到'}}天数：<text class="adone" >{{signdata.cumulative_number}}</text></view>
				<view class="left_two" wx:if="{{datas.show_prize}}" style=" font-size:{{datas.prize_font_size}}px;color:{{datas.prize_font_color}};">今日{{signdata.sign_name || '签到'}}奖励</view>
				<view class="list" wx:if="{{datas.show_prize}}"  style=" font-size:{{datas.prize_font_size}}px;color:{{datas.prize_font_color}};">
					<view class="list_lis" wx:if="{{signdata.award_point > 0}}">
						<text class="span">+{{signdata.award_point}}</text>
						<text class="span">{{integral || '积分'}}</text>
					</view>
					<view class="list_lis" wx:if="{{signdata.award_coupon_num > 0}}">
						<text class="span">+{{signdata.award_coupon_num}}张</text>
						<text class="span">优惠券</text>
					</view>
					<view class="list_lis" wx:if="{{signdata.award_love_min || signdata.award_love_max}}">
						<!--没签到前显示最小值~最大值   签到后显示实际数量-->
						<text class="span" wx:if="{{signdata.get_love}}">+ {{signdata.get_love}}</text>
						<text class="span" wx:else>+{{signdata.award_love_min ? signdata.award_love_min : ''}} {{signdata.award_love_min && signdata.award_love_max ? '~' :''}} {{signdata.award_love_max ? signdata.award_love_max: ''}}</text>
						<text class="span">{{signdata.love_name || '爱心值'}}</text>
					</view>
				</view>
				<view class="btn" wx:if="{{signdata.sign_status}}">
					<text style="font-weight: {{util.inOf(datas.button_style,'1') > -1 ? 'bold':''}}; font-style: {{util.inOf(datas.button_style,'2') > -1 ? 'italic':'' }};background-color: {{datas.button_bg_color}};font-size:{{datas.button_size}}px;color:{{datas.button_color}};">已{{signdata.sign_name || '签到'}}</text>
				</view>
				<view class="btn" bindtap="signnow" wx:if="{{!signdata.sign_status}}">
					<text style="font-weight: {{util.inOf(datas.button_style,'1') > -1 ? 'bold':''}}; font-style: {{util.inOf(datas.button_style,'2') > -1 ? 'italic':'' }};background-color: {{datas.button_bg_color}};font-size:{{datas.button_size}}px;color:{{datas.button_color}};">立即{{signdata.sign_name || '签到'}}</text>
				</view>
			</view>
		</view>
	</view>
</view>

<view class="signIn" wx:if="{{datas.sign_style == 2 && show}}" style="margin-top:{{datas.margin_top}}px;margin-bottom:{{datas.margin_bottom}}px;margin-left: {{datas.margin_left}}px;margin-right:{{datas.margin_right}}px;">
	<!-- 在这里写签到静态 -->
	<view class="signBox_one" style="position: relative">
		<image src="{{datas.preview_image? datas.preview_image: emptyImage}}" mode="widthFix" class="bg-img" />
		<view class="left">
			<view class="left_conten">
				<view class="left_one" style="font-size:{{datas.font_size}}px;color: {{datas.font_color}};">已经连续{{signdata.sign_name || '签到'}}天数：<text class="adone" >{{signdata.cumulative_number}}</text></view>
				<view class="left_two" wx:if="{{datas.show_prize}}" style=" font-size:{{datas.prize_font_size}}px;color:{{datas.prize_font_color}};">今日{{signdata.sign_name || '签到'}}奖励</view>
				<view class="list" wx:if="{{datas.show_prize}}" style=" font-size:{{datas.prize_font_size}}px;color:{{datas.prize_font_color}};">
					<view class="list_lis" wx:if="{{signdata.award_point > 0}}">
						<text class="span">+{{signdata.award_point}}</text>
						<text class="span">{{integral || '积分'}}</text>
					</view>
					<view class="list_lis" wx:if="{{signdata.award_coupon_num > 0}}">
						<text class="span">+{{signdata.award_coupon_num}}张</text>
						<text class="span">优惠券</text>
					</view>
					<view class="list_lis" wx:if="{{signdata.award_love_min || signdata.award_love_max}}">
						<text class="span" wx:if="{{signdata.get_love}}">+ {{signdata.get_love}}</text>
						<text class="span" wx:else>+{{signdata.award_love_min ? signdata.award_love_min : ''}} {{signdata.award_love_min && signdata.award_love_max ? '~' :''}} {{signdata.award_love_max ? signdata.award_love_max: ''}}</text>
						<text class="span">{{signdata.love_name || '爱心值'}}</text>
					</view>
				</view>
				<view class="btn" wx:if="{{signdata.sign_status}}">
					<text style="font-weight: {{util.inOf(datas.button_style,'1') > -1 ? 'bold':''}}; font-style: {{util.inOf(datas.button_style,'2') > -1 ? 'italic':'' }};background-color: {{datas.button_bg_color}};font-size:{{datas.button_size}}px;color:{{datas.button_color}};">已{{signdata.sign_name || '签到'}}</text>
				</view>
				<view class="btn" bindtap="signnow" wx:if="{{!signdata.sign_status}}">
					<text style="font-weight: {{util.inOf(datas.button_style,'1') > -1 ? 'bold':''}}; font-style: {{util.inOf(datas.button_style,'2') > -1 ? 'italic':'' }};background-color: {{datas.button_bg_color}};font-size:{{datas.button_size}}px;color:{{datas.button_color}};">立即{{signdata.sign_name || '签到'}}</text>
				</view>
			</view>
		</view>
	</view>
</view>

