Authored by 刘传洋

m

  1 +<div class="detail-body">
  2 + <div class="slide-img">
  3 + <p>选赠品:<em><span
  4 + class="active">1元加价购</span><code>|</code><span>59元加价购</span><code>|</code><span>99元加价购</span></em></p>
  5 + <div class="side-img-dd">
  6 + <ul class="img-list">
  7 + <li class="img-item">
  8 + <span class="hide goods-id">{{goods_id}}</span>
  9 + <div class="good">
  10 + <a href="{{url}}" target="_blank">
  11 + <img class="lazy" src="{{pic_url}}"/>
  12 + </a>
  13 + </div>
  14 + </li>
  15 + <li class="img-item">
  16 + <span class="hide goods-id">{{goods_id}}</span>
  17 + <div class="good">
  18 + <a href="{{url}}" target="_blank">
  19 + <img class="lazy" src="{{pic_url}}"/>
  20 + </a>
  21 + </div>
  22 + </li>
  23 + <li class="img-item">
  24 + <span class="hide goods-id">{{goods_id}}</span>
  25 + <div class="good">
  26 + <a href="{{url}}" target="_blank">
  27 + <img class="lazy" src="{{pic_url}}"/>
  28 + </a>
  29 + </div>
  30 + </li>
  31 + <li class="img-item">
  32 + <span class="hide goods-id">{{goods_id}}</span>
  33 + <div class="good">
  34 + <a href="{{url}}" target="_blank">
  35 + <img class="lazy" src="{{pic_url}}"/>
  36 + </a>
  37 + </div>
  38 + </li>
  39 + <li class="img-item">
  40 + <span class="hide goods-id">{{goods_id}}</span>
  41 + <div class="good">
  42 + <a href="{{url}}" target="_blank">
  43 + <img class="lazy" src="{{pic_url}}"/>
  44 + </a>
  45 + </div>
  46 + </li>
  47 + <li class="img-item">
  48 + <span class="hide goods-id">{{goods_id}}</span>
  49 + <div class="good">
  50 + <a href="{{url}}" target="_blank">
  51 + <img class="lazy" src="{{pic_url}}"/>
  52 + </a>
  53 + </div>
  54 + </li>
  55 + <li class="img-item">
  56 + <span class="hide goods-id">{{goods_id}}</span>
  57 + <div class="good">
  58 + <a href="{{url}}" target="_blank">
  59 + <img class="lazy" src="{{pic_url}}"/>
  60 + </a>
  61 + </div>
  62 + </li>
  63 + <li class="img-item">
  64 + <span class="hide goods-id">{{goods_id}}</span>
  65 + <div class="good">
  66 + <a href="{{url}}" target="_blank">
  67 + <img class="lazy" src="{{pic_url}}"/>
  68 + </a>
  69 + </div>
  70 + </li>
  71 + <li class="img-item">
  72 + <span class="hide goods-id">{{goods_id}}</span>
  73 + <div class="good">
  74 + <a href="{{url}}" target="_blank">
  75 + <img class="lazy" src="{{pic_url}}"/>
  76 + </a>
  77 + </div>
  78 + </li>
  79 + <li class="img-item">
  80 + <span class="hide goods-id">{{goods_id}}</span>
  81 + <div class="good">
  82 + <a href="{{url}}" target="_blank">
  83 + <img class="lazy" src="{{pic_url}}"/>
  84 + </a>
  85 + </div>
  86 + </li>
  87 + <li class="img-item">
  88 + <span class="hide goods-id">{{goods_id}}</span>
  89 + <div class="good">
  90 + <a href="{{url}}" target="_blank">
  91 + <img class="lazy" src="{{pic_url}}"/>
  92 + </a>
  93 + </div>
  94 + </li>
  95 + </ul>
  96 + </div>
  97 + </div>
  98 + <div class="detail-goods">
  99 + <div class="detail-bigpic">
  100 + <div class="bigpic">
  101 + <img src="">
  102 + </div>
  103 + <div class="bigpic none">
  104 + <img src="">
  105 + </div>
  106 + <div class="bigpic none">
  107 + <img src="">
  108 + </div>
  109 + <div class="bigpic none">
  110 + <img src="">
  111 + </div>
  112 + <div class="bigpic none">
  113 + <img src="">
  114 + </div>
  115 + <div class="bigpic none">
  116 + <img src="">
  117 + </div>
  118 + <div class="piclist">
  119 + <span class="pre"></span>
  120 + <div class="con">
  121 + <ul>
  122 + <li class="active"><img src=""></li>
  123 + <li><img src=""></li>
  124 + <li><img src=""></li>
  125 + <li><img src=""></li>
  126 + <li><img src=""></li>
  127 + </ul>
  128 + </div>
  129 + <span class="next"></span>
  130 + </div>
  131 + </div>
  132 + <div class="detail-bigpic none">
  133 + <div class="bigpic">
  134 + <img src="">
  135 + </div>
  136 + <div class="bigpic none">
  137 + <img src="">
  138 + </div>
  139 + <div class="bigpic none">
  140 + <img src="">
  141 + </div>
  142 + <div class="bigpic none">
  143 + <img src="">
  144 + </div>
  145 + <div class="bigpic none">
  146 + <img src="">
  147 + </div>
  148 + <div class="bigpic none">
  149 + <img src="">
  150 + </div>
  151 + <div class="piclist">
  152 + <span class="pre"></span>
  153 + <div class="con">
  154 + <ul>
  155 + <li class="active"><img src=""></li>
  156 + <li><img src=""></li>
  157 + <li><img src=""></li>
  158 + <li><img src=""></li>
  159 + <li><img src=""></li>
  160 + </ul>
  161 + </div>
  162 + <span class="next"></span>
  163 + </div>
  164 + </div>
  165 + <div class="detail-info">
  166 + <div class="title">
  167 + <h2>哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈{{name}}</h2>
  168 + </div>
  169 + <div class="price">
  170 +
  171 + <span class="newprice">现价:<b class="promotion-price">¥7777{{salePrice}}</b></span>
  172 + <span class="activityprice">活动价:<b class="promotion-price">¥5555{{marketPrice}}</b></span>
  173 +
  174 + </div>
  175 + <div class="order">
  176 + <dl>
  177 + <dd class="colorBox">选颜色:</dd>
  178 + <dt>
  179 + <div class="colorBox">
  180 + <ul>
  181 + <li class="color active">
  182 + <p class="{{#if focus}}atcive{{/if}}"><span></span><img src=""></p>
  183 + <span>{{name}}</span>
  184 + </li>
  185 + <li class="color">
  186 + <p class="{{#if focus}}atcive{{/if}}"><span></span><img src=""></p>
  187 + <span>{{name}}</span>
  188 + </li>
  189 + </ul>
  190 + </div>
  191 + </dt>
  192 + </dl>
  193 + <dl>
  194 + <dd class="showSizeBox">选尺码:</dd>
  195 + <dt>
  196 + <div class="showSizeBox">
  197 + <span data-sku="{{sku}}" data-num="{{num}}" class="disabled">40码{{name}}</span>
  198 + <span data-sku="{{sku}}" data-num="{{num}}">40码{{name}}</span>
  199 + <span data-sku="{{sku}}" data-num="{{num}}">40码{{name}}</span>
  200 + <span data-sku="{{sku}}" data-num="{{num}}">40码{{name}}</span>
  201 + </div>
  202 + <p>内长&nbsp;25.5com</p>
  203 + </dt>
  204 + </dl>
  205 + <dl>
  206 + <dd>选件数:</dd>
  207 + <dt>
  208 + <div class="amount_wrapper">
  209 + <input type="text" id="num" class="num" value="1" readonly="readonly">
  210 + <a class="amount cut"><i class="iconfont">&#xe6c0;</i></a>
  211 + <a class="amount add"><i class="iconfont">&#xe6c1;</i></a>
  212 + </div>
  213 + </dt>
  214 + </dl>
  215 + </div>
  216 + <div class="submit">
  217 + <button class="btn-red"><i class="addCart iconfont">&#xe600;</i>添加到购物车</button>
  218 + <button class="btn-favCount"><i class="favCount iconfont">&#xe68f;</i>收藏商品</button>
  219 + </div>
  220 + </div>
  221 + <div class="detail-size">
  222 + <h3>尺码信息(单位:厘米)</h3>
  223 + <table>
  224 + <thead>
  225 + <tr>
  226 + <th width="{{width}}">吊牌吃吗</th>
  227 + <th width="{{width}}">吊牌吃吗
  228 + </td>
  229 + <th width="{{width}}">吊牌吃吗
  230 + </td>
  231 + <th width="{{width}}">吊牌吃吗
  232 + </td>
  233 + <th width="{{width}}">吊牌吃吗
  234 + </td>
  235 + <th width="{{width}}">吊牌吃吗
  236 + </td>
  237 + </tr>
  238 + </thead>
  239 + <tbody>
  240 + <tr>
  241 + <td>6666{{.}}</td>
  242 + </tr>
  243 + <tr>
  244 + <td>4444{{.}}</td>
  245 + </tr>
  246 + </tbody>
  247 + </table>
  248 + <div class="size-info">
  249 + ※ 以上尺寸为实物实际测量,因测量方式不同会有略微误差,相关数据仅作参考,以收到实物为准。
  250 + </div>
  251 + </div>
  252 + </div>
  253 +
  254 +</div>
  255 +<input value="{{addToCart}}" id="addToCart" type="hidden"/>
  256 +
1 <!-- 凑单 --> 1 <!-- 凑单 -->
2 <div class="detail-body" id="goodsTogetherDetail"> 2 <div class="detail-body" id="goodsTogetherDetail">
3 <div class="slide-img"> 3 <div class="slide-img">
4 - <p>选赠品:<em><span class="active">1元加价购</span><code>|</code><span>59元加价购</span><code>|</code><span>99元加价购</span></em></p> 4 + <p>选赠品:<em><span
  5 + class="active">1元加价购</span><code>|</code><span>59元加价购</span><code>|</code><span>99元加价购</span></em></p>
5 <div class="side-img-dd"> 6 <div class="side-img-dd">
6 <ul class="img-list"> 7 <ul class="img-list">
7 <li class="img-item"> 8 <li class="img-item">
@@ -224,11 +225,16 @@ @@ -224,11 +225,16 @@
224 <thead> 225 <thead>
225 <tr> 226 <tr>
226 <th width="{{width}}">吊牌吃吗</th> 227 <th width="{{width}}">吊牌吃吗</th>
227 - <th width="{{width}}">吊牌吃吗</td>  
228 - <th width="{{width}}">吊牌吃吗</td>  
229 - <th width="{{width}}">吊牌吃吗</td>  
230 - <th width="{{width}}">吊牌吃吗</td>  
231 - <th width="{{width}}">吊牌吃吗</td> 228 + <th width="{{width}}">吊牌吃吗
  229 + </td>
  230 + <th width="{{width}}">吊牌吃吗
  231 + </td>
  232 + <th width="{{width}}">吊牌吃吗
  233 + </td>
  234 + <th width="{{width}}">吊牌吃吗
  235 + </td>
  236 + <th width="{{width}}">吊牌吃吗
  237 + </td>
232 </tr> 238 </tr>
233 </thead> 239 </thead>
234 <tbody> 240 <tbody>
@@ -247,5 +253,5 @@ @@ -247,5 +253,5 @@
247 </div> 253 </div>
248 254
249 </div> 255 </div>
250 -<input value="{{addToCart}}" id="addToCart" type="hidden" /> 256 +<input value="{{addToCart}}" id="addToCart" type="hidden"/>
251 257
@@ -146,15 +146,15 @@ var dialogTpl = require('hbs/cart/cart-togetherGoods.hbs'); @@ -146,15 +146,15 @@ var dialogTpl = require('hbs/cart/cart-togetherGoods.hbs');
146 146
147 lazyLoad($('#details-html img')); 147 lazyLoad($('#details-html img'));
148 148
149 -$('.shop-cart').on('click', '.gift-sell .btn-clear', function() { 149 +/*$('.shop-cart').on('click', '.gift-sell .btn-clear', function() {
150 150
151 var tid = $(this).attr('data-together-id'); 151 var tid = $(this).attr('data-together-id');
152 showTogetherGoods(tid); 152 showTogetherGoods(tid);
153 153
154 -}); 154 +});*/
155 155
156 // 凑单 156 // 凑单
157 -function showTogetherGoods(id) { 157 +/*function showTogetherGoods(id) {
158 158
159 if (!id) { 159 if (!id) {
160 return; 160 return;
@@ -172,7 +172,7 @@ function showTogetherGoods(id) { @@ -172,7 +172,7 @@ function showTogetherGoods(id) {
172 172
173 dialog.show(); 173 dialog.show();
174 174
175 -} 175 +}*/
176 176
177 // 凑单弹框 详情切换 177 // 凑单弹框 详情切换
178 $('body').on('click', '.piclist li', function() { 178 $('body').on('click', '.piclist li', function() {
@@ -403,7 +403,7 @@ $('body').on('click', '.cut, .add', function() { @@ -403,7 +403,7 @@ $('body').on('click', '.cut, .add', function() {
403 403
404 404
405 // 购物车列表 修改 显示隐藏 405 // 购物车列表 修改 显示隐藏
406 -/*$goodsItem.on('click', '.pay-pro-detail', function() { 406 +/* $goodsItem.on('click', '.pay-pro-detail', function() {
407 $('.pay-pro-info').find('span').removeClass('active'); 407 $('.pay-pro-info').find('span').removeClass('active');
408 $(this).addClass('active'); 408 $(this).addClass('active');
409 $('.goods-choose-box').addClass('none'); 409 $('.goods-choose-box').addClass('none');
@@ -461,16 +461,28 @@ $paySum.on('click', '.btn-account', function() { @@ -461,16 +461,28 @@ $paySum.on('click', '.btn-account', function() {
461 var giftBtn = '[data-role=gift-view-btn],[data-role=gift-resel-btn],[data-role=gift-sel-btn]'; 461 var giftBtn = '[data-role=gift-view-btn],[data-role=gift-resel-btn],[data-role=gift-sel-btn]';
462 462
463 $('.shop-cart').on('click', giftBtn, function() { 463 $('.shop-cart').on('click', giftBtn, function() {
  464 +
  465 + var $this = $(this);
464 var mtext = $(this).closest('[data-role=promotion-wrap]').find('textarea[data-role=gifts-cansel]').text(); 466 var mtext = $(this).closest('[data-role=promotion-wrap]').find('textarea[data-role=gifts-cansel]').text();
465 - var mhtml = $(this).closest('[data-role=promotion-wrap]').find('textarea[data-role=gifts-cansel]').html();  
466 - console.log(mtext);  
467 - console.log(mhtml); 467 + // var mhtml = $(this).closest('[data-role=promotion-wrap]').find('textarea[data-role=gifts-cansel]').html();
  468 +
468 var textJson = $.parseJSON(mtext); 469 var textJson = $.parseJSON(mtext);
469 - var htmlJson = $.parseJSON(mhtml); 470 + // var htmlJson = $.parseJSON(mhtml);
  471 +
470 472
471 - console.log(textJson);  
472 - console.log(htmlJson); 473 + var dialog = $this.data('_giftsWin'); // togetherDialog[id];
  474 +console.log(dialog);
  475 + if (!dialog) {
  476 + console.log('create ... ');
  477 + dialog = new Dialog({
  478 + content: dialogTpl(textJson),
  479 + className: 'cart-togetherGoods'
  480 + });
473 481
  482 + $this.data('_giftsWin', dialog);
  483 + }
  484 +
  485 + dialog.show();
474 }); 486 });
475 487
476 require('./cart-action'); 488 require('./cart-action');