Authored by 刘传洋

Merge branch 'feature/shoppingCart' of http://git.yoho.cn/fe/yohobuy-node into feature/shoppingCart

... ... @@ -29,7 +29,7 @@ const getProductInfo = (req, res, next) => {
const getProductData = (req, res, next) => {
let pid = req.query.productId || '';
service.getProductInfoAsync(pid, req.user.uid).then((result) => {
service.getProductInfoAsync(pid).then((result) => {
return res.send(result);
}).catch(next);
};
... ... @@ -74,7 +74,7 @@ const cart = (req, res, next) => {
.then(ret => {
if (req.query.json === '1') {
return res.send(Object.assign({user: req.user}, ret));
return res.send(ret);
}
if (req.query.page === '1') {
... ... @@ -92,7 +92,7 @@ const cart = (req, res, next) => {
module: 'cart',
page: 'cart',
stepper: stepper,
simpleHeader: simpleHeaderModel.setSimpleHeaderData(req.user),
simpleHeader: simpleHeaderModel.setSimpleHeaderData(),
uid: uid,
cart: ret
});
... ...
... ... @@ -537,16 +537,6 @@ const checkUserIsFavProductList = (uid, pidList) => {
});
};
const checkProductIsFav = (uid, pid) => {
return api.get('', {
method: 'app.favorite.isFavorite',
id: pid,
uid: uid,
type: 'product'
});
};
/**
* 个人中心页面优选新品数据
*
... ... @@ -672,7 +662,6 @@ module.exports = {
savePrePayInfo,
addTicket,
checkUserIsFavProductList,
checkProductIsFav,
newPreference,
modifyProduct,
swapGift,
... ...
... ... @@ -347,7 +347,7 @@ const _detailDataPkg = (origin) => {
/**
* 获取某一个商品详情主页面
*/
const getProductInfoAsync = (pid, uid) => {
const getProductInfoAsync = (pid) => {
return co(function * () {
if (!pid) {
return {};
... ... @@ -373,17 +373,7 @@ const getProductInfoAsync = (pid, uid) => {
let productInfo = requestData[1];
let intro = _getIntroInfo(productSkn, productDescription);
let isFav = false;
if (uid) {
let isFavRet = yield cartApi.checkProductIsFav(uid, pid);
if (isFavRet && isFavRet.code === 200) {
isFav = isFavRet.data;
}
}
return Object.assign({ isFav: isFav }, productInfo, intro);
return Object.assign(productInfo, intro);
})();
};
... ... @@ -420,7 +410,7 @@ const getCartData = (uid, shoppingKey, cartDelList) => {
// 接口异常时,购物车置为空
if (!cartData) {
result.isEmpty = true;
result.isEmpty = false;
// UdpLog::info('【购物车】校验参数传递auth', 'uid:' . $uid . 'shoppingKey:' . $shoppingKey);
return result;
... ... @@ -764,18 +754,6 @@ const checkUserIsFav = (uid, skuList) => {
};
/**
* 检查用户是否收藏这一批商品
*
* @param int $uid 用户ID
* @param array $skuList 商品SKU列表
* @return array
*/
const checkProductIsFav = (uid, pid) => {
return cartApi.checkProductIsFav(uid, pid);
};
/**
* 获取为你优选商品 待处理
*
* @param $channel 频道
... ... @@ -992,7 +970,7 @@ const queryUserPromotionGift = (promotionId, uid, shoppingKey) => {
// 获取选中商品的数据详情
if (currentProduct && currentProduct.id) {
promotionGifts.data.productInfo = yield getProductInfoAsync(currentProduct.id, uid);
promotionGifts.data.productInfo = yield getProductInfoAsync(currentProduct.id);
// 价格为活动价
if (promotionGifts.data.productInfo) {
... ... @@ -1015,7 +993,6 @@ module.exports = {
removeFromCart,
addToFav,
checkUserIsFav,
checkProductIsFav,
getRecommendProduct,
getTogetherProduct,
modifyProduct,
... ...
... ... @@ -25,37 +25,10 @@
<div class="order-pay">
{{#if cart.isEmpty}}
<div class="pay-wapper">
<<<<<<< HEAD
<table>
<thead>
<tr>
<th style="width:7%;">
全选
</th>
<th style="width:40%;">
商品信息
</th>
<th style="width:13%;">单价</th>
<th style="width:10%;">数量</th>
<th style="width:10%;">小计(元)</th>
<th style="width:20%;">操作</th>
</tr>
</thead>
<tbody>
<tr class="pre-sell-box">
<td colspan="6" class="cart-empty">
<a href="{{cart.guangUrl}}">选购商品</a>
<a href="{{cart.viewOrderUrl}}">查看订单</a>
</td>
</tr>
</tbody>
</table>
=======
<div class="shop-cart-empty">
<p>购物车空空的哦,去看看心仪的商品吧~</p>
</div>
>>>>>>> 91cc71042ef15455f75f11fdf21902e4cf115f3a
</div>
<div class="dev-revocation {{#unless cart.deleteShop}}none{{/unless}}">
<table>
... ... @@ -76,18 +49,6 @@
{{^}}
<!-- 购物车商品列表 -->
{{#cart}}
<<<<<<< HEAD
<div class="pay-wapper">
<div class="cart-title">
<p class="left" style="width:6%;">
<input type="checkbox"/> 全选
</p>
<p style="width:40%">商品信息</p>
<p style="width:14%">单价</p>
<p style="width:13%;">数量</p>
<p style="width:16%;">小计(元)</p>
<p class="right" style="width:11%;">操作</p>
=======
<div class="pay-wapper">
<div class="cart-title">
<p class="left" style="width:6%;">
... ... @@ -104,7 +65,6 @@
<!-- 预售商品 -->
<div class="pre-sell">
<code>预售商品</code>预售商品不参加活动,不可使用优惠券,不同上市期的商品我们将为您先到先发。
>>>>>>> 91cc71042ef15455f75f11fdf21902e4cf115f3a
</div>
{{#advanceCart}}
... ... @@ -112,62 +72,6 @@
<div class="pre-sell">
<code>预售商品</code>预售商品不参加活动,不可使用优惠券,不同上市期的商品我们将为您先到先发。
</div>
<<<<<<< HEAD
{{#if goodsList}}
<div class="cart-table">
<ul class="table table-group">
{{#each goodsList}}
{{>cart-item}}
{{/each}}
</ul>
</div>
{{/if}}
{{#if offShelves}}
<div class="cart-table">
<ul class="table table-group">
{{#each offShelves}}
{{>cart-item}}
{{/each}}
</ul>
</div>
{{/if}}
{{#if soldOuts}}
<div class="cart-table">
<ul class="table table-group">
{{#each soldOuts}}
{{>cart-item}}
{{/each}}
</ul>
</div>
{{/if}}
{{/advanceCart}}
{{#ordinaryCart}}
{{#pools}}
{{#if promotionInfos}}
<div class="gift-sell mt40">
{{#promotionInfos}}
<p data-role="promotion-wrap">
<code class="{{#unless isReach}}order-pay-mark-white{{/unless}}">{{tag}}</code>{{promotionTitle}}
<!--<a>去换购</a>-->
{{#if isGift}}
{{#if isNotReach}}<a href="javascript:void(0);" data-role="gift-view-btn">查看赠品</a>{{/if}}
{{#if isSelected}}
<a href="javascript:void(0);" data-role="gift-resel-btn">重选赠品</a>
{{else}}
{{#if isReach}}<a href="javascript:void(0);" data-role="gift-sel-btn">领赠品</a>{{/if}}
{{/if}}
{{/if}}
{{#if isNotReach}}
<a class="btn-clear blue" target="_blank" href="{{promotionPageUrl}}" data-together-id="1" >去凑单&nbsp;></a>
{{/if}}
<textarea data-role="gifts-cansel" class="hide" data-promotionid="{{promotionId}}">{{{giftGoodsListStr}}}</textarea>
</p>
{{/promotionInfos}}
=======
<div class="td pay-pro" style="width: 45%;">
<i class="cart-item-check iconfont cart-item-checked" data-goodstype="{{goodsType}}" {{#if isChecked}}checked{{/if}}></i>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
... ... @@ -272,7 +176,6 @@
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">库存不足{{tipMessage}}</p>
{{/if}}
{{/if}}
>>>>>>> 91cc71042ef15455f75f11fdf21902e4cf115f3a
</div>
{{/if}}
... ... @@ -333,33 +236,6 @@
</div>
{{/if}}
{{/ordinaryCart}}
<<<<<<< HEAD
{{#stat}}
<!-- 总价计算 -->
<div class="cartnew-sum">
{{#unless cart.isEmpty}}
<div class="left">
<a href="javascript:void(0);" class="btn_h" style="display:none;"><span>清空商品</span></a>
<input type="checkbox" id="cbSelAllGoods" {{#if cart.isCheckedAll}}checked="checked"{{/if}}>
<span>全选</span>
<a class="delAll" href="javascript:void(0);">删除选中商品</a>
<a class="removeAll" href="javascript:void(0);">移入收藏夹</a>
<a class="emptyDisabled" href="javascript:void(0);">清空失效商品</a>
</div>
{{/unless}}
<div class="right">
<p>
{{#if gainYohoCoin}}<a href="/help/?category_id=87" class="yoho-coin" target="_blank"></a>
共返有货币:{{gainYohoCoin}}&#12288;&#12288;{{/if}}
已选商品<strong class="ins">{{selectedGoodsCount}}</strong>&#12288;&#12288;
商品金额:<b>¥&nbsp;{{orderAmount}}</b>
</p>
{{#if discountAmount}}<p>活动优惠:<b>&nbsp;{{discountAmount}}</b></p>{{/if}}
<!--<p>优惠码/优惠券:<b>¥&nbsp;8888.00</b></p>-->
<p class="sum">
应付金额(不含邮费):<strong><kbd>¥&nbsp;</kbd>{{lastOrderAmount}}</strong></p>
=======
{{#stat}}
<!-- 总价计算 -->
<div class="cartnew-sum">
... ... @@ -371,16 +247,8 @@
<a class="delAll" href="javascript:void(0);">删除选中商品</a>
<a class="removeAll" href="javascript:void(0);">移入收藏夹</a>
<a class="emptyDisabled" href="javascript:void(0);">清空失效商品</a>
>>>>>>> 91cc71042ef15455f75f11fdf21902e4cf115f3a
</div>
</div>
<<<<<<< HEAD
<div class="cartnew-submit" id="payDiv">
<span>添加礼品袋</span>
<a href="javascript:void(0);" class="btn-account">去结算</a>
</div>
{{/stat}}
=======
</div>
<div class="cartnew-submit" id="payDiv">
<span>添加礼品袋</span>
... ... @@ -594,7 +462,6 @@
</div>
</li>
</ul>
>>>>>>> 91cc71042ef15455f75f11fdf21902e4cf115f3a
</div>
{{/cart}}
... ...
... ... @@ -10,7 +10,7 @@ let helpers = global.yoho.helpers;
/**
* 获取简单头部数据
*/
const setSimpleHeaderData = (user) => {
const setSimpleHeaderData = () => {
let time = Date.now();
let simpleHeader = {
... ... @@ -29,15 +29,6 @@ const setSimpleHeaderData = (user) => {
}
};
if (user && user.uid) {
Object.assign(simpleHeader.tool, {
loginHref: false,
registerHref: false,
user: user.name,
isLogin: true
});
}
return simpleHeader;
};
... ...
... ... @@ -28,26 +28,23 @@
<a href="{{.}}">[免费注册]</a>
{{/ registerHref}}
</li>
{{#isLogin}}
<li class="tool-options">
<span><a href="{{userCenter}}">MY有货</a></span>
<i class="options-icon down iconfont">&#xe610;</i>
<i class="options-icon up iconfont">&#xe615;</i>
<div class="tool-select">
<a href="{{favoriteHref}}">我的收藏</a>
<a href="{{couponHref}}">优惠券</a>
</div>
</li>
{{/isLogin}}
<li>
<li class="tool-options">
<span><a href="{{userCenter}}">MY有货</a></span>
<i class="options-icon down iconfont">&#xe610;</i>
<i class="options-icon up iconfont">&#xe615;</i>
<div class="tool-select">
<a href="{{favoriteHref}}">我的收藏</a>
<a href="{{couponHref}}">优惠券</a>
</div>
</li>
<li>
<a href="{{orderHref}}">订单中心</a>
</li>
<li>
<li>
<a href="{{helpHref}}">帮助中心</a>
</li>
{{/ tool}}
</ul>
</div>
</div>
{{/ simpleHeader}}
{{/ simpleHeader}}
\ No newline at end of file
... ...
No preview for this file type
... ... @@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Mon Jan 16 14:33:27 2017
Created by FontForge 20120731 at Tue Jan 17 16:09:10 2017
By admin
</metadata>
<defs>
... ... @@ -302,9 +302,9 @@ t70 146q17 22 12.5 50t-26.5 44.5t-50.5 12t-44.5 -26.5q-51 -68 -80.5 -153t-29.5 -
d="M409.5 787q124.5 0 212.5 -88t88 -212.5t-88 -212.5t-212.5 -88t-212.5 88t-88 212.5t88 212.5t212.5 88zM409.5 896q-110.5 0 -204.5 -55.5t-149.5 -149.5t-55.5 -204.5t55.5 -205t149.5 -149.5t204.5 -55t205 55t149.5 149.5t55 205t-55 204.5t-149.5 149.5t-205 55.5z
M890 -109l-269 269l115 115l269 -269q14 -14 14 -38t-14 -38l-39 -39q-14 -19 -35.5 -19t-40.5 19z" />
<glyph glyph-name="w" unicode="&#xe6d6;"
d="M512 823q89 0 170 -35t140 -94t94 -140t35 -170t-35 -170t-94 -140t-140 -94t-170 -35t-170 35t-140 94t-94 140t-35 170t35 170t94 140t140 94t170 35zM512 896q-105 0 -200 -40t-163.5 -108.5t-108.5 -163.5t-40 -200q0 -140 68 -258t186 -186t258 -68t258 68t186 186
t68 258q0 105 -40 200t-108.5 163.5t-163.5 108.5t-200 40zM505 245q-18 0 -31 11.5t-13 32.5q0 48 23.5 85.5t64.5 60.5q26 11 42 35.5t16 52.5q0 44 -29 73t-73 29t-73.5 -29t-29.5 -73q0 -16 -13.5 -30t-30 -14t-30 14t-13.5 30q0 77 56.5 133.5t133 56.5t133.5 -56.5
t57 -133.5q0 -56 -27 -101.5t-76 -66.5q-43 -30 -43 -66q0 -18 -12 -31t-32 -13zM505 128zM439 128q0 -27 19 -46.5t46.5 -19.5t47 19.5t19.5 46.5t-19.5 46.5t-47 19.5t-46.5 -19.5t-19 -46.5z" />
d="M512 893q-104 0 -197 -39.5t-160.5 -106.5t-107 -160.5t-39.5 -197t39.5 -197t107 -161t160.5 -107t197 -39.5t197 39.5t160.5 107t107 161t39.5 197t-39.5 197t-107 160.5t-160.5 106.5t-197 39.5zM512 -57q-90 0 -172.5 35.5t-142.5 95.5t-95.5 142.5t-35.5 172.5
t35.5 173t95.5 143t142.5 95.5t172.5 35.5t172.5 -35.5t142.5 -95.5t95.5 -143t35.5 -173t-35.5 -172.5t-95.5 -142.5t-142.5 -95.5t-172.5 -35.5zM512 706q-72 0 -122 -50q-51 -63 -51 -123q0 -16 10 -26t26 -10t26 10t10 26q0 29 29 72q29 29 72 29q38 0 66 -28t28 -65
q0 -28 -16 -52t-42 -35q-33 -16 -52.5 -47t-19.5 -68v-43q0 -16 10 -26t26 -10t26 10t10 26v36q0 21 29 50q48 22 74.5 63t26.5 96q0 63 -50 111.5t-116 53.5zM447 137v0q0 -24 17 -40.5t41 -16.5t40.5 16.5t16.5 40.5v0v0q0 24 -16.5 41t-40.5 17t-41 -17t-17 -41v0z" />
<glyph glyph-name="Slice" unicode="&#xe6d8;" horiz-adv-x="2176"
d="M1696 566h-105q-24 -64 -45 -96q21 0 42 12q3 -30 17 -92q13 -61 37 -115q30 56 43.5 149.5t10.5 141.5zM1792 50q-47 24 -87 58q-36 32 -66 71q-38 -36 -79 -65q-40 -28 -119 -70q-15 33 -51 54q39 5 108 46q69 40 105 80q-24 50 -37 105q-15 61 -26 123l-21 -37
q-12 34 -36 61q36 54 66 135q30 80 42 153q36 -18 78 -27q-15 -15 -30 -47q-18 -39 -33 -79q189 0 231 3v-51q-38 3 -77 3h-4q-3 -92 -21 -182q-18 -94 -57 -160q9 -28 59 -63q47 -36 103 -54q-36 -21 -48 -57v0zM1285 165q-32 -34 -102 -88q-22 28 -54 48q45 21 84 51
... ... @@ -321,5 +321,8 @@ t4.5 46q11 21 36.5 28t45.5 -7l185 -171l293 416q11 21 36 28t46 -7q25 -15 32 -38.5
<glyph glyph-name="bi" unicode="&#xe6c7;"
d="M973 845q-51 51 -119 51t-119 -51l-591 -592q-14 -13 -14 -20l-122 -292q-9 -25 6 -55q26 -26 55 -7l292 123q7 0 21 13l591 592q46 51 46 119t-46 119zM239 206v13l483 483h13l102 -102v-13l-285 -279l-204 -204h-14zM912 777q21 -25 19.5 -57t-26.5 -52l-7 -7h-13
l-102 96v13l13 14q25 21 60.5 19.5t55.5 -26.5zM123 -5l61 143l82 -82z" />
<glyph glyph-name="jinzhi" unicode="&#xe6e0;"
d="M998 384q0 99 -38.5 189t-103.5 155t-155 103.5t-189 38.5t-189 -38.5t-155 -103.5t-103.5 -155t-38.5 -189t38.5 -189t103.5 -155t155 -103.5t189 -38.5t189 38.5t155 103.5t103.5 155t38.5 189zM512 806q152 0 275 -102l-595 -595q-102 123 -102 275q0 85 33.5 163
t90.5 135t135 90.5t163 33.5zM237 64l595 595q102 -123 102 -275q0 -114 -55.5 -211t-153 -154t-213.5 -57q-152 0 -275 102z" />
</font>
</defs></svg>
... ...
No preview for this file type
No preview for this file type
... ... @@ -38,8 +38,7 @@
<div class="product-detail-info"
data-promotionid="{{promotionId}}"
data-maxselectnum="{{maxSelectNumber}}"
{{#if isSwap}}data-isswap="{{isSwap}}"{{/if}}
{{#if isView}}data-isview="{{isView}}"{{/if}}>
{{#if swap}}data-swap="{{swap}}"{{/if}}>
{{#productInfo}}
{{> cart-product-info-tpl}}
{{/productInfo}}
... ...
... ... @@ -76,7 +76,7 @@
{{/each}}
</div>
{{/each}}
<p class="size-p-tip" style="display:none;"><i class="iconfont">&#xe6c2;</i>请选择尺码</p>
<p class="size-p-tip"><i class="iconfont">&#xe6c2;</i>请选择尺码</p>
<!--<p class="size-p">内长&nbsp;25.5com</p>-->
</dt>
</dl>
... ... @@ -92,24 +92,13 @@
</dl>
</div>
<div class="submit">
{{#unless isView}}
<button class="btn-red addcart"><i class="addCart iconfont">&#xe600;</i>添加到购物车</button>
{{/unless}}
{{#if isView}}
<button class="addcart btn-grey"><i class="addCart iconfont">&#xe600;</i>添加到购物车</button>
{{/if}}
<button class="btn-sellOut btn-grey" style="display:none;">
<i class="sellOut iconfont">&#xe6ba;</i>已售罄
</button>
{{#if isFav}}
<button class="btn-favCount"><i class="favCount iconfont coled">&#xe68f;</i>已收藏</button>
{{else}}
<button class="btn-favCount"><i class="favCount iconfont">&#xe68f;</i>收藏商品</button>
{{/if}}
<button class="btn-red addcart"><i class="addCart iconfont">&#xe600;</i>添加到购物车</button>
<button class="addcart btn-grey"><i class="addCart iconfont">&#xe600;</i>添加到购物车</button>
<button class="btn-sellOut btn-grey"><i class="sellOut iconfont">&#xe6e0;</i>已售罄</button>
<button class="btn-favCount"><i class="favCount iconfont">&#xe68f;</i>收藏商品</button>
<button class="btn-favCount"><i class="favCount iconfont coled">&#xe68f;</i>已收藏</button>
</div>
{{#if isView}}
<p class="submit-tip">未满足活动条件</p>
{{/if}}
<p class="submit-tip">未满足活动条件</p>
</div>
<div class="detail-size">
<h3>尺码信息<span>(单位:厘米)</span></h3>
... ...
... ... @@ -4,11 +4,12 @@
var $ = require('yoho-jquery');
var dialog = require('../common/dialog');
var Dialog = dialog.Dialog;
var Alert = dialog.Alert;
var Confirm = dialog.Confirm;
var rDialog = require('./rdialog');
var RConfirm = rDialog.RConfirm;
var Cart;
var RAlert = rDialog.RAlert;
var $cartnewTips = $('.cartnew-tips'),
$payWapper = $('.pay-wapper'),
... ... @@ -21,7 +22,7 @@ $cartnewTips.find('.btn_close').click(function() {
});
// 滚动到第一个选中的商品
/*function scrollToFirst() {
function scrollToFirst() {
var $selected = $payWapper.find('li[data-role="pitem"] .cart-item-check.cart-item-checked:eq(0)');
var top = 0;
... ... @@ -31,7 +32,7 @@ $cartnewTips.find('.btn_close').click(function() {
}
return false;
}*/
}
function toastNoStore(parent) {
... ... @@ -44,10 +45,10 @@ function toastNoStore(parent) {
}, 2000);
}
Cart = {
/* addToCart: function(params) {
var Cart = {
addToCart: function(params) {
},*/
},
toggleSelectOne: function() { // 单选
var $this = $(this);
... ... @@ -142,7 +143,6 @@ Cart = {
var $chk = $(this);
var $item = $chk.closest('[data-role=pitem]');
if ($chk.hasClass('cart-item-checked')) {
if ($item.data('id')) {
... ... @@ -240,7 +240,6 @@ Cart = {
var $item = $(this);
var $chk = $item.find('.cart-item-check');
if ($chk.hasClass('cart-item-checked')) {
if ($item.data('id')) {
... ... @@ -302,13 +301,9 @@ Cart = {
if ($('[data-role="gift-sel-btn"]').length) {
alert('还有赠品未领取!');
}
capi.showMDialog('#Y_CartSelectDialog');
// $('.cart-preSell-dialog').show();
// $('.cart-togetherGoods').show();
... ...
... ... @@ -34,7 +34,6 @@ GoodsWinAction = {
var promotionInfo = $wrap.data('_promotionInfo');
var role = $this.data('role');
var isSwap = role === 'pg-resel-btn' || role === 'gift-resel-btn';
var isView = role === 'gift-view-btn';
var $selectedItem;
var selectedSkn;
... ... @@ -64,7 +63,6 @@ GoodsWinAction = {
promotionInfo = pinfo.data;
promotionInfo.isSwap = isSwap;
promotionInfo.isView = isView;
if (selectedSkn) {
promotionInfo.selectedSkn = selectedSkn;
}
... ... @@ -103,8 +101,6 @@ GoodsWinAction = {
}
}
res.isView = $this.closest('.detail-body').find('.product-detail-info').data('isview');
$goodsSelWin.find('.product-detail-info').empty().append(productInfoTpl(res));
});
},
... ... @@ -191,14 +187,13 @@ GoodsWinAction = {
$this.siblings('span').removeClass('active');
$this.addClass('active');
$this.closest('[data-role=sizes]').find('.size-p-tip').hide();
if (shopNumAll > 0) {
$goodsSelWin.find('.addcart').removeClass('none');
$goodsSelWin.find('.btn-sellOut').addClass('none');
$goodsSelWin.find('.btn_sellout').addClass('none');
} else {
$goodsSelWin.find('.addcart').addClass('none');
$goodsSelWin.find('.btn-sellOut').removeClass('none');
$goodsSelWin.find('.btn_sellout').removeClass('none');
}
},
changeNum: function() {
... ... @@ -242,12 +237,10 @@ GoodsWinAction = {
var sku = $curSize.data('sku');
var skn = $this.closest('.detail-goods').data('skn');
var promotionId = $this.closest('.product-detail-info').data('promotionid') || 0;
var isSwap = $this.closest('.product-detail-info').data('isswap');
var isSwap = $this.closest('.product-detail-info').data('swap');
if ($curSize.length <= 0) {
$this.closest('.detail-info').find('.size-p-tip').show();
// new Alert('请选择尺码').show();
new Alert('请选择尺码').show();
return false;
}
... ...
... ... @@ -5,17 +5,26 @@
*/
var $ = require('yoho-jquery'),
lazyLoad = require('yoho-jquery-lazyload'),
dialog = require('../common/dialog'),
$sellBox = $('.cart-table .pre-sell-box');
require('../plugins/slider');
require('../common/center-slider');
require('../common');
require('../simple-header');
$('.side-img-dd').slider2({
shownum: 5,
isCircle: true
});
// var dialogTpl = require('hbs/cart/cart-togetherGoods.hbs');
lazyLoad($('#details-html img'));
function isCheckAll() {
var isAllCheck = true;
$('[data-role=pitem] [data-role=cart-item-check]').each(function() {
// 有一个没选中,跳出循环
... ... @@ -81,12 +90,6 @@ $(function() {
$(this).removeClass('active').children('ul').addClass('none');
});
$('.side-img-dd').each(function() {
$(this).slider2({
shownum: 5,
isCircle: true
});
});
isCheckAll();
isCheckFav();
... ...
... ... @@ -197,8 +197,30 @@
margin-left: 0;
}
}
.focus {
color: #444;
&:after {
background: url(/cart/step-on.png);
}
}
&.min-step {
width: 220px;
&:before {
width: 0;
}
li {
width: 50%
}
}
}
.cart-table {
border: 1px solid #e0e0e0;
&:not(last-child){
... ... @@ -1272,8 +1294,7 @@
}
&:hover {
.name {
color: #000;
font-weight: 500;
color: #d0021b;
}
}
}
... ...