<!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">
    <div class="logo"><a href="{$site_url}" title="{$site_name}"><img src="{$config(site_mobile_logo)}" alt="{$site_name}" title="{$site_name}" /></a></div>
    <!--#include file="include.top.nav.html"-->
</header>

<section class="mbody">
    <div class="ow-banner">
        <div id="banner" class="slidebox">
            <div class="header"><ul></ul></div>
            <div class="section">
                <ul><%=OW.echoAdImg("1001","<li i=""{$i}""><a href=""{$link}""><img src=""{$url}"" alt=""{$name}"" title=""{$name}""></a></li>")%></ul>
            </div>
        </div>
    </div>
    <div class="ow-search-section">
        <div class="search-text"><input class="ow-text-search" name="keywords" value="" placeholder="关键词" type="text"><button type="button" class="ow-btn-search" name="btn_search" onclick="OW.search.run(1)">搜索</button></div>
    </div>
    <div class="ow-home-category">
        <ul>
            <li><a href="{$site_hurl}coupon/"><img src="../images/icon/c10.png" alt="优惠券"><span>优惠券</span></a></li>
            <li><a href="{$site_hurl}shop/"><img src="../images/icon/c4.png" alt="商品分类"><span>商品分类</span></a></li>
            <li><a href="{$site_hurl}cart.html"><img src="../images/icon/c7.png" alt="购物车"><span>购物车</span></a></li>
            {if:OW.int("{$config(is_fenxiao_open)}")=1}
            <li><a href="{$site_url}ow-ucenter/?ctl=fenxiao"><img src="../images/icon/c13.png" alt="我的分销"><span>我的分销</span></a></li>
            {else}
            <li><a href="{$site_url}ow-ucenter/?ctl=order_form_data"><img src="../images/icon/c9.png" alt="我的分销"><span>收货地址</span></a></li>
            {/if}
            <li><a href="{$site_url}ow-ucenter/"><img src="../images/icon/c8.png" alt="会员中心"><span>会员中心</span></a></li>
            <li><a href="{$site_url}ow-ucenter/?ctl=orders"><img src="../images/icon/c5.png" alt="我的订单"><span>我的订单</span></a></li>
            <li><a href="{$site_url}ow-ucenter/?ctl=finance"><img src="../images/icon/c14.png" alt="我的余额"><span>我的余额</span></a></li>
            <li><a href="{$site_url}ow-ucenter/?ctl=point"><img src="../images/icon/c11.png" alt="我的积分"><span>我的积分</span></a></li>
        </ul>
    </div>
    <div class="ow-idx-cates">
        {cate is_shop="1" parent_id="0"}
        <ul name="slither">
            {cate:loop}<li class="li[cate:i]"><a href="[cate:link]">[cate:name]</a></li>{/cate:loop}
        </ul>
        {/cate}
    </div>
    <div class="ow-idx-star-goods">
        <div class="header">
            <h2 class="title">{%=OW.DB.getFieldValueBySQL("SELECT [name] FROM ow_position WHERE pos_id=4")%}</h2>
        </div>
        <div class="section">
            {goods top="30" position_id="4"}
            <ul class="ow-goods-vertilist">
                {goods:loop}
                <li class="li[goods:i]">
                    <a href="[goods:link]">
                    <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></div>
                    </div>
                    </a>
                </li>
                {/goods:loop}
            </ul>
            {/goods}
        </div>
    </div>
    
    <div id="ow_floor">
        {cate is_shop="1" parent_id="0"}
        {cate:loop}
        <div class="ow-idx-floor-goods" name="floor_goods">
            <h2 class="floor-hd"><span class="floor-num">[cate:i]F</span><a class="floor-name" href="[cate:link]" target="_blank">[cate:name]</a></h2>
            <div class="floor-bd">
                <ul class="ow-goods-vertilist">
                    {goods top="30" recommend_cate_id="[cate:cate_id]"}
                    {goods:loop}
                    <li class="li[goods:i]">
                        <a href="[goods:link]">
                        <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></div>
                        </div>
                        </a>
                    </li>
                    {/goods:loop}
                    {/goods}
                </ul>
            </div>
        </div>
        {/cate:loop}
        {/cate}
    </div>
    
    <div class="ow-idx-new-goods" id="ow_new_goods">
        <div class="header">
            <h2 class="title">{%=OW.DB.getFieldValueBySQL("SELECT [name] FROM ow_position WHERE pos_id=5")%}</h2>
        </div>
        <div class="section" id="newgoods">
            <div class="case-wrapper">
                {goods top="30" position_id="5"}
                <ul class="ow-new-goods" name="slither">
                    {goods:loop}
                    <li class="li[goods:i]">
                        <a href="[goods:link]">
                        <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></div>
                        </div>
                        </a>
                    </li>
                    {/goods:loop}
                </ul>
                {/goods}
            </div>
        </div>
    </div>
    
    <div class="ow-idx-news">
        <h2 class="header"><span class="ow-more"><a href="{$site_hurl}news/">查看更多</a></span>新闻资讯</h2>
        {content top="10" model="news" position_id="1"}
        <div class="section">
            <ul class="ow-news-list">
            {content:loop}
                {if:OW.int("[content:i]")=1}
                <li class="li[content:i] first"><a href="[content:link]"><div class="thumb"><img src="[content:thumbnail]" alt="[content:title]" title="[content:title]"></div><h3 class="title"><span>[content:title]</span></h3></a></li>
                {else}
                <li class="li[content:i]"><a href="[content:link]"><div class="thumb"><img src="[content:thumbnail]" alt="[content:title]" title="[content:title]"></div><h3 class="title">[content:title]</h3></a></li>
                {/if}
            {/content:loop}
            </ul>
        </div>
        {/content}
    </div>
    
</section>
<!--底部-->
<!--#include file="include.footer.html"-->

<script type="text/javascript">
$(document).ready(function(){
	//栏目菜单
	OW.mobile.menu();
	//banner广告
	if(OW.int($("#banner").find("img").length)>0){
		TouchSlide({ 
			slideCell:"#banner",
			titCell:".header ul",
			mainCell:".section ul", 
			effect:"leftLoop", 
			autoPage:true,//自动分页
			autoPlay:true,//自动播放
			interTime:1000*{%=OW.int(OW.DB.getFieldValueBySQL("SELECT top 1 switch_time FROM ow_ad WHERE ad_id=1001"))%}
		});
	};
	$("div[name='floor_goods']").each(function(){
		var goodsNum = $(this).find("li").length;
		if(goodsNum==0){
			$(this).remove();
		};
	});
	$("ul[name='slither']").each(function(){
		var ulWidth = 0,parDivWidth = OW.int($(this).parent().css("width"));
		$(this).find("li").each(function(){
			ulWidth = ulWidth + OW.int($(this).width()) + OW.int($(this).css("padding-left")) + OW.int($(this).css("padding-right"));
		});
		if(ulWidth==0){
			$(this).hide();
		}else{
			ulWidth = ulWidth + 10;
		};
		if(ulWidth<=parDivWidth){ulWidth=parDivWidth+10;};
		$(this).width(ulWidth);
	});
	//新品
	var $newgoods = $("#newgoods");
	if($newgoods.find("li").length==0){
		$("#ow_new_goods").hide();
	}
	//积分价格
	$(".price").each(function(){
		var price = OW.parseMoney($(this).find(".money > b").html());
		if(!price>0){
			$(this).find(".money").hide();
			$(this).find(".point > i").hide();
		};
	});
	//动态
	if($(".ow-idx-news").find("li").length==0){$(".ow-idx-news").hide();}
});
</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">
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      = '<%=SITE_URL%>' + 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>
