<!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"-->
</head>
<body>
<!--头部-->
<header class="ow-header">
    <a class="goback" href="{$site_hurl}<%=OW.DB.getFieldValueBySQL("SELECT [urlpath] FROM ow_category WHERE cate_id={$content:root_id} AND "& OW.DB.auxSQL &"")%>/"></a>
    <div class="title">{$content:title}</div>
    <!--#include file="include.top.nav.html"-->
</header>

<section class="mbody">
    <div class="ow-product-detail">
        <div id="gallery" class="gallery">
            <div class="header"><ul></ul></div>
            <div class="section">
                <ul>{%=OW.echoImages("{$content:images}","<li i='{$i}'><a href='javascript:;'><img src='{$url}' alt='{$name}' title='{$name}' /></a></li>")%}</ul>
            </div>
        </div>
        <div class="goods-property">
            <h1 class="title">{$content:title}</h1>
            <h2 class="subtitle">{$content:subtitle}</h2>
        </div>
        <div class="ow-content ow-editor-content-text">
            {$content:mob_content}
            <div class="read"><span class="views">阅读 {$content:views}</span></div>
        </div>
        <div class="tags" id="tags">标签：
            {tags cid="{$content:cid}"}
                {tags:loop}<a href="[tags:link]" title="[tags:tag]">[tags:tag]</a>{/tags:loop}
            {/tags}
        </div>
        <div class="pager">{$content:pages}</div>
        <div class="prev-next">
            <div class="prev">上一个：{$content:prev}</div>
            <div class="next">下一个：{$content:next}</div>
        </div>
        <div class="ow-relate-content" id="ow_relate">
            <div class="header">相关推荐</div>
            <div class="section">
            {content top="100" related_cid="{$content:cid}" model="product"}
            <ul class="ow-product-horizlist">
                {content:loop}
                <li class="li[content:i]">
                    <a href="[content:link]">
                        <div class="thumb"><img src="[content:thumbnail]" alt="[content:title]" title="[content:title]"></div>
                        <div class="info">
                            <h3 class="title">[content:ctitle]</h3>
                            <div class="subtitle">[content:subtitle]</div>
                        </div>
                    </a>
                </li>
                {/content:loop}
            </ul>
            {/content}
            </div>
        </div>
    </div>
    <div id="OWCMT"></div>
</section>

<!--底部-->
<!--#include file="include.footer.html"-->

<script type="text/javascript">
$(document).ready(function(){
	//图片组
	if(OW.int($("#gallery").find("img").length)>0){
		TouchSlide({ 
			slideCell:"#gallery",
			titCell:".header ul",
			mainCell:".section ul", 
			effect:"leftLoop", 
			autoPage:true,
			autoPlay:true,
			interTime:3000
		});
	};
	if(!$("#tags").find("a").length>0){$("#tags").remove();};
	if($(".pager").html()==""){$(".pager").remove();};
	if(!$("#ow_relate").find("li").length>0){$("#ow_relate").remove();};
	//评论
	$("#OWCMT").html('<div id="owcmt_post_section"></div><div class="ow-owcmt-list-header"><span class="cmt-count"><b id="owcmt_count_section">0</b>条评论</span>最新评论</div><div id="owcmt_list_section"></div><div class="pager" id="owcmt_pager_section"></div>');
	OW.cmt.postSection  = $("#owcmt_post_section");
	OW.cmt.countSection = $("#owcmt_count_section");
	OW.cmt.listSection  = $("#owcmt_list_section");
	OW.cmt.pagerSection = $("#owcmt_pager_section");
	OW.cmt.pagesize = 20;
	OW.cmt.init({cid:{$content:cid},gid:0});
	OW.cmt.get({cid:{$content:cid},gid:0,page:1});
	OW.cmt.getCallBack = function(){
		var opt = {y:"年前",m:"个月前",w:"周前",d:"天前",h:"小时前",n:"分钟前",s:"秒前",z:"刚刚"}
		$("#OWCMT").find(".posttime").each(function(){
			var timeText = OW.timeAgoTip(opt,$(this).html(),"<%=SYS_TIME%>");
			$(this).html(timeText);
		});
	};
});
</script>
<% 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">
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(),
	wxImgUrl    = '<%=OW.validImageUrl("{$content:thumbnail}")%>';
	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>
