...
|
...
|
@@ -2,21 +2,24 @@ |
|
|
* @Author: Targaryen
|
|
|
* @Date: 2017-05-08 09:43:20
|
|
|
* @Last Modified by: Targaryen
|
|
|
* @Last Modified time: 2017-05-08 10:41:36
|
|
|
* @Last Modified time: 2017-05-08 10:59:37
|
|
|
*/
|
|
|
|
|
|
const $ = require('yoho-jquery');
|
|
|
const chosePanel = require('common/chose-panel-new');
|
|
|
const detailFuns = require('product/detail/functions');
|
|
|
|
|
|
let $addToCart = $('.add-to-cart');
|
|
|
|
|
|
$addToCart.on('click', function(e) {
|
|
|
let $this = $(e.currentTarget);
|
|
|
let productSkn = $this.data('skn');
|
|
|
|
|
|
$.post(location.protocol + '//m.yohobuy.com/product/detail/info',
|
|
|
{
|
|
|
productSkn: $this.data('skn')
|
|
|
}, function(data) {
|
|
|
chosePanel.show({data});
|
|
|
$.post(location.protocol + '//m.yohobuy.com/product/detail/info', {
|
|
|
productSkn: productSkn
|
|
|
}, function(data) {
|
|
|
chosePanel.show({data}).then(result => {
|
|
|
detailFuns.addToCart(result.sku.skuId, productSkn, result.buyNum);
|
|
|
});
|
|
|
});
|
|
|
}); |
...
|
...
|
|