<!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="2008-2020 OpenWBS Inc." />
    <!--#include file="include.css.html"-->
    <link rel="stylesheet" href="../css/om.shop.coupon.css" />
</head>
<body>
<!--头部-->
<header class="ow-header">
    <a href="{$shop_url}/" class="goback"></a>
    <div class="title">{$coupon:coupon_name}</div>
    <!--#include file="include.top.nav.html"-->
</header>

<section class="mbody">
    <div class="ow-coupon-detail">
        <div class="ow-coupon">
            <div class="coupon-item" name="coupon" coupon_type="{$coupon:coupon_type}" coupon_rule_type="{$coupon:coupon_rule_type}">
                {if:OW.trim("{$coupon:coupon_type}")="c2"}
                    <div class="point" name="coupon_exchange_point"><span>需要 {$coupon:coupon_exchange_point} 积分兑换</span></div>
                {/if}
                <div class="header">
                    <div class="coupon-money"><em class="moneysb">{$moneysb}</em><span class="money">{$coupon:coupon_money}</span><span class="moneysb-name">元</span><div class="coupon-name">优惠券</div></div>
                    <div class="coupon-button-section">
                        <a class="btn-get-coupon" name="get_coupon" coupon_id="{$coupon:coupon_id}" href="javascript:;">{if:OW.trim("{$coupon:coupon_type}")="c2"}兑换{else}领取{/if}</a>
                    </div>
                </div>
                <div class="section">
                    <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>
                    <div class="use-goods-rule" coupon_rule_type="{$coupon:coupon_rule_type}">
                        <div class="span-dt">可用商品</div>
                        <div class="span-dd">{$coupon:coupon_goods}</div>
                    </div>
                    <div class="use-goods-rule">
                        <div class="span-dt">其他说明</div>
                        <div class="span-dd" name="coupon_desc">{$coupon:desc}</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
    $(window).ready(function(){
		var $coupon = $("div[name='coupon']");
		$coupon.find("a[name='get_coupon']").click(function(){
			OW.coupon.get($(this).attr("coupon_id"));
		});
		$("div[name='get_time']").each(function(){
			if($(this).attr("is_get_timelimit")=="0"){
				$(this).hide();
				$(this).find("[name='get_time_show']").html('不限');
			};
		});
		$("div[name='use_time']").each(function(){
			if($(this).attr("is_use_timelimit")=="0"){
				$(this).hide();
				$(this).find("[name='use_time_show']").html('不限');
			};
		});
		var $couponDesc = $("div[name='coupon_desc']");
		if(OW.isNull($couponDesc.html())){
			$couponDesc.parent().hide();
		};
	});
    </script>
</section>
<!--底部-->
<!--#include file="include.footer.html"-->
<% if OS.isJWeixinCanUse then %>
<%=OS.getWeixinTicket%>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script type="text/javascript">
OW.uid = OW.int(OW.cookie.getCookie("uid"));
wx.config({
    debug:false,appId:'<%=OS.weixinAppid%>',timestamp:'<%=OS.weixinTimestamp%>',nonceStr:'<%=OS.weixinNonceStr%>',signature:'<%=OS.weixinSignature%>',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>
