• 页面模板

    页面模板 集中放到/mobile目录下,有几点注意事项

    1、以.html结尾 里面只需要提供纯HTML模板 不用涉及任何css和js 相关业务逻辑统一集中在主控制器中处理

    2、页面模板中最大的容器一定要对应页面ID 用于判断是否加载过该页面 如果加载过 就从缓存中取 没有加载过 就加载

    首页模板

    <div id="index" class="view-content">
        <div class="content">
            <div class="cfocus cfocus1" style="height: 160px;" half="true">
                <ul class="box">
                    <li class="item"><a href="/?page=classify"><img src="/img/1.jpg" /></a></li>
                    <li class="item"><a href="/?page=classify"><img src="/img/2.jpg" /></a></li>
                </ul>
                <div class="page"></div>
            </div>
            <ul class="ullist">
                <li class="p82"><a class="li_jade" href="/?page=product&classid=22">
                    <i class="icon-leaf "></i><font>洗发水</font></a></li>
                <li class="p64"><a class="li_green" href="/?page=product&classid=23">
                    <i class="icon-lemon"></i><font>护发素</font></a></li>
            </ul>
            <div class="clear10"></div>
            <ul class="list">
                <li>
                    <a href="/?page=productinfo&amp;productid=13&amp;id=13">
                        <img alt="汰渍洗衣粉净白去渍柠檬清新型 2.8kg/袋" src="http://bcs.duapp.com/ycserver%2F1423975526104.jpg">
                        <h6>汰渍洗衣粉净白去渍柠檬清新型 2.8kg/袋</h6>
                    </a>
                    <a class="buynow" href="/?page=productbuy&amp;productid=13&amp;id=13"><i class="icon-plus-sign"></i></a>
                    <span class="money">19.50</span>
                </li>
                <li>
                    <a href="/?page=productinfo&amp;productid=12&amp;id=12">
                        <img alt="汰渍 薰衣草洗衣粉 洁净薰香香氛3千克/袋" src="http://bcs.duapp.com/ycserver%2F1423976377084.jpg">
                        <h6>汰渍 薰衣草洗衣粉 洁净薰香香氛3千克/袋</h6>
                    </a>
                    <a class="buynow" href="/?page=productbuy&amp;productid=12&amp;id=12"><i class="icon-plus-sign"></i></a>
                    <span class="money">27.60</span>
                </li>
            </ul>
        </div>
    </div>

    产品列表模板

    <div id="product" class="view-content">
        <div class="content">
            <ul id="productlist" class="list" style="display: none;"
                cmd-select="/front/product/query" pulltorefresh="true" clearurlpara="true" pagesize="8">
                <li>
                    <a href="/?page=productinfo&productid={{productid}}&id={{productid}}">
                        <img alt="{{productname}}" src="{{defaultimage}}" />
                        <h6>{{productname}}</h6>
                    </a>
                    <a class="buynow"  href="/?page=productbuy&productid={{productid}}&id={{productid}}">
                        <i class="iconfont">&#xe641;</i></a>
                    <span class="money">{{defaultprice}}</span>
                </li>
            </ul>
        </div>
    </div>

    产品详情模板

    <div id="productinfo" class="view-content">
        <div class="content">
            <form id="productdetail" class="cform" style="display: none;"
                istemplate="true" getcallback="zjs.productinfo.getcallback()" cmd-select="/front/productfront/query">
                <input id="standardid" type="hidden" />
                <div class="row" style="margin-bottom:50px;">
                    <div class="c6">
                        <div id="ImagesBox" class="cfocus">
                            <!--幻灯片-->
                            <ul class="box">
                            </ul>
                            <div class="page"></div>
                        </div>
                    </div>
                    <div class="c6 p10">
                        <h3>{{productname}}</h3>
                        <a class="fr mr10 share"><i class="iconfont">&#xe66a;</i>分享</a>
                        <span class="money productmoney">{{defaultprice}}</span>
                        <tt class="deletelist"><span class="delete">{{referenceprice}}</span></tt>
                        <table id="ParametersBox" border="0" cellpadding="0" cellspacing="5">
                        </table>
                        <div id="Introduction">
                            {{productinfo}}
                        </div>
                    </div>
                </div>
                <div class="navbtn">
                    <a id="goproductbuy" class="btn c12" href="/?page=productbuy&productid={{productid}}&id={{productid}}">
                        <i class="iconfont">&#xe62a;</i>&nbsp;加入购物车</a>
                </div>
            </form>
        </div>
    </div>

继续阅读

    uiZjs