Authored by xuqi

Review by:@刘玥

@@ -588,38 +588,10 @@ @@ -588,38 +588,10 @@
588 } 588 }
589 } 589 }
590 590
591 -## Passport  
592 -  
593 -### 【公用】左侧YohoFamily LOGO  
594 -  
595 - {  
596 - coverHref: '', //跳转链接,需要有跳转就传,不需要就不传  
597 - coverImg: '' //图片地址  
598 - }  
599 -  
600 -### 登录页  
601 -  
602 - {  
603 - passport: {  
604 - coverHref: '', //跳转链接,需要有跳转就传,不需要就不传  
605 - coverImg: '' //图片地址  
606 -  
607 - countryCode: '86', //无+  
608 - countryName: '中国',  
609 -  
610 - countryList: [  
611 - {  
612 - code: '',  
613 - name: ''  
614 - },  
615 - ...  
616 - ]  
617 - }  
618 - }  
619 -  
620 ## 逛 591 ## 逛
621 592
622 ### 【公用】资讯 593 ### 【公用】资讯
  594 +
623 { 595 {
624 id: '', 596 id: '',
625 classification: '最新', 597 classification: '最新',
@@ -813,7 +785,36 @@ @@ -813,7 +785,36 @@
813 } 785 }
814 } 786 }
815 787
816 -## 注册页 788 +## Passport
  789 +
  790 +### 【公用】左侧YohoFamily LOGO
  791 +
  792 + {
  793 + coverHref: '', //跳转链接,需要有跳转就传,不需要就不传
  794 + coverImg: '' //图片地址
  795 + }
  796 +
  797 +### 登录页
  798 +
  799 + {
  800 + passport: {
  801 + coverHref: '', //跳转链接,需要有跳转就传,不需要就不传
  802 + coverImg: '' //图片地址
  803 +
  804 + countryCode: '86', //无+
  805 + countryName: '中国',
  806 +
  807 + countryList: [
  808 + {
  809 + code: '',
  810 + name: ''
  811 + },
  812 + ...
  813 + ]
  814 + }
  815 + }
  816 +
  817 +### 注册页
817 818
818 { 819 {
819 registerPage: true, //用于加载js 820 registerPage: true, //用于加载js
@@ -894,7 +895,4 @@ @@ -894,7 +895,4 @@
894 } 895 }
895 } 896 }
896 ] 897 ]
897 -}  
898 -一键海淘  
899 -值得买  
900 -我的收藏 898 +}
  1 +{{> layout/header}}
  2 +<div class="product-detail-page yoho-page">
  3 + {{# detail}}
  4 + {{# banner}}
  5 + <div class="brand-banner" style="background:{{bgColor}}{{#if bgImg}} url({{bgImg}}){{/if}}">
  6 + <div class="center-content clearfix">
  7 + <a class="pull-left" href="{{homeUrl}}">
  8 + <img src="{{logo}}" alt="{{alt}}">
  9 + </a>
  10 +
  11 + <div class="opt pull-right">
  12 + <a class="home" href="{{homeUrl}}">
  13 + <span class="iconfont">&#xe617;</span>
  14 + </a>
  15 + <span id="brand-favour" class="brand-fav">
  16 + <i class="iconfont{{#if coled}} coled{{/if}}">&#xe616;</i>
  17 + </span>
  18 + </div>
  19 + </div>
  20 + </div>
  21 + {{/ banner}}
  22 +
  23 + <div class="center-content">
  24 + {{> layout/path-nav}}
  25 +
  26 + {{# goodInfo}}
  27 + <div class="main clearfix" data-skn="{{skn}}">
  28 + <div class="pull-left imgs clearfix">
  29 + <div class="pull-left img">
  30 + <div class="tags clearfix">
  31 + {{# tags}}
  32 + {{# isNew}}
  33 + <span class="good-tag new-tag">NEW</span>
  34 + {{/ isNew}}
  35 + {{# isReNew}}
  36 + <span class="good-tag renew-tag">再到着</span>
  37 + {{/ isReNew}}
  38 + {{# isSale}}
  39 + <span class="good-tag sale-tag">SALE</span>
  40 + {{/ isSale}}
  41 + {{# isNewFestival}}
  42 + <span class="good-tag new-festival-tag">新品节</span>
  43 + {{/ isNewFestival}}
  44 + {{# isLimit}}
  45 + <span class="good-tag limit-tag">限量商品</span>
  46 + {{/ isLimit}}
  47 + {{# isYearEndPromotion}}
  48 + <span class="good-tag yep-tag">年终大促</span>
  49 + {{/ isYearEndPromotion}}
  50 + {{# isYearMidPromotion}}
  51 + <span class="good-tag ymp-tag">年中热促</span>
  52 + {{/ isYearMidPromotion}}
  53 + {{# isFew}}
  54 + <p class="good-tag few-tag">即将售罄</p>
  55 + {{/ isFew}}
  56 + {{/ tags}}
  57 + </div>
  58 + <img id="img-show" class="img-show" src="{{img}}">
  59 + </div>
  60 + <div id="thumbs" class="pull-right thumbs">
  61 + {{# colors}}
  62 + <div class="thumb-wrap{{#unless focus}} hide{{/unless}}">
  63 + {{#if focus}}
  64 + {{# thumbs}}
  65 + <a href="{{url}}">
  66 + <img class="thumb" src="{{img}}" data-shower="{{shower}}">
  67 + </a>
  68 + {{/ thumbs}}
  69 + {{^}}
  70 + {{# thumbs}}
  71 + <a href="{{url}}">
  72 + <img class="thumb lazy" data-original="{{img}}" data-shower="{{shower}}">
  73 + </a>
  74 + {{/ thumbs}}
  75 + {{/if}}
  76 + </div>
  77 + {{/ colors}}
  78 + </div>
  79 + </div>
  80 + <div class="pull-right infos">
  81 + <p class="name">
  82 + {{name}}
  83 + </p>
  84 + <a class="brand-name" href="{{brandUrl}}">{{brandName}}</a>
  85 + <p class="market-price {{#if salePrice}}with-sale{{/unless}}">
  86 + <span class="title">市场价:</span>
  87 + <span class="price">¥{{marketPrice}}</span>
  88 + </p>
  89 + {{#if salePrice}}
  90 + <p class="sale-price">
  91 + <span class="title">促销价:</span>
  92 + <span class="price">¥{{salePrice}}</span>
  93 + </p>
  94 + {{/if}}
  95 +
  96 + {{#if activity}}
  97 + <ul class="activity">
  98 + {{#each activity}}
  99 + <li>
  100 + {{#if sizeImg}}
  101 + <a class="img-link" href="{{url}}">
  102 + <img src="{{sizeImg}}">
  103 + </a>
  104 + {{^}}
  105 + <span class="ac-type">{{type}}</span>
  106 + <span class="ac-des">【{{des}}】</span>
  107 + {{/if}}
  108 + </li>
  109 + {{/each}}
  110 + </ul>
  111 + {{/if}}
  112 +
  113 + <div class="trade-content">
  114 + <div id="type-chose" class="type-chose">
  115 + <div class="chose-color row clearfix">
  116 + <span class="title pull-left">选颜色:</span>
  117 + <ul class="colors pull-left clearfix">
  118 + {{#each colors}}
  119 + <li class="{{#if focus}}focus{{/if}} {{#if disable}}disable{{/if}} pull-left" title="{{title}}">
  120 + <img src="{{src}}">
  121 + </li>
  122 + {{/each}}
  123 + </ul>
  124 + </div>
  125 +
  126 + <div class="chose-size row clearfix">
  127 + <span class="title pull-left">选尺码:</span>
  128 +
  129 + <div id="sizes" class="size-wrapper pull-left clearfix">
  130 + {{#each colors}}
  131 + <ul class="size {{#unless focus}}hide{{/unless}} clearfix">
  132 + {{#each size}}
  133 + <li {{#unless num}}class="disable"{{/unless}} data-title="{{title}}" data-sku="{{sku}}" data-num="{{num}}">{{name}}</li>
  134 + {{/each}}
  135 + </ul>
  136 + {{/each}}
  137 + <span class="size-ruler"></span>
  138 +
  139 + <span class="size-warn warn-tip hide">
  140 + <i class="iconfont">&#xe62c;</i>
  141 + 请选择尺码
  142 + </span>
  143 +
  144 + <p class="color-size-tip hide"></p>
  145 + </div>
  146 + </div>
  147 +
  148 + <div class="chose-count row clearfix">
  149 + <span class="title pull-left">选数量:</span>
  150 + <div class="num-wraper pull-left clearfix">
  151 + <span id="num" class="num pull-left">1</span>
  152 + <span class="minus-plus pull-left">
  153 + <i id="plus-num" class="plus iconfont">&#xe610;</i>
  154 + <i id="minus-num" class="minus iconfont">&#xe600;</i>
  155 + </span>
  156 + <span id="num-warn" class="num-warn warn-tip hide">
  157 + <i class="iconfont">&#xe62c;</i>
  158 + 库存不足
  159 + </span>
  160 + </div>
  161 + </div>
  162 +
  163 + <p class="row">
  164 + <span id="add-to-cart" class="add-to-cart">
  165 + <i class="iconfont">&#xe628;</i>
  166 + 添加到购物车
  167 + </span>
  168 +
  169 + <span id="sold-out" class="sold-out hide">
  170 + <i class="iconfont">&#xe62d;</i>
  171 + 已售罄
  172 + </span>
  173 +
  174 + <span id="collect-product" class="{{#if coled}}coled {{/if}}collect-product">
  175 + <i class="iconfont">&#xe616;</i>
  176 + {{#if coled}}
  177 + <em>已收藏</em>
  178 + {{^}}
  179 + <em>收藏商品</em>
  180 + {{/if}}
  181 + </span>
  182 + </p>
  183 +
  184 + <p class="share-row">
  185 + <span class="title pull-left">分享商品:</span>
  186 + <span class="share-wrapper pull-left clearfix">
  187 + <i class="weibo" data-type="weibo" title="分享到新浪微博"></i>
  188 + <i class="weixin" data-type="weixin" title="分享到微信朋友圈"></i>
  189 + <i class="qweibo" data-type="qweibo" title="分享到腾讯微博"></i>
  190 + <i class="qzone" data-type="qzone" title="分享到QQ空间"></i>
  191 + <i class="qq" data-type="qq" title="分享到QQ好友"></i>
  192 + <i class="renren" data-type="renren" title="分享到人人"></i>
  193 + <i class="douban" data-type="douban" class="分享到豆瓣"></i>
  194 + </span>
  195 + </p>
  196 + </div>
  197 +
  198 + <div id="balance" class="balance">
  199 + <p class="success-tip">商品已成功添加到购物车!</p>
  200 + <p class="cart-total">购物车一共有<span id="cart-num">0</span>件商品</p>
  201 + <p class="balance-btns">
  202 + <a class="go-cart" href="{{goCartUrl}}">
  203 + 去购物车结算
  204 + <i class="iconfont">&#xe601;</i>
  205 + </a>
  206 +
  207 + <span id="keep-shopping" class="keep-shopping">
  208 + 继续购物
  209 + </span>
  210 + </p>
  211 + </div>
  212 + </div>
  213 + </div>
  214 + </div>
  215 + {{/ goodInfo}}
  216 +
  217 + <div class="other-infos">
  218 + <div class="description-material info-block">
  219 + <p class="block-title">
  220 + <span class="title cur">商品信息 DESCRIPTION</span>
  221 + <span class="sep">|</span>
  222 + <span class="title">材质洗涤 MATERIALS</span>
  223 + </p>
  224 + <div class="description-content">
  225 + {{# description}}
  226 + <ul class="basic clearfix">
  227 + {{# basic}}
  228 + <li>
  229 + {{key}}: {{value}}
  230 + </li>
  231 + {{/ basic}}
  232 + </ul>
  233 + {{#if comfort}}
  234 + <ul class="comfort clearfix">
  235 + {{# comfort}}
  236 + <li class="pull-left">
  237 + <span class="comfort-title">{{name}}:</span>
  238 + <span class="min-des">{{minDes}}</span>
  239 + {{# blocks}}
  240 + <span class="comfort-block {{#if cur}}cur{{/if}}"></span>
  241 + {{/ blocks}}
  242 + <span class="max-des">{{maxDes}}</span>
  243 + </li>
  244 + {{/ comfort}}
  245 + </ul>
  246 + {{/if}}
  247 + {{/ description}}
  248 + </div>
  249 + <div class="material-content">
  250 + {{# material}}
  251 + {{#if detail}}
  252 + <ul class="material-detail clearfix">
  253 + {{# detail}}
  254 + <li>
  255 + <img src="{{img}}">
  256 + <p class="name">{{name}}<br>{{enName}}</p>
  257 + <p class="text">{{text}}</p>
  258 + </li>
  259 + {{/ detail}}
  260 + </ul>
  261 + {{/if}}
  262 +
  263 + {{#if wash}}
  264 + <ul class="wash">
  265 + {{# wash}}
  266 + <li>
  267 + <img class="wash-icon" src="{{img}}">
  268 + <p class="wash-name">{{name}}</p>
  269 + </li>
  270 + {{/ wash}}
  271 + </ul>
  272 + {{/if}}
  273 + {{/ material}}
  274 + </div>
  275 + </div>
  276 + <div class="size-info info-block">
  277 + <p class="block-title">
  278 + <span class="title cur">尺码信息 SIZE INFO</span>
  279 + </p>
  280 + {{# size}}
  281 + <table class="size-table">
  282 + <thead>
  283 + <tr>
  284 + {{# thead}}
  285 + <th width="{{width}}">{{name}}</th>
  286 + {{/ thead}}
  287 + </tr>
  288 + </thead>
  289 + <tbody>
  290 + {{# tbody}}
  291 + <tr>
  292 + {{#each .}}
  293 + <td>{{.}}</td>
  294 + {{/each}}
  295 + </tr>
  296 + {{/ tbody}}
  297 + </tbody>
  298 + </table>
  299 + <p class="size-tip">
  300 + 以上尺寸为实物人工测量,因测量方式不同会有1-2CM误差,相关数据仅作参考,以收到实物为准。 单位:CM
  301 + </p>
  302 + <p class="size-tip">
  303 + 参考尺码因衣服版型、剪裁不同会有误差,仅供参考
  304 + </p>
  305 + {{#if sizeImg}}
  306 + <img class="size-img" src="{{sizeImg}}">
  307 + {{/if}}
  308 + {{/ size}}
  309 + </div>
  310 +
  311 + {{#if reference}}
  312 + <div class="reference info-block">
  313 + <p class="block-title">
  314 + <span class="title cur">模特试穿 REFERENCE</span>
  315 + </p>
  316 + {{# reference}}
  317 + <table class="reference-table">
  318 + <thead>
  319 + <tr>
  320 + {{# thead}}
  321 + <th width="{{width}}">{{name}}</th>
  322 + {{/ thead}}
  323 + </tr>
  324 + </thead>
  325 + <tbody>
  326 + {{# tbody}}
  327 + <tr>
  328 + {{#each .}}
  329 + <td>
  330 + {{#if @first}}
  331 + <img class="avatar" src="{{.}}">
  332 + {{^}}
  333 + {{.}}
  334 + {{/if}}
  335 + </td>
  336 + {{/each}}
  337 + </tr>
  338 + {{/ tbody}}
  339 + </tbody>
  340 + </table>
  341 + {{/ reference}}
  342 + <p class="size-tip">
  343 + 模特试穿中身高单位:CM,体重单位:KG,三围单位:CM
  344 + </p>
  345 + </div>
  346 + {{/if}}
  347 +
  348 + <div class="details info-block">
  349 + <p class="block-title">
  350 + <span class="title cur">商品详情 DETAILS</span>
  351 + </p>
  352 + <div class="details-html">
  353 + {{{details}}}
  354 + </div>
  355 + </div>
  356 +
  357 + {{# consultComment}}
  358 + <div class="consult-comment info-block">
  359 + <p class="block-title">
  360 + <span class="title">顾客咨询({{consultNum}})</span>
  361 + <span class="sep">|</span>
  362 + <span class="title cur">购买评价({{commentNum}})</span>
  363 + </p>
  364 + <div class="comments cc-content">
  365 + <h2>购买评价({{commentNum}})</h2>
  366 + <ul id="comments-ul">
  367 + {{# comments}}
  368 + <li>
  369 + <div class="user-info clearfix">
  370 + <img class="user-avatar pull-left" src="{{avatar}}">
  371 + <p>
  372 + <span class="name">{{userName}} </span>
  373 + 购买了{{color}}/{{size}}
  374 + <br>
  375 + <span class="date">{{date}}</span>
  376 + </p>
  377 + </div>
  378 + <p class="comment">{{comment}}</p>
  379 + </li>
  380 + {{/ comments}}
  381 + </ul>
  382 + {{#if hasMoreComments}}
  383 + <p class="more-wrap">
  384 + <span class="load-more-comments load-more">
  385 + 加载更多
  386 + <i class="iconfont">&#xe61d;</i>
  387 + </span>
  388 + </p>
  389 + {{/if}}
  390 + <p class="btn-wrap">
  391 + <a class="btn" href="{{commentUrl}}" target="_blank">
  392 + <i class="iconfont">&#xe62a;</i>
  393 + 我要评论
  394 + </a>
  395 + </p>
  396 + </div>
  397 +
  398 + <div class="consults cc-content">
  399 + <h2>顾客咨询({{consultNum}})</h2>
  400 + <ul id="consults-ul">
  401 + {{# consults}}
  402 + <li>
  403 + <div class="user-info clearfix">
  404 + <img class="user-avatar" src="{{avatar}}">
  405 + <p>
  406 + <span class="question">{{question}}</span>
  407 + <br>
  408 + <span class="date">{{date}}</span>
  409 + </p>
  410 + </div>
  411 + <p class="consult">{{answer}}</p>
  412 + </li>
  413 + {{/ consults}}
  414 + </ul>
  415 + {{#if hasMoreConsults}}
  416 + <p class="more-wrap">
  417 + <span class="load-more-consults load-more">
  418 + 加载更多
  419 + <i class="iconfont">&#xe61d;</i>
  420 + </span>
  421 + </p>
  422 + {{/if}}
  423 + <p class="btn-wrap">
  424 + <span id="consults-btn" class="btn">
  425 + <i class="iconfont">&#xe62a;</i>
  426 + 我要咨询
  427 + </span>
  428 + </p>
  429 + <div class="new-consult hide">
  430 + <textarea class="my-consult"></textarea>
  431 + <span class="consult-warn warn-tip hide">
  432 + <i class="iconfont">&#xe62c;</i>
  433 + 请输入咨询内容
  434 + </span>
  435 + <div class="captcha-row">
  436 + <input class="captcha" type="text">
  437 + <img class="captcha-img" src="http://www.yohobuy.com/passport/images?g=consult">
  438 + <span class="captcha-warn warn-tip hide">
  439 + <i class="iconfont">&#xe62c;</i>
  440 + <em>请输入验证码</em>
  441 + </span>
  442 + </div>
  443 + <span id="submit-consult" class="btn submit-consult">提交咨询</span>
  444 + </div>
  445 +
  446 + <div class="consult-success hide">
  447 + <p>
  448 + <span class="iconfont">&#xe61a;</span>
  449 + 咨询成功,请等待客服回复
  450 + </p>
  451 + </div>
  452 + </div>
  453 + </div>
  454 + {{/ consultComment}}
  455 +
  456 + <div class="after-service">
  457 + <p id="after-service-switch" class="after-service-switch">
  458 + <span class="iconfont">&#xe62b;</span>
  459 + 售后服务
  460 + <span class="iconfont triangle">&#xe604;</span>
  461 + </p>
  462 + <div class="after-service-content info-block">
  463 + <div class="block-title">
  464 + <span class="title cur">售后服务 AFTER SERVICE</span>
  465 + </div>
  466 + <div class="img-1"></div>
  467 + <div class="img-2"></div>
  468 + <div class="text">
  469 + <h4>退换货承诺</h4>
  470 + <p>自您签收商品7日内可以退货,15日内可以换货,在商品不影响二次销售的情况下,YOHO!有货将为您办理退换货服务,请在网站提交"退换货"申请。需要说明的是:非质量问题的退换货,来回运费由您承担。</p>
  471 + <h4>退换货方式</h4>
  472 + <p>
  473 + 针对国内大中型城市,YOHO!有货开通了<span class="orange">"上门换货"</span>服务,上门服务区域及费用请联系客服中心;若您所在的区域不在上门换货范围内,请您选择普通快递将商品、内包装、赠品及发货单等一并寄回。质量问题的退换货,目前不支持运费到付款业务,请您先垫付运费寄回。如需退换货,请致电客服电话:400-889-9646
  474 + </p>
  475 + <h4>退换货邮寄地址</h4>
  476 + <p>
  477 + 南京市江宁区江宁经济技术开发区苏源大道87号YOHO!有货物流中心东一楼 收件人:YOHO!有货 邮编:211106
  478 + <br>
  479 + YOHO!有货客服热线:400-889-9646  客服邮箱:<a href="mailto:service@yoho.cn">service@yoho.cn</a>
  480 + <br>
  481 + 有疑问请联系我们,我们将为您提供最优质的产品和服务。
  482 + </p>
  483 + </div>
  484 + </div>
  485 + </div>
  486 +
  487 + <div class="service"></div>
  488 +
  489 + <div class="info-block">
  490 + <p class="block-title">
  491 + <span class="title cur">最近浏览 RECENT REVIEW</span>
  492 + </p>
  493 + <ul class="recent-view clearfix">
  494 + {{# recentView}}
  495 + <li>
  496 + <a href="{{url}}">
  497 + <img src="{{img}}">
  498 + </a>
  499 + <a class="name" href="{{url}}">{{name}}</a>
  500 + <p class="price">
  501 + <span class="market-price {{#if salePrice}}has-sale{{/if}}">¥{{marketPrice}}</span>
  502 + {{#if salePrice}}
  503 + <span class="sale-price">¥{{salePrice}}</span>
  504 + {{/if}}
  505 + </p>
  506 + </li>
  507 + {{/ recentView}}
  508 + </ul>
  509 + </div>
  510 + </div>
  511 + </div>
  512 + {{/ detail}}
  513 +</div>
  514 +{{> layout/footer}}
@@ -26,6 +26,13 @@ @@ -26,6 +26,13 @@
26 </script> 26 </script>
27 {{/if}} 27 {{/if}}
28 28
  29 +{{!-- 商品详情页 --}}
  30 +{{#if productDetailPage}}
  31 + <script>
  32 + seajs.use('js/product/item');
  33 + </script>
  34 +{{/if}}
  35 +
29 {{!-- 逛 --}} 36 {{!-- 逛 --}}
30 {{#if guangIndexPage}} 37 {{#if guangIndexPage}}
31 <script> 38 <script>
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3 <svg xmlns="http://www.w3.org/2000/svg"> 3 <svg xmlns="http://www.w3.org/2000/svg">
4 <metadata> 4 <metadata>
5 -Created by FontForge 20120731 at Wed Dec 16 20:00:14 2015 5 +Created by FontForge 20120731 at Wed Dec 23 15:19:53 2015
6 By Ads 6 By Ads
7 </metadata> 7 </metadata>
8 <defs> 8 <defs>
@@ -19,7 +19,7 @@ Created by FontForge 20120731 at Wed Dec 16 20:00:14 2015 @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Wed Dec 16 20:00:14 2015
19 bbox="0 -214 1172.1 864" 19 bbox="0 -214 1172.1 864"
20 underline-thickness="50" 20 underline-thickness="50"
21 underline-position="-100" 21 underline-position="-100"
22 - unicode-range="U+0078-E627" 22 + unicode-range="U+0078-E62E"
23 /> 23 />
24 <missing-glyph horiz-adv-x="374" 24 <missing-glyph horiz-adv-x="374"
25 d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> 25 d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
@@ -134,5 +134,30 @@ q14 5 23 14.5t12 20.5t3 23t-3.5 22t-8.5 18t-10 11zM0 295v-380q0 -28 20 -48.5t49 @@ -134,5 +134,30 @@ q14 5 23 14.5t12 20.5t3 23t-3.5 22t-8.5 18t-10 11zM0 295v-380q0 -28 20 -48.5t49
134 <glyph glyph-name="uniE627" unicode="&#xe627;" horiz-adv-x="1025" 134 <glyph glyph-name="uniE627" unicode="&#xe627;" horiz-adv-x="1025"
135 d="M512 623q-167 0 -304.5 -89.5t-205.5 -236.5q-4 -9 0 -18q45 -96 121 -169.5t177 -115t212 -41.5q167 0 304.5 89.5t205.5 236.5q1 3 1.5 6t0 6t-1.5 6q-68 147 -205.5 236.5t-304.5 89.5zM512 57q-96 0 -163.5 67.5t-67.5 163.5t67.5 163.5t163.5 67.5t163.5 -67.5 135 d="M512 623q-167 0 -304.5 -89.5t-205.5 -236.5q-4 -9 0 -18q45 -96 121 -169.5t177 -115t212 -41.5q167 0 304.5 89.5t205.5 236.5q1 3 1.5 6t0 6t-1.5 6q-68 147 -205.5 236.5t-304.5 89.5zM512 57q-96 0 -163.5 67.5t-67.5 163.5t67.5 163.5t163.5 67.5t163.5 -67.5
136 t67.5 -163.5q0 -47 -18.5 -89.5t-49.5 -73.5t-73.5 -49.5t-89.5 -18.5zM364 288q0 -61 43.5 -104.5t104.5 -43.5t104.5 43.5t43.5 104.5t-43.5 104.5t-104.5 43.5t-104.5 -43.5t-43.5 -104.5z" /> 136 t67.5 -163.5q0 -47 -18.5 -89.5t-49.5 -73.5t-73.5 -49.5t-89.5 -18.5zM364 288q0 -61 43.5 -104.5t104.5 -43.5t104.5 43.5t43.5 104.5t-43.5 104.5t-104.5 43.5t-104.5 -43.5t-43.5 -104.5z" />
  137 + <glyph glyph-name="uniE628" unicode="&#xe628;"
  138 +d="M482 83q-24 0 -41.5 -17.5t-17.5 -42.5t17.5 -42.5t42 -17.5t42 17.5t17.5 42.5q0 16 -8 30t-21.5 22t-30.5 8zM769 83q-25 0 -42.5 -17.5t-17.5 -42.5q0 -16 8 -30t21.5 -22t30.5 -8q25 0 42.5 17.5t17.5 42.5q0 38 -34 54q-13 6 -26 6zM839 193h-417l-143 425
  139 +q-7 18 -29 18h-127q-13 0 -22 -8t-9 -20q0 -4 1 -7t2.5 -6t3.5 -5.5t4.5 -4.5t5.5 -3.5t6.5 -2t7.5 -0.5h105l143 -424q7 -19 29 -19h439q13 0 21.5 8t8.5 20.5t-8.5 20.5t-21.5 8zM904 524l-516 45q-12 1 -18.5 -7t-1.5 -20l90 -270q4 -12 16 -21.5t24 -9.5h377q12 0 22 10
  140 +t11 23l23 216q1 8 -2 15.5t-10 12.5t-15 6z" />
  141 + <glyph glyph-name="uniE629" unicode="&#xe629;"
  142 +d="M154 686v-646h146l-14 -208l240 208h344v646h-716zM752 176h-134v159h-192v-159h-134v382h134v-148h192v148h134v-382z" />
  143 + <glyph glyph-name="uniE62A" unicode="&#xe62a;"
  144 +d="M328 -66q-3 0 -5.5 0.5t-5.5 2.5q-14 6 -14 22v128h-193q-10 0 -17.5 7t-7.5 18v549q0 10 7.5 17.5t17.5 7.5h804q7 0 13 -3.5t9 -9t3 -12.5v-549q0 -11 -7 -18t-18 -7h-401l-169 -146q-7 -7 -16 -7zM171 172h188q10 0 17.5 -7.5t7.5 -17.5v-73l103 92q7 6 17 6h350v426
  145 +h-683v-426zM739 485h-454q-5 0 -9.5 2t-8 5t-5.5 8t-2 10q0 10 7.5 17.5t17.5 7.5h454q3 0 5.5 -0.5t4.5 -1.5t4 -2.5t3.5 -3t3 -3.5t2.5 -4.5t1.5 -5t0.5 -4.5q0 -11 -7 -18t-18 -7zM739 362h-454q-4 0 -8 1t-7 3.5t-5.5 5.5t-3.5 7t-1 8t1 8t3.5 7t5.5 5t7 3.5t8 1.5h454
  146 +q10 0 17.5 -7.5t7.5 -18t-7 -17.5t-18 -7zM549 239h-264q-10 0 -17.5 7t-7.5 17.5t7.5 18t17.5 7.5h264q10 0 17.5 -7.5t7.5 -17.5q0 -7 -3.5 -12.5t-9 -9t-12.5 -3.5z" />
  147 + <glyph glyph-name="uniE62B" unicode="&#xe62b;"
  148 +d="M511 -144q-73 0 -141 22.5t-123 64t-96.5 96.5t-64 123t-22.5 141q0 60 16 118t45 107t70 90t90 70t107 45t119 16q90 0 173 -35.5t142.5 -95.5t95 -142.5t35.5 -172.5q0 -46 -9 -90.5t-26 -84t-41.5 -75.5t-54.5 -66t-66 -54.5t-75.5 -41.5t-84 -26t-89.5 -9zM511 703
  149 +q-82 0 -156 -32t-127.5 -85.5t-85.5 -127.5t-32 -155q0 -109 54 -201.5t146 -146t200.5 -53.5t201 53.5t146 146t53.5 201.5q0 165 -117.5 282.5t-282.5 117.5zM465 164v29q0 9 1 17.5t2 15.5l2 10q1 5 3 9.5t4 8.5q1 2 2 4.5t2 4.5t2.5 4t2.5 4t2.5 4.5t3.5 4.5
  150 +q10 12 24 26l35 33q15 13 25.5 29.5t10.5 39.5q0 15 -5 27.5t-14 23.5q-5 5 -10.5 8.5t-12.5 6.5t-14.5 4t-16.5 1q-18 0 -32 -6q-5 -3 -9 -5.5t-8 -5.5t-8 -7q-1 -2 -2.5 -3.5t-3 -3.5t-2.5 -3.5t-2 -3.5l-2 -4l-2 -4l-2 -4q-1 -5 -2.5 -10t-2.5 -10t-1 -10l-95 8
  151 +q5 37 20 66t39 49q12 10 25.5 18t29.5 13q31 10 66 10q33 0 63 -9.5t53 -28.5q6 -5 11 -10t9.5 -11t8 -12.5t7.5 -13.5q13 -27 13 -64q0 -12 -1.5 -23t-3.5 -20q-2 -4 -3 -7.5t-3 -7.5l-2 -6q-2 -4 -4 -7l-4 -6q-10 -16 -24 -30q-5 -5 -10 -9.5t-11 -10t-11 -10.5
  152 +q-16 -13 -25.5 -23t-15.5 -20t-8 -22q-1 -5 -1.5 -12.5t-0.5 -15.5v-20h-92zM450 56q0 25 18 43t44 18q24 0 43 -17q18 -18 19 -42q0 -13 -5 -23.5t-14 -19.5q-18 -17 -43 -17q-12 0 -23.5 4.5t-20.5 12.5q-8 7 -13 18t-5 23z" />
  153 + <glyph glyph-name="uniE62C" unicode="&#xe62c;"
  154 +d="M505 776q77 0 148.5 -23.5t129 -67t101 -101.5t67.5 -129.5t24 -147.5q0 -64 -17 -125t-47.5 -112t-74 -94.5t-94.5 -74t-112 -47.5t-125 -17q-95 0 -182 37.5t-150 100.5t-100 150t-37 182t37 182t100 150t150 100t182 37zM505 -104q112 0 206.5 55t149.5 149.5
  155 +t55 206.5q0 37 -6.5 73.5t-19.5 69.5t-30.5 64t-40.5 57.5t-49.5 49.5t-57.5 40.5t-64 30t-69.5 19t-73.5 6.5q-111 0 -205.5 -55t-149.5 -149.5t-55 -206t55 -206t149.5 -149.5t205.5 -55zM528 138v-59h-58v59h58zM470 564h58v-349h-58v349z" />
  156 + <glyph glyph-name="uniE62D" unicode="&#xe62d;"
  157 +d="M828 618q65 -65 98 -148t33 -169t-33 -169t-98 -148q-66 -66 -149 -99q-16 -6 -33 -11.5t-33.5 -9t-33.5 -6.5t-34 -4t-35 -1q-43 0 -85 8t-84 24q-82 33 -148 98q-66 66 -98.5 149t-32.5 169t32.5 169t98.5 149q66 65 148.5 97.5t168.5 32.5q15 0 29 -0.5t28 -2.5
  158 +t28.5 -4.5t28.5 -6.5t27.5 -8.5t27.5 -9.5q83 -33 149 -99v0zM258 49q53 -53 118.5 -79t134.5 -26q34 0 68 6.5t67 19.5q65 26 117.5 78.5t78.5 118t26 134.5q0 35 -6.5 68.5t-19.5 66.5q-26 65 -78 118q-53 53 -119 79t-135 26q-23 0 -45.5 -3t-44.5 -9t-44 -14
  159 +q-66 -26 -118 -78.5t-78.5 -118t-26.5 -134.5t26.5 -134.5t78.5 -118.5v0zM748 602l69 -72l-531 -530l-70 70zM748 602z" />
  160 + <glyph glyph-name="uniE62E" unicode="&#xe62e;" horiz-adv-x="1025"
  161 +d="M491 6q9 -10 21.5 -10t21.5 10l357 407q4 5 5.5 9.5t0 8t-6 5.5t-11.5 2h-133q-14 0 -23.5 9.5t-9.5 22.5v261q0 9 -4.5 16.5t-12.5 11.5t-17 4h-333q-14 0 -24 -9.5t-10 -22.5v-261q0 -13 -9.5 -22.5t-23.5 -9.5h-133q-14 0 -17.5 -7.5t5.5 -17.5z" />
137 </font> 162 </font>
138 </defs></svg> 163 </defs></svg>
  1 +/**
  2 + * 商品详情页
  3 + * @author: xuqi<qi.xu@yoho.cn>
  4 + * @date: 2015/12/23
  5 + */
  6 +
  7 +var $ = require('yoho.jquery'),
  8 + lazyLoad = require('yoho.lazyload');
  9 +
  10 +var $imgShow = $('#img-show'),
  11 + $thumbs = $('#thumbs > .thumb-wrap');
  12 +
  13 +var $size = $('#sizes'),
  14 + $sizes = $size.children('.size'),
  15 + $sizeWarn = $size.children('.size-warn'),
  16 + $colorSizeTip = $size.children('.color-size-tip');
  17 +
  18 +var $num = $('#num'),
  19 + $plusNum = $('#plus-num'),
  20 + $minusNum = $('#minus-num'),
  21 + $numWarn = $('#num-warn');
  22 +
  23 +var $addToCart = $('#add-to-cart'),
  24 + $soldOut = $('#sold-out');
  25 +
  26 +var thumbsLoaded = {};
  27 +
  28 +var skn = $('.main').data('skn');
  29 +
  30 +var maxStock = -1; //记录当前选中的颜色-尺码的库存量,若为-1,代表未选择尺码
  31 +
  32 +var SLIDETIME = 200;
  33 +
  34 +var colTxt = {
  35 + default: '收藏商品',
  36 + coled: '已收藏',
  37 + hover: '取消收藏'
  38 +};
  39 +
  40 +//咨询和评价页数
  41 +var page = {
  42 + comments: 1,
  43 + consults: 1
  44 +};
  45 +
  46 +function imgShow(src) {
  47 + $imgShow.attr('src', src);
  48 +}
  49 +
  50 +/**
  51 + * 获取当前选择的商品数目
  52 + * @return [Number]
  53 + */
  54 +function getNum() {
  55 + return +$num.text();
  56 +}
  57 +
  58 +//重置Num显示为1
  59 +function resetNum() {
  60 + $num.text('1');
  61 +
  62 + $numWarn.addClass('hide');
  63 +}
  64 +
  65 +//加入购物车和已售罄状态控制
  66 +function switchBtnStatus() {
  67 + if (maxStock === 0) {
  68 + $addToCart.addClass('hide');
  69 + $soldOut.removeClass('hide');
  70 + } else {
  71 +
  72 + //包括默认的-1情况下
  73 + $addToCart.removeClass('hide');
  74 + $soldOut.addClass('hide');
  75 + }
  76 +}
  77 +
  78 +//初始化thumbsLoaded
  79 +thumbsLoaded[$('.colors .focus').index()] = true;
  80 +
  81 +//颜色
  82 +$('.colors').on('click', 'li', function() {
  83 + var $this = $(this),
  84 + index = $this.index();
  85 +
  86 + var $imgs;
  87 +
  88 + if ($this.hasClass('focus')) {
  89 + return;
  90 + }
  91 +
  92 + $this.siblings('.focus').removeClass('focus');
  93 + $this.addClass('focus');
  94 +
  95 + //切换图片显示
  96 + $thumbs.not('.hide').addClass('hide');
  97 + $imgs = $thumbs.eq(index).removeClass('hide').find('img');
  98 +
  99 + if (typeof thumbsLoaded[index] === 'undefined') {
  100 +
  101 + //trigger layLoad
  102 + lazyLoad($imgs, {
  103 + event: 'sporty'
  104 + });
  105 +
  106 + $imgs.trigger('sporty');
  107 +
  108 + thumbsLoaded[index] = true;
  109 + }
  110 +
  111 + imgShow($imgs.first().data('shower'));
  112 +
  113 + //切换尺码显示
  114 + $sizes.not('.hide').addClass('hide');
  115 + $sizes.eq(index).removeClass('hide').children('li').removeClass('focus');
  116 +
  117 + $colorSizeTip.addClass('hide');
  118 +
  119 + maxStock = -1;
  120 +
  121 + resetNum();
  122 +
  123 + switchBtnStatus();
  124 +});
  125 +
  126 +//尺码
  127 +$size.on('click', 'li', function() {
  128 + var $this = $(this);
  129 +
  130 + if ($this.hasClass('focus')) {
  131 + return;
  132 + }
  133 +
  134 + maxStock = +$this.data('num');
  135 +
  136 + $this.siblings('.focus').removeClass('focus');
  137 + $this.addClass('focus');
  138 +
  139 + $colorSizeTip.html($this.data('title')).removeClass('hide');
  140 +
  141 + $sizeWarn.addClass('hide');
  142 +
  143 + switchBtnStatus();
  144 +
  145 + resetNum();
  146 +}).on('click', '.size-ruler', function() {
  147 +
  148 + //尺码帮助
  149 +
  150 +});
  151 +
  152 +//数量
  153 +$plusNum.click(function() {
  154 + var num = getNum();
  155 +
  156 + if (maxStock === -1) {
  157 + $sizeWarn.removeClass('hide');//显示选择尺码提示
  158 + return;
  159 + }
  160 +
  161 + //已售罄
  162 + if (maxStock === 0) {
  163 + return;
  164 + }
  165 +
  166 + if (num >= maxStock) {
  167 + $numWarn.removeClass('hide');
  168 + } else {
  169 + $num.text(num + 1);
  170 + }
  171 +});
  172 +
  173 +$minusNum.click(function() {
  174 + var num = getNum();
  175 +
  176 + if (num === 1) {
  177 + return;
  178 + }
  179 +
  180 + if (num <= maxStock) {
  181 + $numWarn.addClass('hide');
  182 + }
  183 +
  184 + $num.text(num - 1);
  185 +});
  186 +
  187 +//加入购物车
  188 +$addToCart.click(function() {
  189 + if (maxStock === -1) {
  190 + $sizeWarn.removeClass('hide');
  191 + return;
  192 + }
  193 +
  194 + $.ajax({
  195 + type: 'GET',
  196 + url: '/product/item/addToCart',
  197 + data: {
  198 + skn: skn
  199 + }
  200 + }).then(function(data) {
  201 + var code = data.code;
  202 +
  203 + if (code === 200) {
  204 + $('#type-chose').slideUp(SLIDETIME);
  205 + $('#balance').slideDown(SLIDETIME);
  206 +
  207 + $('#cart-num').text(data.num); //更新数目
  208 + }
  209 + });
  210 +});
  211 +
  212 +//收藏
  213 +$('#collect-product').click(function() {
  214 + var $this = $(this),
  215 + status = 'collect';
  216 +
  217 + if ($this.hasClass('coled')) {
  218 + status = 'cancel';
  219 + }
  220 +
  221 + $.ajax({
  222 + type: 'GET',
  223 + url: '/product/item/collect',
  224 + data: {
  225 + skn: skn,
  226 + status: status
  227 + }
  228 + }).then(function(data) {
  229 + var code = data.code;
  230 +
  231 + if (code === 200) {
  232 +
  233 + $this.toggleClass('coled');
  234 +
  235 + if (status === 'cancel') {
  236 + $this.find('em').text(colTxt.default);
  237 + } else {
  238 + $this.find('em').text(colTxt.coled);
  239 + }
  240 + } else if (code === 400) {
  241 + window.location.href = data.data;
  242 + }
  243 + });
  244 +}).hover(function() {
  245 + var $this = $(this);
  246 +
  247 + if ($this.hasClass('coled')) {
  248 + $this.find('em').text(colTxt.hover);
  249 + }
  250 +}, function() {
  251 + var $this = $(this);
  252 +
  253 + if ($this.hasClass('coled')) {
  254 + $this.find('em').text(colTxt.coled);
  255 + }
  256 +});
  257 +
  258 +//继续购物
  259 +$('#keep-shopping').click(function() {
  260 + $('#type-chose').slideDown(SLIDETIME);
  261 + $('#balance').slideUp(SLIDETIME);
  262 +});
  263 +
  264 +//商品详情/材质洗涤切换
  265 +$('.description-material').on('click', '.title', function() {
  266 + var $this = $(this),
  267 + index = $this.index();
  268 +
  269 + var $description = $('.description-content'),
  270 + $material = $('.material-content');
  271 +
  272 + if ($this.hasClass('cur')) {
  273 + return;
  274 + }
  275 +
  276 + $this.addClass('cur');
  277 + $this.siblings('.cur').removeClass('cur');
  278 +
  279 + if (index === 0) {
  280 +
  281 + //商品信息
  282 + $description.slideDown(SLIDETIME);
  283 + $material.slideUp(SLIDETIME);
  284 + } else {
  285 + $description.slideUp(SLIDETIME);
  286 + $material.slideDown(SLIDETIME);
  287 + }
  288 +});
  289 +
  290 +//评价和咨询切换
  291 +$('.consult-comment').on('click', '.title', function() {
  292 + var $this = $(this),
  293 + index = $this.index();
  294 +
  295 + var $comments = $('.comments'),
  296 + $consults = $('.consults');
  297 +
  298 + if ($this.hasClass('cur')) {
  299 + return;
  300 + }
  301 +
  302 + $this.addClass('cur');
  303 + $this.siblings('.cur').removeClass('cur');
  304 +
  305 + if (index === 0) {
  306 +
  307 + //咨询
  308 + $consults.slideDown(SLIDETIME);
  309 + $comments.slideUp(SLIDETIME);
  310 + } else {
  311 + $consults.slideUp(SLIDETIME);
  312 + $comments.slideDown(SLIDETIME);
  313 + }
  314 +}).on('click', '.load-more', function() {
  315 + var $this = $(this),
  316 + type;
  317 +
  318 + if ($this.hasClass('load-more-comments')) {
  319 + type = 'comments';
  320 + } else {
  321 + type = 'consults';
  322 + }
  323 +
  324 + $.ajax({
  325 + type: 'GET',
  326 + url: '/product/item/' + type,
  327 + data: {
  328 + page: page[type] + 1
  329 + }
  330 + }).then(function(html) {
  331 + if (html === ' ') {
  332 + $this.closest('.more-wrap').addClass('hide');
  333 + } else {
  334 + $(type + '-ul').append(html);
  335 + page[type]++;
  336 + }
  337 + });
  338 +});
  339 +
  340 +//我要咨询
  341 +$('#consults-btn').click(function() {
  342 +
  343 + //TODO:点击我要资讯的时候更新验证码显示
  344 + $('.new-consult').removeClass('hide');
  345 + $('.consult-success').addClass('hide');
  346 +});
  347 +
  348 +//提交咨询
  349 +$('#submit-consult').click(function() {
  350 + var $this = $(this),
  351 + $parent = $this.closest('.new-consult'),
  352 + $textarea = $parent.find('.my-consult'),
  353 + $captcha = $parent.find('.captcha'),
  354 + content = $.trim($textarea.val()),
  355 + captcha = $.trim($captcha.val());
  356 +
  357 + var $consultWarn = $parent.find('.consult-warn'),
  358 + $captchaWarn = $parent.find('.captcha-warn');
  359 +
  360 + var pass = true;
  361 +
  362 + if (content === '') {
  363 + $textarea.addClass('error');
  364 + $consultWarn.removeClass('hide');
  365 +
  366 + pass = false;
  367 + } else {
  368 + $textarea.removeClass('error');
  369 + $consultWarn.addClass('hide');
  370 + }
  371 +
  372 + if (captcha === '') {
  373 + $captcha.addClass('error');
  374 + $captchaWarn.removeClass('hide').children('em').text('请输入验证码');
  375 +
  376 + pass = false;
  377 + } else {
  378 + $captcha.removeClass('error');
  379 + $captchaWarn.addClass('hide');
  380 + }
  381 +
  382 + if (pass === false) {
  383 + return;
  384 + }
  385 +
  386 + $.ajax({
  387 + type: 'GET',
  388 + url: '/product/item/consult',
  389 + data: {
  390 + content: content,
  391 + captcha: captcha
  392 + }
  393 + }).then(function(data) {
  394 + var code = data.code;
  395 +
  396 + if (code === 200) {
  397 + $parent.addClass('hide');
  398 +
  399 + $parent.siblings('.consult-success').removeClass('hide');
  400 +
  401 + //清空输入
  402 + $textarea.val('');
  403 + $captcha.val('');
  404 + } else if (code === 400) {
  405 +
  406 + //跳转登录页
  407 + location.href = data.href;
  408 + } else if (code === 401) {
  409 +
  410 + //验证码错误
  411 + $captcha.addClass('error');
  412 + $captchaWarn.removeClass('hide').children('em').text('验证码错误');
  413 + }
  414 + });
  415 +});
  416 +
  417 +//售后服务
  418 +$('.after-service-switch').click(function() {
  419 + var $this = $(this),
  420 + $content = $this.next('.after-service-content');
  421 +
  422 + var html = {
  423 + default: '&#xe604;',
  424 + spread: '&#xe603;'
  425 + };
  426 +
  427 + if ($content.css('display') === 'none') {
  428 + $content.slideDown(SLIDETIME);
  429 +
  430 + $this.find('.triangle').html(html.spread);
  431 + } else {
  432 + $content.slideUp(SLIDETIME);
  433 +
  434 + $this.find('.triangle').html(html.default);
  435 + }
  436 +});
  1 +.product-detail-page {
  2 + .brand-banner {
  3 + height: 45px;
  4 + width: 100%;
  5 +
  6 + img {
  7 + display: block;
  8 + height: 45px;
  9 + }
  10 +
  11 + .opt {
  12 + margin-top: 5px;
  13 + }
  14 +
  15 + .home, .brand-fav {
  16 + display: inline-block;
  17 + width: 32px;
  18 + height: 32px;
  19 + line-height: 32px;
  20 + border: 1px solid #fff;
  21 + text-align: center;
  22 + color: #fff;
  23 + }
  24 +
  25 + .home {
  26 + margin-right: 5px;
  27 +
  28 + .iconfont {
  29 + font-size: 14px;
  30 + }
  31 + }
  32 +
  33 + .brand-fav .iconfont {
  34 + font-size: 12px;
  35 + }
  36 +
  37 + .coled {
  38 + color: #ee0014;
  39 + }
  40 + }
  41 +
  42 + .path-nav {
  43 + border: none;
  44 + margin-bottom: 0;
  45 + }
  46 +
  47 + .main {
  48 + width: 990px;
  49 + margin: 0 auto;
  50 +
  51 + .infos {
  52 + width: 465px;
  53 + }
  54 +
  55 + .img {
  56 + position: relative;
  57 + width: 420px;
  58 + height: 560px;
  59 + }
  60 +
  61 + .img-show {
  62 + display: block;
  63 + width: 100%;
  64 + height: 100%;
  65 + }
  66 +
  67 + .tags {
  68 + position: absolute;
  69 + top: 0;
  70 + left: 0;
  71 + }
  72 +
  73 + .good-tag {
  74 + float: left;
  75 + height: 22px;
  76 + line-height: 22px;
  77 + color: #fff;
  78 + padding: 0 7px;
  79 + margin-right: 5px;
  80 + font-size: 12px;
  81 + box-sizing: border-box;
  82 + -moz-box-sizing:border-box;
  83 + -webkit-box-sizing:border-box;
  84 + }
  85 +
  86 + @each $tag, $bgColor in (new-tag, #78dc7d),
  87 + (renew-tag, #78dc7e),
  88 + (new-festival-tag, #000000),
  89 + (yep-tag, #ff565b),
  90 + (ymp-tag, #ff565b),
  91 + (sale-tag, #ff565b),
  92 + (few-tag, #ffac5b) {
  93 + .#{$tag} {
  94 + background: $bgColor;
  95 + }
  96 + }
  97 +
  98 + .limit-tag {
  99 + border: 1px solid #4e4e4e;
  100 + color: #4e4e4e;
  101 + }
  102 +
  103 + .thumbs {
  104 + width: 75px;
  105 + height: 510px;
  106 + overflow: hidden;
  107 + }
  108 +
  109 + .thumb {
  110 + display: block;
  111 + width: 75px;
  112 + margin-bottom: 2px;
  113 + }
  114 +
  115 + .name {
  116 + font-size: 18px;
  117 + font-weight: bold;
  118 + line-height: 24px;
  119 + }
  120 +
  121 + .brand-name {
  122 + color: #666;
  123 + font-size: 12px;
  124 + }
  125 +
  126 + .title {
  127 + color: #999;
  128 + font-size: 12px;
  129 + }
  130 +
  131 + .market-price {
  132 + margin-top: 8px;
  133 + }
  134 +
  135 + .price {
  136 + color: #000;
  137 + font-size: 22px;
  138 + line-height: 24px;
  139 + font-weight: bold;
  140 + }
  141 +
  142 + .with-sale .price {
  143 + color: #999;
  144 + text-decoration: line-through;
  145 + font-size: 12px;
  146 + }
  147 +
  148 + .activity {
  149 + margin-top: 12px;
  150 +
  151 + li {
  152 + line-height: 20px;
  153 + }
  154 + }
  155 +
  156 + .ac-type {
  157 + display: inline-block;
  158 + width: 43px;
  159 + height: 16px;
  160 + line-height: 16px;
  161 + margin-right: 5px;
  162 + text-align: center;
  163 + background: #999;
  164 + color: #fff;
  165 + font-size: 12px;
  166 + }
  167 +
  168 + .ac-des {
  169 + font-size: 12px;
  170 + }
  171 +
  172 + .row {
  173 + margin-top: 10px;
  174 + }
  175 +
  176 + .trade-content {
  177 + padding-top: 20px;
  178 + margin-top: 20px;
  179 + border-top: 1px solid #eaeceb;
  180 + }
  181 +
  182 + .chose-color {
  183 + font-size: 12px;
  184 +
  185 + .title {
  186 + margin-top: 14px;
  187 + }
  188 +
  189 + img {
  190 + display: block;
  191 + height: 36px;
  192 + width: 36px;
  193 + border: 2px solid #fff;
  194 + }
  195 +
  196 + .focus img {
  197 + border-color: #222;
  198 + }
  199 +
  200 + li {
  201 + margin-right: 5px;
  202 + margin-bottom: 5px;
  203 + cursor: pointer;
  204 + }
  205 + }
  206 +
  207 + .chose-size {
  208 + font-size: 12px;
  209 +
  210 + .title {
  211 + margin-top: 6px;
  212 + }
  213 +
  214 + li {
  215 + float: left;
  216 + display: block;
  217 + height: 22px;
  218 + line-height: 22px;
  219 + width: 38px;
  220 + margin-right: 5px;
  221 + margin-bottom: 5px;
  222 + border: 1px solid #eaeceb;
  223 + text-align: center;
  224 + cursor: pointer;
  225 +
  226 + &.disable {
  227 + opacity: 0.5;
  228 + filter: Alpha(opacity=50);
  229 + }
  230 +
  231 + &.focus {
  232 + color: #fff;
  233 + background: #222;
  234 + }
  235 + }
  236 + }
  237 +
  238 + .size {
  239 + float: left;
  240 + color: #666;
  241 + }
  242 +
  243 + .size-ruler {
  244 + float: left;
  245 + display: block;
  246 + width: 57px;
  247 + height: 24px;
  248 + background: image-url('product/size-ruler.jpg');
  249 + margin-bottom: 5px;
  250 + cursor: pointer;
  251 + }
  252 +
  253 + .size-warn, .num-warn {
  254 + height: 24px;
  255 + line-height: 24px;
  256 + }
  257 +
  258 + .color-size-tip {
  259 + color: #999;
  260 + }
  261 +
  262 + .chose-count .title {
  263 + margin-top: 6px;
  264 + }
  265 +
  266 + .num {
  267 + display: block;
  268 + width: 38px;
  269 + height: 23px;
  270 + line-height: 23px;
  271 + text-align: center;
  272 + border: 1px solid #eaeceb;
  273 + color: #333;
  274 + font-size: 12px;
  275 + background: #ebebe4;
  276 + }
  277 +
  278 + .minus-plus {
  279 + display: block;
  280 + width: 14px;
  281 + height: 23px;
  282 + border: 1px solid #eaeceb;
  283 + border-left: none;
  284 + text-align: center;
  285 + cursor: pointer;
  286 +
  287 + i {
  288 + display: block;
  289 + width: 13px;
  290 + height: 11px;
  291 + line-height: 8px;
  292 + font-size: 12px;
  293 + }
  294 + }
  295 +
  296 + .minus {
  297 + border-top: 1px solid #eaeceb;
  298 + font-size: 13px;
  299 + }
  300 +
  301 + .add-to-cart, .sold-out, .go-cart {
  302 + display: inline-block;
  303 + margin-right: 10px;
  304 + height: 48px;
  305 + line-height: 48px;
  306 + width: 197px;
  307 + text-align: center;
  308 + color: #fff;
  309 + background: #e92601;
  310 + font-size: 14px;
  311 + cursor: pointer;
  312 + }
  313 +
  314 + .sold-out {
  315 + background: #ccc;
  316 + }
  317 +
  318 + .collect-product, .keep-shopping {
  319 + display: inline-block;
  320 + width: 127px;
  321 + height: 48px;
  322 + text-align: center;
  323 + line-height: 48px;
  324 + background: #fff;
  325 + color: #222;
  326 + border: 1px solid #ccc;
  327 + font-weight: bold;
  328 + font-size: 12px;
  329 + cursor: pointer;
  330 +
  331 + .iconfont {
  332 + color: #ccc;
  333 + font-size: 12px;
  334 + }
  335 +
  336 + &.coled .iconfont{
  337 + color: #fa5252;
  338 + }
  339 + }
  340 +
  341 + .share-row {
  342 + margin-top: 20px;
  343 +
  344 + .title {
  345 + margin-top: 2px;
  346 + }
  347 +
  348 + i {
  349 + display: block;
  350 + float: left;
  351 + width: 16px;
  352 + height: 16px;
  353 + margin-left: 5px;
  354 + background: image-url('guang/detail/icon-share.png') no-repeat;
  355 + }
  356 +
  357 + $left: 0px;
  358 + @each $icon in weibo,qweibo,renren,qzone,qq,douban,weixin {
  359 + .#{$icon} {
  360 + background-position: 0 $left;
  361 + }
  362 +
  363 + $left: $left - 16px;
  364 + }
  365 + }
  366 +
  367 + .balance {
  368 + display: none;
  369 +
  370 + .success-tip {
  371 + color: #222;
  372 + font-size: 18px;
  373 + margin-bottom: 10px;
  374 + }
  375 +
  376 + .cart-total {
  377 + color: #999;
  378 + font-size: 12px;
  379 + }
  380 +
  381 + .balance-btns {
  382 + margin-top: 20px;
  383 + }
  384 + }
  385 + }
  386 +
  387 + .other-infos {
  388 + padding-bottom: 30px;
  389 + }
  390 +
  391 + .info-block {
  392 + margin-top: 30px;
  393 + color: #999;
  394 + border-top: 2px solid #eaeceb;
  395 + font-size: 12px;
  396 +
  397 + .basic {
  398 + width: 640px;
  399 + margin: 0 auto;
  400 +
  401 + li {
  402 + float: left;
  403 + width: 25%;
  404 + line-height: 20px;
  405 + }
  406 + }
  407 +
  408 + .comfort {
  409 + width: 470px;
  410 + border: 1px solid #eaeceb;
  411 + margin: 17px auto 0;
  412 + padding-bottom: 15px;
  413 +
  414 + li {
  415 + margin: 12px 20px 0;
  416 + }
  417 + }
  418 +
  419 + .comfort-block {
  420 + display: inline-block;
  421 + width: 14px;
  422 + height: 10px;
  423 + border: 1px solid #eaeceb;
  424 + margin-right: 2px;
  425 +
  426 + &.cur {
  427 + background: #999;
  428 + border: 1px solid #999;
  429 + }
  430 + }
  431 + }
  432 +
  433 + .block-title {
  434 + margin-bottom: 25px;
  435 + text-align: center;
  436 +
  437 + .title {
  438 + display: inline-block;
  439 + padding-top: 15px;
  440 + font-weight: bold;
  441 + cursor: pointer;
  442 +
  443 + &.cur {
  444 + color: #222;
  445 + border-top: 2px solid #222;
  446 + margin-top: -2px;
  447 + }
  448 + }
  449 +
  450 + .sep {
  451 + display: inline-block;
  452 + margin: 0 30px;
  453 + color: #eaeceb;
  454 + font-size: 14px;
  455 + cursor: default;
  456 + font-weight: bold;
  457 + }
  458 + }
  459 +
  460 + .material-content {
  461 + display: none;
  462 + }
  463 +
  464 + .material-detail {
  465 + width: 860px;
  466 + margin: 0 auto;
  467 + padding-bottom: 20px;
  468 + margin-bottom: 20px;
  469 + border-bottom: 1px dotted #eaeceb;
  470 +
  471 + img {
  472 + float: left;
  473 + width: 125px;
  474 + height: 50px;
  475 + }
  476 +
  477 + .name {
  478 + float: left;
  479 + width: 100px;
  480 + line-height: 25px;
  481 + border-right: 1px dotted #eaeceb;
  482 + color: #666;
  483 + font-weight: bold;
  484 + text-align: center;
  485 + font-size: 14px;
  486 + }
  487 +
  488 + .text {
  489 + float: left;
  490 + width: 614px;
  491 + padding-left: 20px;
  492 + line-height: 18px;
  493 + }
  494 + }
  495 +
  496 + .wash {
  497 + text-align: center;
  498 +
  499 + li {
  500 + display: inline-block;
  501 + padding: 0 20px;
  502 + color: #666;
  503 + border-right: 1px solid #eaeceb;
  504 + }
  505 + }
  506 +
  507 + .size-info {
  508 + text-align: center;
  509 + }
  510 +
  511 + .size-table, .reference-table {
  512 + text-align: center;
  513 + margin: 0 auto;
  514 +
  515 + td,th {
  516 + width: 110px;
  517 + text-align: center;
  518 + }
  519 +
  520 + tr {
  521 + height: 30px;
  522 + }
  523 +
  524 + thead {
  525 + background: #f5f7f6;
  526 + color: #999;
  527 + }
  528 +
  529 + tbody {
  530 + color: #222;
  531 + }
  532 +
  533 + .avatar {
  534 + width: 26px;
  535 + height: 26px;
  536 + border-radius: 50px;
  537 + }
  538 + }
  539 +
  540 + .size-tip {
  541 + color: #999;
  542 + margin-top: 15px;
  543 + text-align: center;
  544 + }
  545 +
  546 + .details {
  547 + text-align: center;
  548 + font-size: 12px;
  549 + color: #999;
  550 + line-height: 18px;
  551 + }
  552 +
  553 + .details-html {
  554 + width: 640px;
  555 + margin: 0 auto;
  556 +
  557 + b {
  558 + font-weight: bold;
  559 + }
  560 +
  561 + i {
  562 + font-style: italic;
  563 + }
  564 + }
  565 +
  566 + .consults {
  567 + display: none;
  568 + }
  569 +
  570 + .consult-comment .title {
  571 + color: #666;
  572 +
  573 + &.cur {
  574 + color: #666;
  575 + }
  576 + }
  577 +
  578 + .cc-content {
  579 + background: #f5f7f6;
  580 + padding: 20px 20px 0 20px;
  581 + font-size: 12px;
  582 +
  583 + h2 {
  584 + font-weight: bold;
  585 + font-size: 14px;
  586 + margin-bottom: 10px;
  587 + color: #000;
  588 + }
  589 +
  590 + li {
  591 + border-top: 1px solid #eaeceb;
  592 + padding: 20px 0;
  593 + }
  594 +
  595 + .user-info {
  596 + color: #999;
  597 + line-height: 16px;
  598 +
  599 + > * {
  600 + float: left;
  601 + }
  602 +
  603 + .name {
  604 + color: #666;
  605 + }
  606 +
  607 + .date {
  608 + color: #bbb;
  609 + }
  610 +
  611 + .question {
  612 + color: #222;
  613 + }
  614 + }
  615 +
  616 + .user-avatar {
  617 + width: 30px;
  618 + height: 30px;
  619 + margin-right: 5px;
  620 + }
  621 +
  622 + .more-wrap {
  623 + text-align: center;
  624 + color: #666;
  625 + border-top: 1px solid #eaeceb;
  626 + padding: 20px 0;
  627 + font-size: 14px;
  628 + font-weight: bold;
  629 + color: #666;
  630 + }
  631 +
  632 + .btn-wrap {
  633 + padding: 20px 0;
  634 + border-top: 1px solid #eaeceb;
  635 + }
  636 +
  637 + .load-more {
  638 + cursor: pointer;
  639 + }
  640 +
  641 + .btn {
  642 + display: block;
  643 + width: 140px;
  644 + height: 32px;
  645 + line-height: 32px;
  646 + color: #fff;
  647 + background: #222;
  648 + text-align: center;
  649 + font-size: 12px;
  650 + margin: 0 auto;
  651 + cursor: pointer;
  652 +
  653 + .iconfont {
  654 + font-size: 14px;
  655 + }
  656 + }
  657 +
  658 + .comment, .consult {
  659 + margin-top: 10px;
  660 + }
  661 +
  662 + .consults {
  663 + display: none;
  664 + }
  665 + }
  666 +
  667 + .new-consult {
  668 + padding: 20px 0;
  669 + border-top: 1px solid #eaeceb;
  670 +
  671 + textarea {
  672 + width: 590px;
  673 + height: 80px;
  674 + margin-top: 8px;
  675 + padding: 5px;
  676 + outline: none;
  677 + }
  678 +
  679 + .captcha-row {
  680 + margin: 10px 0;
  681 + }
  682 +
  683 + .captcha {
  684 + width: 70px;
  685 + height: 20px;
  686 + line-height: 20px;
  687 + border: 1px solid #ccc;
  688 + margin-right: 5px;
  689 + padding: 5px;
  690 + outline: none;
  691 + }
  692 +
  693 + .captcha-img {
  694 + border: 0;
  695 + height: 32px;
  696 + width: 96px;
  697 + vertical-align: middle;
  698 + }
  699 +
  700 + .submit-consult {
  701 + display: block;
  702 + width: 140px;
  703 + height: 32px;
  704 + line-height: 32px;
  705 + margin: 0;
  706 + }
  707 +
  708 + .error {
  709 + border-color: #e01;
  710 + }
  711 + }
  712 +
  713 + .consult-success {
  714 + border-top: 1px solid #eaeceb;
  715 + margin-top: 30px;
  716 + text-align: center;
  717 + padding: 20px 0;
  718 +
  719 + p {
  720 + width: 295px;
  721 + height: 55px;
  722 + line-height: 55px;
  723 + margin: 0 auto;
  724 + border: 2px solid #222;
  725 + display: block;
  726 + color: #222;
  727 + font-weight: bold;
  728 + }
  729 + }
  730 +
  731 + .after-service {
  732 + text-align: center;
  733 + margin-top: 30px;
  734 +
  735 + .after-service-content {
  736 + display: none;
  737 + }
  738 +
  739 + .after-service-switch {
  740 + height: 44px;
  741 + line-height: 44px;
  742 + background: #eaeceb;
  743 + text-align: center;
  744 + font-size: 12px;
  745 + cursor: pointer;
  746 +
  747 + .iconfont {
  748 + font-size: 12px;
  749 + }
  750 + }
  751 +
  752 + .text {
  753 + padding: 20px 15px;
  754 + color: #666;
  755 + background: #f5f7f6;
  756 + text-align: left;
  757 + color: #666;
  758 + line-height: 18px;
  759 + }
  760 +
  761 + .orange {
  762 + color: #f9761a;
  763 + }
  764 +
  765 + h4 {
  766 + font-weight: bold;
  767 + font-size: 14px;
  768 + line-height: 24px;
  769 + color: #222;
  770 + margin-top: 10px;
  771 +
  772 + &:first-child {
  773 + margin-top: 0;
  774 + }
  775 + }
  776 +
  777 + .img-1 {
  778 + width: 715px;
  779 + height: 259px;
  780 + margin: 0 auto;
  781 + background: image-url('product/after-service-1.png');
  782 + }
  783 +
  784 + .img-2 {
  785 + width: 715px;
  786 + height: 230px;
  787 + margin: 0 auto;
  788 + background: image-url('product/after-service-2.png');
  789 + }
  790 +
  791 + a {
  792 + color: #666;
  793 + }
  794 + }
  795 +
  796 + .service {
  797 + width: 323px;
  798 + height: 30px;
  799 + margin: 45px auto 0;
  800 + background: image-url('product/service.png');
  801 + }
  802 +
  803 + .recent-view {
  804 + width: 1010px;
  805 + margin: 0 auto;
  806 +
  807 + li {
  808 + float: left;
  809 + width: 180px;
  810 + margin-right: 22px;
  811 + }
  812 +
  813 + img {
  814 + height: 240px;
  815 + width: 180px;
  816 + display: block;
  817 + }
  818 +
  819 + .name {
  820 + display: block;
  821 + margin-top: 5px;
  822 + color: #222;
  823 + line-height: 16px;
  824 + }
  825 +
  826 + .price {
  827 + color: #222;
  828 + font-weight: bold;
  829 + margin-top: 5px;
  830 + }
  831 +
  832 + .market-price {
  833 + margin-right: 5px;
  834 + }
  835 +
  836 + .has-sale {
  837 + text-decoration: line-through;
  838 + color: #999;
  839 + }
  840 + }
  841 +
  842 + .warn-tip {
  843 + display: inline-block;
  844 + color: #e01;
  845 + margin-left: 7px;
  846 + font-size: 12px;
  847 +
  848 + i {
  849 + font-size: 14px;
  850 + }
  851 + }
  852 +}
1 -@import "search", "list", "filter-box", "sort-pager", "good", "hot-rank";  
  1 +@import "search", "list", "detail", "hot-rank", "filter-box", "sort-pager", "good";
  1 +<?php
  2 +
  3 +use Action\AbstractAction;
  4 +use Plugin\Helpers;
  5 +
  6 +class ItemController extends AbstractAction
  7 +{
  8 + public function indexAction()
  9 + {
  10 + $data = array(
  11 + 'productDetailPage' => true,
  12 + 'detail' => array(
  13 + 'banner' => array(
  14 + 'id' => '',
  15 + 'bgColor' => '#abab43',
  16 + 'bgImg' => 'http://img10.static.yhbimg.com/brandBanner/2015/03/20/09/018e4c599a3ca16fe5c67f77ef05cea723.jpg',
  17 + 'logo' => 'http://img10.static.yhbimg.com/brandLogo/2015/12/04/16/0144f2beb0c06d554d3819394ab974ac45.jpg?imageView/3/w/500/h/45',
  18 + 'alt' => 'BRISTON',
  19 + 'homeUrl' => '',
  20 + 'liked' => true
  21 + ),
  22 + 'pathNav' => array(
  23 + array(
  24 + 'href' => '/boys',
  25 + 'name' => 'BOYS首页'
  26 + ),
  27 + array(
  28 + 'href' => '/boys?sort=1',
  29 + 'name' => '服配'
  30 + ),
  31 + array(
  32 + 'href' => '/boys?sort=1&msort=232',
  33 + 'name' => '手表'
  34 + ),
  35 + array(
  36 + 'name' => 'BRISTON 手表Clubmaster CHRONO black Silver - Black dial基本系列黑盘 '
  37 + )
  38 + ),
  39 + 'goodInfo' => array(
  40 + 'skn' => '',
  41 + 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/12/08/06/013ded7a84dbd3087594553e4333c92f80.jpg?imageMogr2/thumbnail/420x560/extent/420x560/background/d2hpdGU=/position/center/quality/90',
  42 + 'tags' => array(
  43 + 'isNew' => true,
  44 + 'isLimit' => true,
  45 + 'isNewFestival' => true
  46 + ),
  47 + 'name' => 'BRISTON 手表Clubmaster CHRONO black Silver - Black dial基本系列黑盘',
  48 + 'brandUrl' => '',
  49 + 'brandName' => 'BRISTON',
  50 + 'marketPrice' => '2180.00',
  51 + 'activity' => array(
  52 + array(
  53 + 'url' => '',
  54 + 'sizeImg' => 'http://img11.static.yhbimg.com/productbanner/2015/12/11/00/01ba262a2fbac23b022eeace17cf5c3685.jpg'
  55 + ),
  56 + array(
  57 + 'type' => '加价购',
  58 + 'des' => '全场99元加价购'
  59 + ),
  60 + array(
  61 + 'type' => '加价购',
  62 + 'des' => '全场59元加价购'
  63 + ),
  64 + array(
  65 + 'type' => '加价购',
  66 + 'des' => '全场19元加价购'
  67 + )
  68 + ),
  69 + 'colors' => array(
  70 + array(
  71 + 'focus' => true,
  72 + 'title' => 'BRISTON 手表Clubmaster CHRONO black Silver - Black dial基本系列黑盘 黑色',
  73 + 'src' => 'http://img11.static.yhbimg.com/goodsimg/2015/12/08/06/013ded7a84dbd3087594553e4333c92f80.jpg?imageMogr2/thumbnail/40x40/extent/40x40/background/d2hpdGU=/position/center/quality/90',
  74 + 'thumbs' => array(
  75 + array(
  76 + 'url' => '',
  77 + 'shower' => 'http://img11.static.yhbimg.com/goodsimg/2015/12/08/06/013ded7a84dbd3087594553e4333c92f80.jpg?imageMogr2/thumbnail/420x560/extent/420x560/background/d2hpdGU=/position/center/quality/90',
  78 + 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/12/08/06/013ded7a84dbd3087594553e4333c92f80.jpg?imageMogr2/thumbnail/75x100/extent/75x100/background/d2hpdGU=/position/center/quality/90'
  79 + )
  80 + ),
  81 + 'size' => array(
  82 + array(
  83 + 'name' => 'F',
  84 + 'title' => '胸围 106cm / 肩宽 43cm',
  85 + 'sku' => '956638',
  86 + 'num' => 5
  87 + ),
  88 + array(
  89 + 'name' => 'L',
  90 + 'title' => '胸围 110cm / 肩宽 45cm',
  91 + 'sku' => '956634',
  92 + 'num' => 2, //num为数字0或者不传则售罄
  93 + )
  94 + )
  95 + ),
  96 + array(
  97 + 'title' => 'GOGO HARRIS 圆圈手势套头卫衣 灰色',
  98 + 'src' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/25/03/02b0d2195e1f1a285c4473a581e03f2e79.jpg?imageMogr2/thumbnail/40x40/extent/40x40/background/d2hpdGU=/position/center/quality/90',
  99 + 'thumbs' => array(
  100 + array(
  101 + 'url' => '',
  102 + 'shower' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/25/03/02b0d2195e1f1a285c4473a581e03f2e79.jpg?imageMogr2/thumbnail/420x560/extent/420x560/background/d2hpdGU=/position/center/quality/90',
  103 + 'img' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/25/03/02b0d2195e1f1a285c4473a581e03f2e79.jpg?imageMogr2/thumbnail/75x100/extent/75x100/background/d2hpdGU=/position/center/quality/90'
  104 + )
  105 + ),
  106 + 'size' => array(
  107 + array(
  108 + 'name' => 'L',
  109 + 'title' => '胸围 106cm / 肩宽 43cm',
  110 + 'sku' => '956638',
  111 + 'num' => 0
  112 + ),
  113 + array(
  114 + 'name' => 'XL',
  115 + 'title' => '胸围 110cm / 肩宽 45cm',
  116 + 'sku' => '956634',
  117 + 'num' => 2,
  118 + )
  119 + )
  120 + )
  121 + )
  122 + ),
  123 + 'description' => array(
  124 + 'basic' => array(
  125 + array(
  126 + 'key' => '编号',
  127 + 'value' => '51183240'
  128 + ),
  129 + array(
  130 + 'key' => '颜色',
  131 + 'value' => '黑色'
  132 + ),
  133 + array(
  134 + 'key' => '性别',
  135 + 'value' => '通用'
  136 + ),
  137 + array(
  138 + 'key' => '显示方式',
  139 + 'value' => '指针'
  140 + ),
  141 + array(
  142 + 'key' => '款式',
  143 + 'value' => '石英表'
  144 + )
  145 + ),
  146 + 'comfort' => array(
  147 + array(
  148 + 'name' => '弹性',
  149 + 'minDes' => '小',
  150 + 'blocks' => array(
  151 + array(
  152 + ),
  153 + array(
  154 + 'cur' => true
  155 + ),
  156 + array(
  157 + ),
  158 + array(
  159 + ),
  160 + array(
  161 + )
  162 + ),
  163 + 'maxDes' => '大'
  164 + ),
  165 + array(
  166 + 'name' => '厚度',
  167 + 'minDes' => '薄',
  168 + 'blocks' => array(
  169 + array(
  170 + ),
  171 + array(
  172 + ),
  173 + array(
  174 + 'cur' => true
  175 + ),
  176 + array(
  177 + ),
  178 + array(
  179 + )
  180 + ),
  181 + 'maxDes' => '厚'
  182 + ),
  183 + array(
  184 + 'name' => '柔软度',
  185 + 'minDes' => '软',
  186 + 'blocks' => array(
  187 + array(
  188 + ),
  189 + array(
  190 + ),
  191 + array(
  192 + ),
  193 + array(
  194 + ),
  195 + array(
  196 + 'cur' => true
  197 + )
  198 + ),
  199 + 'maxDes' => '硬'
  200 + ),
  201 + array(
  202 + 'name' => '透气性',
  203 + 'minDes' => '弱',
  204 + 'blocks' => array(
  205 + array(
  206 + ),
  207 + array(
  208 + ),
  209 + array(
  210 + ),
  211 + array(
  212 + 'cur' => true
  213 + ),
  214 + array(
  215 + )
  216 + ),
  217 + 'maxDes' => '强'
  218 + )
  219 + )
  220 + ),
  221 + 'material' => array(
  222 + 'detail' => array(
  223 + 'img' => 'http://img10.static.yhbimg.com/material/2012/03/06/20/0176f9410824167f9eca0cea7bd2b3df70.jpg',
  224 + 'name' => '涤纶/聚酯纤维',
  225 + 'enName' => 'Polyester',
  226 + 'text' => '涤纶类的服装可机洗,可手洗,可干洗,可用毛刷刷洗。不可曝晒,不宜烘干。熨烫温度不能超过110度,熨烫时一定要打蒸汽,不能干烫 。在日光下晾晒时,将里面朝外。'
  227 + ),
  228 + 'wash' => array(
  229 + array(
  230 + 'img' => 'http://static.yohobuy.com/images/wash_2.png',
  231 + 'name' => '不可转笼翻转干燥'
  232 + ),
  233 + array(
  234 + 'img' => 'http://static.yohobuy.com/images/wash_4.png',
  235 + 'name' => '不可氯洗'
  236 + ),
  237 + array(
  238 + 'img' => 'http://static.yohobuy.com/images/wash_7.png',
  239 + 'name' => '分色洗涤'
  240 + )
  241 + )
  242 + ),
  243 + 'size' => array(
  244 + 'thead' => array(
  245 + array(
  246 + 'width' => 110,
  247 + 'name' => '吊牌尺码'
  248 + ),
  249 + array(
  250 + 'width' => 110,
  251 + 'name' => '表带长'
  252 + ),
  253 + array(
  254 + 'width' => 110,
  255 + 'name' => '表盘厚度'
  256 + ),
  257 + array(
  258 + 'width' => 110,
  259 + 'name' => '表盘直径'
  260 + )
  261 + ),
  262 + 'tbody' => array(
  263 + array(
  264 + 'F', '20', '1', '4'
  265 + )
  266 + ),
  267 + 'sizeImg' => 'http://static.yohobuy.com/images/1.jpg'
  268 + ),
  269 + 'reference' => array(
  270 + 'thead' => array(
  271 + array(
  272 + 'width' => 26,
  273 + 'name' => ''
  274 + ),
  275 + array(
  276 + 'width' => 90,
  277 + 'name' => '模特'
  278 + ),
  279 + array(
  280 + 'width' => 110,
  281 + 'name' => '身高'
  282 + ),
  283 + array(
  284 + 'width' => 110,
  285 + 'name' => '体重'
  286 + ),
  287 + array(
  288 + 'width' => 110,
  289 + 'name' => '三围'
  290 + ),
  291 + array(
  292 + 'width' => 110,
  293 + 'name' => '吊牌尺码'
  294 + ),
  295 + array(
  296 + 'width' => 110,
  297 + 'name' => '试穿描述'
  298 + )
  299 + ),
  300 + 'tbody' => array(
  301 + array(
  302 + 'http://img11.static.yhbimg.com/modelCard/2015/07/18/01/011c7aa0035212351482ec01a41afb1fd2.jpg',
  303 + 'Oliver',
  304 + '175',
  305 + '51',
  306 + '78/70/87',
  307 + 'M',
  308 + '合适'
  309 + )
  310 + )
  311 + ),
  312 + 'details' => '精致细腻的剪裁,搭配假拉链装饰,摒弃棉衣的臃肿,十分有型。中长款设计,内里夹棉,足够帮你抵御冬天的严寒。<br><br><p><img border="0" src="http://img02.static.yohobuy.com/product/2015/11/16/15/02b665cffb4ab07dbfacf922e7e7697134.jpg"></p>',
  313 + 'consultComment' => array(
  314 + 'consultNum' => 125,
  315 + 'commentNum' => 122,
  316 + 'commentUrl' => '',
  317 + 'hasMoreComments' => true,
  318 + 'comments' => array(
  319 + array(
  320 + 'avatar' => 'http://static.yohobuy.com/images/v3/boy.jpg',
  321 + 'userName' => '哦嚯',
  322 + 'color' => '绿色',
  323 + 'size' => 'L',
  324 + 'date' => '2015-12-19 16:44:02',
  325 + 'comment' => '好看'
  326 + )
  327 + ),
  328 + 'consults' => array(
  329 + array(
  330 + 'avatar' => 'http://static.yohobuy.com/images/v3/boy.jpg',
  331 + 'question' => '黑色其他型号 L 不会再出了吗?',
  332 + 'date' => '2015-12-19 16:44:02',
  333 + 'answer' => '该款商品补货时间暂时无法确定,绿色目前是有货的。您还可以“收藏”该商品同时“关注”该品牌,实时关注并登录“MY有货”点击查看“收藏商品”,补货到仓后可直接购买,感谢您对Yoho!Buy有货的支持,祝您购物愉快!'
  334 + )
  335 + )
  336 + ),
  337 + 'recentView' => array(
  338 + array(
  339 + 'url' => '',
  340 + 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/12/08/06/013ded7a84dbd3087594553e4333c92f80.jpg?imageMogr2/thumbnail/195x260/extent/195x260/background/d2hpdGU=/position/center/quality/90',
  341 + 'name' => 'BRISTON 手表Clubmaster CHRONO black Silver - Black dial基本系列黑盘 ',
  342 + 'marketPrice' => '2180'
  343 + ),
  344 + array(
  345 + 'url' => '',
  346 + 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/14/06/017fc64072bb2acb5dfa6b4d33e812afd5.jpg?imageMogr2/thumbnail/195x260/extent/195x260/background/d2hpdGU=/position/center/quality/90',
  347 + 'name' => 'GAWS 街头风金属拉链装饰棉服',
  348 + 'marketPrice' => '639',
  349 + 'salePrice' => '419'
  350 + )
  351 + )
  352 + )
  353 + );
  354 +
  355 + $this->_view->display('index', $data);
  356 + }
  357 +
  358 + public function collectAction()
  359 + {
  360 + $this->echoJson(array(
  361 + 'code' => 200
  362 + ));
  363 + }
  364 +
  365 + public function addToCartAction()
  366 + {
  367 + $this->echoJson(array(
  368 + 'code' => 200,
  369 + 'num' => 5
  370 + ));
  371 + }
  372 +
  373 + public function commentsAction()
  374 + {
  375 + echo(' ');
  376 + }
  377 +
  378 + public function consultAction()
  379 + {
  380 + $this->echoJson(
  381 + array(
  382 + 'code' => 200
  383 + )
  384 + );
  385 + }
  386 +}