Showing
5 changed files
with
26 additions
and
2 deletions
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | </div> | 5 | </div> |
6 | </div> | 6 | </div> |
7 | <div class="lable-info-box"><a href="{{href}}">{{tagName}}</a></div> | 7 | <div class="lable-info-box"><a href="{{href}}">{{tagName}}</a></div> |
8 | - <div class="lable-btn"> | 8 | + <div class="lable-btn add-to-cart" data-skn="{{product_skn}}"> |
9 | <span class="iconfont"></span> | 9 | <span class="iconfont"></span> |
10 | <span class="iconfont plus"></span> | 10 | <span class="iconfont plus"></span> |
11 | </div> | 11 | </div> |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | <span class="sale-price">¥{{sales_price}}</span> | 8 | <span class="sale-price">¥{{sales_price}}</span> |
9 | </p> | 9 | </p> |
10 | <p> | 10 | <p> |
11 | - <span class="check-detail"> | 11 | + <span class="check-detail add-to-cart" data-skn="{{product_skn}}"> |
12 | <span class="iconfont"></span> | 12 | <span class="iconfont"></span> |
13 | <span class="iconfont plus"></span> | 13 | <span class="iconfont plus"></span> |
14 | </span> | 14 | </span> |
public/js/guang/detail/guang-cart.js
0 → 100644
1 | +/* | ||
2 | + * @Author: Targaryen | ||
3 | + * @Date: 2017-05-08 09:43:20 | ||
4 | + * @Last Modified by: Targaryen | ||
5 | + * @Last Modified time: 2017-05-08 10:41:36 | ||
6 | + */ | ||
7 | + | ||
8 | +const $ = require('yoho-jquery'); | ||
9 | +const chosePanel = require('common/chose-panel-new'); | ||
10 | + | ||
11 | +let $addToCart = $('.add-to-cart'); | ||
12 | + | ||
13 | +$addToCart.on('click', function(e) { | ||
14 | + let $this = $(e.currentTarget); | ||
15 | + | ||
16 | + $.post(location.protocol + '//m.yohobuy.com/product/detail/info', | ||
17 | + { | ||
18 | + productSkn: $this.data('skn') | ||
19 | + }, function(data) { | ||
20 | + chosePanel.show({data}); | ||
21 | + }); | ||
22 | +}); |
@@ -28,6 +28,7 @@ let time = 0; | @@ -28,6 +28,7 @@ let time = 0; | ||
28 | require('common'); | 28 | require('common'); |
29 | require('plugin/wx-share')(); | 29 | require('plugin/wx-share')(); |
30 | require('./detail-dynamic'); | 30 | require('./detail-dynamic'); |
31 | +require('./detail/guang-cart'); | ||
31 | 32 | ||
32 | let CollactionBlock = require('./collocation-block'); | 33 | let CollactionBlock = require('./collocation-block'); |
33 | 34 |
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | @import "common/good"; | 2 | @import "common/good"; |
3 | @import "common/loading"; | 3 | @import "common/loading"; |
4 | @import "common/suspend-home"; | 4 | @import "common/suspend-home"; |
5 | +@import "cart/chose-panel"; | ||
5 | @import "detail"; | 6 | @import "detail"; |
6 | @import "tvls"; | 7 | @import "tvls"; |
7 | @import "channel/side-nav"; | 8 | @import "channel/side-nav"; |
-
Please register or login to post a comment