...
|
...
|
@@ -14,7 +14,20 @@ var $ = require('jquery'); |
|
|
var $num,
|
|
|
$chosed,
|
|
|
re = /\d+/,
|
|
|
leftNum;
|
|
|
leftNum,
|
|
|
$colorList = $('.color-list ul>li'),
|
|
|
$sizeList = $('.size-list ul>li'),
|
|
|
firstColorId = $colorList.eq(0).data('id');
|
|
|
|
|
|
//初始化购物车面板显示
|
|
|
$sizeList.each(function() {
|
|
|
var id = $(this).data('colorid');
|
|
|
|
|
|
|
|
|
if (id === firstColorId) {
|
|
|
$(this).removeClass('hide');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// confirm;
|
|
|
|
...
|
...
|
@@ -39,6 +52,8 @@ var $num, |
|
|
// $num = $('#good-num');
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
function show() {
|
|
|
$('.chose-panel').show();
|
|
|
|
...
|
...
|
@@ -63,12 +78,11 @@ $('.yoho-page').on('touchstart', '.chose-panel', function(e) { |
|
|
remove();
|
|
|
}).on('touchstart', '#chose-btn-sure', function() {
|
|
|
|
|
|
// var
|
|
|
// // goodId,
|
|
|
// // skuId,
|
|
|
// skcId = $('.color-list li.chosed').data('skcid'),
|
|
|
// colorIndex = $('.color-list li.chosed').index(),
|
|
|
// skuArray = $('.size-list').data('skustr').split('/');
|
|
|
// var productSku,
|
|
|
// buyNumber = $('#good-num') - 0;
|
|
|
// promotionId,
|
|
|
// goodsType,
|
|
|
// isEdit;
|
|
|
|
|
|
// //确定
|
|
|
// $chosed = $('.block-list>ul>li.chosed');
|
...
|
...
|
@@ -83,7 +97,7 @@ $('.yoho-page').on('touchstart', '.chose-panel', function(e) { |
|
|
// loading.showLoadingMask();
|
|
|
// $.ajax({
|
|
|
// method: 'POST',
|
|
|
// url: '/product/detail/xxxx',
|
|
|
// url: '/cart/index/add',
|
|
|
// data: {
|
|
|
// product_id: productId,
|
|
|
// content: content
|
...
|
...
|
|