Blame view

apps/product/views/action/detail.hbs 5.97 KB
张丽霞 authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
{{# result}}
<div class="good-detail-page yoho-page">
    <div class="banner-container">
        <div class="tag-container">
            {{# tags}}
                {{# is_new}}
                    <p class="good-tag new-tag">NEW</p>
                {{/ is_new}}
                {{# is_advance}}
                    <p class="good-tag renew-tag">再到着</p>
                {{/ is_advance}}
                {{# is_discount}}
                    <p class="good-tag sale-tag">SALE</p>
                {{/ is_discount}}
                {{# is_yohood}}
                    <div class="good-tag running-man-tag">跑男同款</div>
                {{/ is_yohood}}
                {{# is_limited}}
                    <p class="good-tag limit-tag">限量商品</p>
                {{/ is_limited}}
                {{# is_soon_sold_out}}
张丽霞 authored
22
                    <p class="good-tag soon-sold-out-tag">即将售罄</p>
张丽霞 authored
23 24 25 26
                {{/ is_soon_sold_out}}
            {{/ tags}}
        </div>
        {{# bannerTop}}
张丽霞 authored
27
        {{> product/banner-swiper-arrow}}
张丽霞 authored
28 29 30
        {{/ bannerTop}}
    </div>
    {{# goodsName}}
张丽霞 authored
31
    <h2 class="goods-name"><span>{{.}}</span></h2>
张丽霞 authored
32 33 34
    {{/ goodsName}}

    {{# goodsSubtitle}}
张丽霞 authored
35
    <h1 class="goods-subtitle"><span>{{.}}</span></h1>
张丽霞 authored
36 37 38 39
    {{/ goodsSubtitle}}

    <div class="price-date">
        {{# goodsPrice}}
40
        <div class="goods-price">
张丽霞 authored
41 42
            <h1 class="current-price">{{currentPrice}}</h1>
            <h1 class="previous-price">{{previousPrice}}</h1>
张丽霞 authored
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
        </div>
        {{/ goodsPrice}}

        {{^ noLimitGoodsBtn}}
            {{#if canGetLimitCode}}
                <button class="limit-sale" id='limit-sale'>获取限购码</button>
            {{/if}}

            {{#if codeEmpty}}
                <button class="got-limit-sale">限购码已被抢光</button>
            {{/if}}

            {{#if gotCode}}
                <button class="got-limit-sale">已获取限购码</button>
            {{/if}}
        {{/noLimitGoodsBtn}}

        {{#if periodOfMarket}}
61
        <div class="period-of-market">
张丽霞 authored
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
            <h1>上市期:</h1>
            <h1 >{{periodOfMarket}}</h1>
        </div>
        {{/if}}
    </div>

    {{# vipLevel}}
    <ul class="vip-level clearfix">
        {{# list}}
        <li class="icons-item {{#if currentLevel}}current-level{{/if}}">
            <span class="vip-img " style="background-size:contain;">
            </span>
            <span class="vip-price ">{{text}}</span>
        </li>
        {{/ list}}
    </ul>
    {{/vipLevel}}

    {{# goodsDiscount}}
81
    <div class="goods-discount" id="goodsDiscount">
张丽霞 authored
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
        {{# list}}
        {{#if @first}}
        {{#if text}}
        <h1 class="first-item short-text tap-hightlight">{{text}}<span class="icon-down iconfont dropdown">&#xe609;</span></h1>
        {{/if}}
        {{/if}}
        {{/ list}}
        <div class="discount-folder">
        {{# list}}
        {{#if @first}}
        {{else}}
        {{#if text}}
        <h1 class="folder-item tap-hightlight">{{text}}</h1>
        {{/if}}
        {{/if}}
        {{/list}}
        </div>
    </div>
    {{/ goodsDiscount}}

    {{# feedbacks}}
    <div class="feedback-list ">
      {{#if commentsNum}}
        {{> product/feedback-tab}}
      {{else}}
        {{#if consultsNum}}
          {{> product/feedback-tab}}
        {{else}}
        <div class="nodata tap-hightlight" id="goto-consult">
            <span>暂无商品评价和咨询</span>
            <a href="{{consultsUrl}}" class="go-consult">我要咨询<span class="iconfont">&#xe604;</span></a>
        </div>
        {{/if}}
      {{/if}}
    </div>
    {{/ feedbacks}}

    {{# enterStore}}
    <div id="enter-store" class="enter-store page-block tap-hightlight">
        <a class="store-logo" href="{{url}}" style="">
            <img class="lazy" data-original="{{img}}" alt="{{storeName}}">
        </a>
        <a class="store-name" href="{{url}}">{{storeName}}</a>
        <a class="store-link" href="{{url}}">进入店铺<span class="iconfont">&#xe604;</span></a>
    </div>
    {{/ enterStore}}

    <div id="productDesc"> </div>
张丽霞 authored
130 131
    {{> product/recommend-for-you}}
    {{> cart/chose-panel}}
张丽霞 authored
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187

    {{#cartInfo}}
    <div class="cart-bar">
        <a href="{{cartUrl}}" class="num-incart iconfont"><span class="num-tag hide"></span>&#xe62c;</a>

        {{#if addToCartUrl}}
           <!--  <a  id="addtoCart" href="{{addToCartUrl}}"  class="addto-cart">加入购物车</a> -->
           <a id="addtoCart" href="javascript:;" class="addto-cart">加入购物车</a>
        {{/if}}

        {{#if soldOut}}
            <a href="javascript:;" class="sold-out">已售罄</a>
        {{/if}}

        {{#if notForSale}}
            <a href="javascript:;" class="sold-out">非卖品</a>
        {{/if}}

        {{#if limitNotForSale}}
            <a href="javascript:;" class="sold-out limit">即将发售</a>
        {{/if}}

        {{#if canBuyLimit}}
            <a href="javascript:;" id="addtoCart" class="addto-cart">立即购买</a>
        {{/if}}

        {{#if noLimitCode}}
            <a href="javascript:;" class="sold-out limit">立即购买</a>
        {{/if}}
        <input type="hidden" id="limitCodeUrl" name="limitCodeUrl" value="{{limitCodeUrl}}">
        <input type="hidden" id="limitProductPay" name="limitProductPay" value="{{limitProductPay}}">
        {{#limitProductCode}}
        <input type="hidden" id="limitProductCode" name="limitProductCode" value="{{.}}">
        {{/limitProductCode}}

        <a href="javascript:;" id="likeBtn" class="favorite iconfont {{#isCollect}}liked{{/isCollect}}">&#xe605;</a>
    </div>
    {{/cartInfo}}
    {{#if introUrl}}
    <input id="introUrl" type="hidden" value="{{introUrl}}">
    {{/if}}
    {{#if id}}
    <input id="productId" type="hidden" value="{{id}}">
    {{/if}}
    {{#if preferenceUrl}}
    <input id="preferenceUrl" type="hidden" value="{{preferenceUrl}}">
    {{/if}}

    <input id="productSkn" type="hidden" value="{{productSkn}}">

    {{#loginUrl}}
    <input type="hidden" name="loginUrl" id="loginUrl" value="{{.}}">
    {{/loginUrl}}

</div>
{{/ result}}