<!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.category.all.css?v={$version_sn}" />
</head>
<body>
<!--#include file="include.header.html"-->
<div class="om-header om-header-fixed" id="header">
    <div class="om-header-container-subpage">
        <a class="goback" href="{$site_url}"><i></i></a>
        <div class="search">
            <i class="icon-search"></i>
            <div class="search-input"><input type="text" name="search" maxlength="20" cleardefault="no" autocomplete="off" placeholder="搜索商品名称"  value="" /></div>
        </div>
        <div class="user"><a class="unlogin" href="{$login_url}"><i></i></a></div>
    </div>
</div>

<section class="mbody">
    <div class="om-cate-sider" id="ow_cate_sider">
        <ul>
        {cate is_shop="1" parent_id="0"}
        {cate:loop}
        <li cate_id="[cate:cate_id]"><a href="javascript:;">[cate:name]</a></li>
        {/cate:loop}
        {/cate}
        </ul>
    </div>
    <div class="om-cate-list" id="ow_cate_list">
        {cate is_shop="1" parent_id="0"}
        {cate:loop}
            <section name="cate" cate_id="[cate:cate_id]">
            {goods top="20" cate_id="[cate:cate_id]" orderby="sequence asc"}
            <ul class="om-goods-horizlist">
                {goods:loop}
                <li>
                    <a href="[goods:link]">
                    <span class="tagicon" {if:OW.isNotNul("[goods:tagicon]")}style="background-image:url({$site_url}ow-content/uploads/icon/tag/mob-[goods:tagicon].png)"{/if}></span>
                    <div class="thumb"><img src="[goods:thumbnail]" alt="[goods:title]" title="[goods:title]" /></div>
                    <div class="info">
                        <h3 class="title">[goods:title]</h3>
                        <div class="subtitle">[goods:subtitle]</div>
                        <div class="price">{if:OW.int("[goods:point_set]")=1}<span class="point"><b>[goods:point_pay_amount]</b><em>积分</em><i>+</i></span>{/if}<span class="money"><em>{$moneysb}</em><b><%=OW.parsePrice("[goods:price]")%></b></span><span class="unit">[goods:unit]</span></div>
                        {if:OW.int(OW.int("[goods:virtual_sales]")+OW.int("[goods:sales]"))>10}<div class="sales" name="sales" sales="[goods:sales]">销量 <b><%=OW.int("[goods:virtual_sales]")+OW.int("[goods:sales]")%></b></div>{/if}
                    </div>
                    </a>
                </li>
                {/goods:loop}
            </ul>
            {if:OW.int("[goods:count]")>=20}
            <div class="more"><a href="[cate:link]">查看更多</a></div>
            {/if}
            {/goods}
            </section>
        {/cate:loop}
        {/cate}
    </div>
</section>

<!--底部-->
<!--#include file="include.footer.html"-->
<script type="text/javascript">
$(document).ready(function(){
	$sider = $("#ow_cate_sider"),
	$list  = $("#ow_cate_list");
	$sider.find("li").click(function(){
		var cateId = $(this).attr("cate_id");
		$(this).addClass("current");
		$(this).siblings().removeClass("current");
		$list.find("section[cate_id='"+cateId+"']").show();
		$list.find("section[cate_id!='"+cateId+"']").hide();
	});
	$sider.find("li:eq(0)").click();
	$sider.find("ul").css("height",OW.int($sider.height())+20)
	//积分价格
	$(".price").each(function(){
		var price = OW.parseMoney($(this).find(".money > b").html());
		if(!price>0){
			$(this).find(".money").hide();
			$(this).find(".point > i").hide();
		};
	});
});
</script>
<% 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>