<!DOCTYPE HTML>
<html>
<head>
    <meta charset="UTF-8">
    <title>{$title}</title>
    <meta name="keywords" content="{$keywords}" />
    <meta name="description" content="{$description}" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="format-detection" content="telephone=no, email=no">
    <meta name="apple-mobile-web-app-title" content="{$site_name}" />
    <meta name="generator" content="openwbs {$version}" />
    <meta name="author" content="openwbs team" />
    <meta name="copyright" content="2019-2039 OpenWBS Inc." />
    <!--#include file="include.css.html"-->
    <link rel="stylesheet" href="../css/om.shop.coupon.css?v={$version_sn}" />
</head>
<body>
<!--#include file="include.header.html"-->

<section class="mbody">
    <div class="om-coupons">
        {coupon status="0"}
        <div class="section">
            {coupon:loop}
            <div class="om-coupon" name="coupon" coupon_type="[coupon:coupon_type]">
                <a class="link" href="[coupon:link]">
                <dl>
                    <dt>
                        <div class="coupon-money"><em class="moneysb">{$moneysb}</em><span class="money">[coupon:coupon_money]</span><span class="coupon-name">优惠券</span></div>
                        {if:OW.trim("[coupon:coupon_type]")="c2"}
                        <div class="point" name="coupon_exchange_point"><span>需要 [coupon:coupon_exchange_point] 积分兑换</span></div>
                        {/if}
                    </dt>
                    <dd>
                        <div class="get-time" name="get_time" is_get_timelimit="[coupon:is_get_timelimit]" style="display:none;">
                            <div class="span-dt">领取时间</div>
                            <div class="span-dd" name="get_time_show"><%=OW.formatdatetime("[coupon:get_starttime]",1)%> 至 <%=OW.formatdatetime("[coupon:get_endtime]",1)%></div>
                        </div>
                        <div class="use-time" name="use_time" is_use_timelimit="[coupon:is_use_timelimit]" style="display:none;">
                            <div class="span-dt">使用时间</div>
                            <div class="span-dd" name="use_time_show"><%=OW.formatdatetime("[coupon:use_starttime]",1)%> 至 <%=OW.formatdatetime("[coupon:use_endtime]",1)%></div>
                        </div>
                        <div class="use-min-money" use_min_money="[coupon:use_min_money]" style="display:none;">
                            <div class="span-dt">使用条件</div>
                            <div class="span-dd">订单满 [coupon:use_min_money] 元可使用</div>
                        </div>
                    </dd>
                </dl>
                </a>
            </div>
            {/coupon:loop}
        </div>
        {/coupon}
    </div>
    <script type="text/javascript">
    $(window).ready(function(){
		var $coupon = $("div[name='coupon']");
		$coupon.each(function(i){
			var k = i+1;
			if(k%2==0){
				$(this).addClass("coupon-item-r");
			};
		});
		$coupon.find("div[name='get_time']").each(function(){
			if($(this).attr("is_get_timelimit")=="0"){
				$(this).hide();
				$(this).find("[name='get_time_show']").html('不限');
			};
		});
		$coupon.find("div[name='use_time']").each(function(){
			if($(this).attr("is_use_timelimit")=="0"){
				$(this).hide();
				$(this).find("[name='use_time_show']").html('不限');
			};
		});
		
	});
    </script>
</section>
<!--底部-->
<!--#include file="include.footer.html"-->
<style type="text/css">
.om-footer{ display:none!important;}
</style>
<% if OS.isWeixinShare then %>
<%=OS.getWXShareTicket%>
<script type="text/javascript">
OW.uid = OW.int(OW.cookie.getCookie("uid"));
wx.config({
    debug:false,appId:'<%=OS.wxShareAppid%>',timestamp:'<%=OS.wxShareTimestamp%>',nonceStr:'<%=OS.wxShareNonceStr%>',signature:'<%=OS.wxShareSignature%>',jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ','onMenuShareQZone']
});
wx.ready(function(){
	var wxTitle = '{$title}',
	wxDesc      = '{$description}'
	wxLink      = OW.currentURL() + OW.iif(OW.uid>0,"?rid="+ OW.uid +"",""),
	wxImgUrl    = '<%=OW.validImageUrl("{$config(share_default_img)}")%>';
	wx.onMenuShareTimeline({title:wxTitle,link:wxLink,imgUrl:wxImgUrl});
	wx.onMenuShareAppMessage({title:wxTitle,desc:wxDesc,link:wxLink,imgUrl:wxImgUrl});
	wx.onMenuShareQQ({title:wxTitle,desc:wxDesc,link:wxLink,imgUrl:wxImgUrl});
	wx.onMenuShareQZone({title:wxTitle,desc:wxDesc,link:wxLink,imgUrl:wxImgUrl});
});
</script>
<% end if %>
</body>
</html>
