ajaxGoodsList.html 4.28 KB
<foreach name="goods_list" item="vo" key="k">
 <li><a a-href="{:U('Mobile/Goods/goodsInfo',array('stoid'=>$Think.request.stoid,'id'=>$vo[goods_id]))}" class="item" onclick="goproduct(this)">
      <!--  <div class="pic_box bgcover" style="background-image:url('{:getimg($vo['original_img'],NOIMG,0,1)}')"onerror="this.src='__WEBPUBLIC__/miniapp/images/no_cate_def.png'">-->
        <img class="pic_box bgcover" src="{:getimg($vo['original_img'],NOIMG,0,1)} " onerror="this.src='__PUBLIC__/images/not_adv.jpg'" ltimg="{$vo['original_img']}">
            <!--<div class="active_box">
                <if condition="$vo.is_new eq 1"><span  style=" background-position:0px -36px">新品{$vo.is_new}</span>
                <else/>
                <span></span>
                </if>
            </div>-->
            <!--<img src="{:getimg($vo['original_img'],NOIMG,0,1)}">-->
            <div class="com_sales">已售:{$vo.sales_sum}</div>
        </div>
        <div class="goods_info">
            <div class="title_box">{$vo.goods_name}</div>
            <!--未开通美妆和等级-->
            <if condition="$rank_switch!=2 && !$mz_switch">
                <if condition="$vo.prom_integral">
                    <div class="price_box fect_price">
                        <i>{$vo.prom_integral}积分
                            <if condition="$vo.final_price gt 0"> +¥{$vo.final_price}</if>
                        </i>
                    </div>
                    <else/>
                    <div class="price_box">
                        <i>¥{$vo.final_price}</i>
                    </div>
                </if>
                <div class="price_box"><i class="mk_i">¥{$vo.market_price}</i></div>
                <!--开通美妆-->
                <elseif condition="$rank_switch!=2 && $mz_switch"/>
                <include file="public/only_mz"/>
                <!--如果商家只开通等级-->
                <elseif condition="$rank_switch==2 && !$mz_switch"/>
                <include file="public/only_rank"/>
                <!--开通等级和美妆-->
                <else/>
                <include file="public/rank_mz"/>
            </if>
        </div>
        <p class="clear"></p>
    </a>
  </li>
</foreach>
<script>
    $(function(){
        var isshow="<?php echo $mshow ?>";
        if(isshow==0){
            $('#getmore').hide(3);
        }else{
            $('#getmore').show(3);
        }
        <notempty name="filter_price1">
           var prjs={$filter_price1};
           var html="<div class='filtrate_category filtrate_category_price'><a href='javascript:;' class='filtrate_category_a'>价格<span class='up_down'>全部展开</span></a></div><ul class='filtrate_address filtrate_list att_item' style='display: block; -webkit-transform-origin: 0px 0px 0px; opacity: 1; -webkit-transform: scale(1, 1);'>";

            for(v in prjs){
                html+="<li><a onclick='gosorturl(this)'  a-href='"+prjs[v].href+"/stoid/{$Think.request.stoid}'>"+prjs[v].value+"</a></li>";
            }
            html+="<div style='clear:both'></div></ul>";
            $("#ff_price").html(html);

            $('.filtrate_has li').click(function () {
                $(this).find("input").attr("checked", "checked");
                $('.filtrate_has li').removeClass("on");
                $(this).addClass("on");
            })
            $('.filtrate_has1 li').click(function () {
                if ($(this).hasClass("on")) {
                    $(this).find("input").attr("checked", "");
                    $(this).removeClass("on");
                }
                else {
                    $(this).find("input").attr("checked", "checked");
                    $(this).addClass("on");
                }
            })

            $(".filtrate_category_price a").click(function() {
                 $(this).hasClass("filtrate_category_show") ? ($(this).parent().removeClass("fixed"), $(this).parent().next(".filtrate_list").css("margin-top", "0").hide(), $(this).removeClass("filtrate_category_show"),$(this).children("span").html("展开")) : ($(this).parent().removeClass("fixed"), $(this).parent().next(".filtrate_list").show(), $(this).addClass("filtrate_category_show"), $(this).children("span").html("收起"), $(this).parent().next(".filtrate_list").find("li").show())
            })
        </notempty>
    });
</script>