Authored by OF1706

n

... ... @@ -7,7 +7,7 @@
<p class="price">
<span class="sale-price">8888{{salePrice}}</span>
</p>
<a class="btn-add-cart">加入购物车</a>
<a class="btn-add-cart" data-together-id=" " >加入购物车</a>
</li>
<li class="good img-item">
<span class="hide goods-id">{{goods_id}}</span>
... ... @@ -18,7 +18,7 @@
<p class="price">
<span class="sale-price">8888{{salePrice}}</span>
</p>
<a class="btn-add-cart">加入购物车</a>
<a class="btn-add-cart" data-together-id=" " >加入购物车</a>
</li>
<li class="good img-item">
<span class="hide goods-id">{{goods_id}}</span>
... ... @@ -30,7 +30,7 @@
<span class="sale-price sale-price-new">8888{{salePrice}}</span>
<span class="market-price">7777{{marketPrice}}</span>
</p>
<a class="btn-add-cart">加入购物车</a>
<a class="btn-add-cart" data-together-id=" " >加入购物车</a>
</li>
<li class="good img-item">
<span class="hide goods-id">{{goods_id}}</span>
... ... @@ -41,7 +41,7 @@
<p class="price">
<span class="sale-price">8888{{salePrice}}</span>
</p>
<a class="btn-add-cart">加入购物车</a>
<a class="btn-add-cart" data-together-id=" " >加入购物车</a>
</li>
<li class="good img-item">
<span class="hide goods-id">{{goods_id}}</span>
... ... @@ -52,7 +52,7 @@
<p class="price">
<span class="sale-price">8888{{salePrice}}</span>
</p>
<a class="btn-add-cart">加入购物车</a>
<a class="btn-add-cart" data-together-id=" " >加入购物车</a>
</li>
<li class="good img-item">
<span class="hide goods-id">{{goods_id}}</span>
... ... @@ -63,6 +63,6 @@
<p class="price">
<span class="sale-price">8888{{salePrice}}</span>
</p>
<a class="btn-add-cart">加入购物车</a>
<a class="btn-add-cart" data-together-id=" " >加入购物车</a>
</li>
... ...
<!-- 凑单 -->
<div class="detail-body" id="goodsTogetherDetail">
<div class="slide-img">
<p>选赠品:<em><span
class="active">1元加价购</span><code>|</code><span>59元加价购</span><code>|</code><span>99元加价购</span></em></p>
<div class="side-img-dd">
<ul class="img-list">
<li class="img-item">
<span class="hide goods-id">{{goods_id}}</span>
<div class="good">
<a href="{{url}}" target="_blank">
<img class="lazy" src="{{pic_url}}"/>
</a>
</div>
</li>
<li class="img-item">
<span class="hide goods-id">{{goods_id}}</span>
<div class="good">
<a href="{{url}}" target="_blank">
<img class="lazy" src="{{pic_url}}"/>
</a>
</div>
</li>
<li class="img-item">
<span class="hide goods-id">{{goods_id}}</span>
<div class="good">
<a href="{{url}}" target="_blank">
<img class="lazy" src="{{pic_url}}"/>
</a>
</div>
<i class="iconfont checked">&#xe6cb;</i>
</li>
<li class="img-item">
<span class="hide goods-id">{{goods_id}}</span>
<div class="good">
<a href="{{url}}" target="_blank">
<img class="lazy" src="{{pic_url}}"/>
</a>
</div>
</li>
<li class="img-item">
<span class="hide goods-id">{{goods_id}}</span>
<div class="good">
<a href="{{url}}" target="_blank">
<img class="lazy" src="{{pic_url}}"/>
</a>
</div>
</li>
<li class="img-item">
<span class="hide goods-id">{{goods_id}}</span>
<div class="good">
<a href="{{url}}" target="_blank">
<img class="lazy" src="{{pic_url}}"/>
</a>
</div>
</li>
<li class="img-item">
<span class="hide goods-id">{{goods_id}}</span>
<div class="good">
<a href="{{url}}" target="_blank">
<img class="lazy" src="{{pic_url}}"/>
</a>
</div>
</li>
<li class="img-item">
<span class="hide goods-id">{{goods_id}}</span>
<div class="good">
<a href="{{url}}" target="_blank">
<img class="lazy" src="{{pic_url}}"/>
</a>
</div>
</li>
<li class="img-item">
<span class="hide goods-id">{{goods_id}}</span>
<div class="good">
<a href="{{url}}" target="_blank">
<img class="lazy" src="{{pic_url}}"/>
</a>
</div>
</li>
<li class="img-item">
<span class="hide goods-id">{{goods_id}}</span>
<div class="good">
<a href="{{url}}" target="_blank">
<img class="lazy" src="{{pic_url}}"/>
</a>
</div>
</li>
<li class="img-item">
<span class="hide goods-id">{{goods_id}}</span>
<div class="good">
<a href="{{url}}" target="_blank">
<img class="lazy" src="{{pic_url}}"/>
</a>
</div>
</li>
</ul>
</div>
</div>
<div class="detail-goods">
<div class="detail-bigpic">
<div class="bigpic">
... ... @@ -201,7 +104,7 @@
<span data-sku="{{sku}}" data-num="{{num}}">40码{{name}}</span>
<span data-sku="{{sku}}" data-num="{{num}}">40码{{name}}</span>
</div>
<p>内长&nbsp;25.5com</p>
<p class="size-p">内长&nbsp;25.5com</p>
</dt>
</dl>
<dl>
... ... @@ -222,7 +125,7 @@
</div>
<div class="detail-size">
<h3>尺码信息(单位:厘米)</h3>
<table>
<table style="margin-bottom:100px;">
<thead>
<tr>
<th width="{{width}}">吊牌吃吗</th>
... ...
... ... @@ -998,3 +998,10 @@ $('.shop-cart').on('click', giftBtn.join(','), function() {
$('.shop-cart').on('click', '[data-role="cart-gift-win"] .close', function() {
$(this).closest('[data-role="cart-gift-win"]').hide();
});*/
var request = new XMLHttpRequest();
request.open('GET','http://www.mozilla.org/',false);
request.send(null);
if (request.status === 200){
console.log(request.responseText);
}
\ No newline at end of file
... ...
... ... @@ -20,26 +20,32 @@ var Dialog = dialog.Dialog,
RConfirm = rDialog.RConfirm,
RAlert = rDialog.RAlert;
var dialogTpl = require('hbs/cart/cart-togetherGoods.hbs');
var $cartGoodsDetail = $('#goodsTogetherDetail'),
$goodsDetail = $('.detail-goods'),
$payWapper = $('.pay-wapper'),
$goodsChoose = $('#goodsChoose'),
$goodsItem = $('.cart-table li'),
$paySum = $('#pay-sum'),
pacList = 0,
shopNum = 1,
productId,
promotionId,
productnum,
understock,
shopname,
delUrl,
dataJSON,
countJSON,
selectArray,
shopNumAll,
// promotionId,
// productnum,
// understock,
// shopname,
// delUrl,
// dataJSON,
// countJSON,
// selectArray,
// shopNumAll,
confirm,
hasPromotion = false;
var $togetherGoods = $('.individual-item-togetherGoods'),
$recommendGoods = $('.individual-item-recommendGoods'),
$latestWalk = $('.individual-item-latestWalk');
// 优惠券 显示和隐藏
$('.sale-info').mouseenter(function() {
$(this).addClass('active').children('ul').removeClass('none');
... ... @@ -105,21 +111,10 @@ function cartDel(data, delUrl, cookieList) {
);
});*/
// 凑单图片懒加载
var togetherDialog = {};
// var dialogTpl = require('hbs/cart/cart-togetherGoods.hbs');
lazyLoad($('#details-html img'));
// ----------------底部 为你优选,最近浏览 begin--------------
// 推荐、优选、浏览切换
$(function() {
var $togetherGoods = $('.individual-item-togetherGoods'),
$recommendGoods = $('.individual-item-recommendGoods'),
$latestWalk = $('.individual-item-latestWalk');
if ($togetherGoods.hasClass('none')) {
$recommendGoods.show();
... ... @@ -165,7 +160,6 @@ $(function() {
});
});
// 凑单 底部 轮播
function loadSlideGoods() {
$.ajax({
... ... @@ -188,7 +182,7 @@ function loadSlideGoods() {
$('.individual-item ').slider2({
shownum: 5,
isCircle: true
isCircle: false
});
// } else {
... ... @@ -205,6 +199,82 @@ $(function() {
});
// ----------------底部 为你优选,最近浏览 end--------------
// ----------------底部 凑单 begin --------------
// 凑单图片懒加载
var togetherDialog = {};
lazyLoad($('#details-html img'));
// 凑单弹框 显示
$('.shop-cart').on('click', '.btn-add-cart', function() {
var tid = $(this).attr('data-together-id');
showPromotion(tid);
});
function showPromotion(id) {
if (!id) {
return;
}
var d = new Dialog({
content: dialogTpl(),
className: 'cart-togetherGoods'
}).show();
d.$el.on('click', '.cut, .add',function() {
count = $(this).hasClass('minus') ? 'decreaseNum' : 'increaseNum';
// if (promotionId) {
if ($(this).hasClass('cut')) {
new Alert('-_-,已经是最后一件,不能再减了!').show();
} else {
new Alert('最多只能购买一件,您好像购买的太多了!').show();
}
// } else {
if ($(this).hasClass('add')) {
shopNum++;
} else {
shopNum--;
}
if (shopNum < 1) {
new Alert('-_-,已经是最后一件,不能在减了!').show();
shopNum = 1;
return false;
}
$('#num').val(shopNum);
// }
})
}
// $('body').on('click', '.cut, .add', function() {
// count = $(this).hasClass('minus') ? 'decreaseNum' : 'increaseNum';
// // if (promotionId) {
// if ($(this).hasClass('cut')) {
// new Alert('-_-,已经是最后一件,不能再减了!').show();
// } else {
// new Alert('最多只能购买一件,您好像购买的太多了!').show();
// }
// // } else {
// if ($(this).hasClass('add')) {
// shopNum++;
// } else {
// shopNum--;
// }
// if (shopNum < 1) {
// new Alert('-_-,已经是最后一件,不能在减了!').show();
// shopNum = 1;
// return false;
// }
//
// $('#num').val(shopNum);
// // }
//
// })
// 凑单弹框 详情切换
/* $('body').on('click', '.piclist li', function() {
pacList = $(this).index();
... ... @@ -267,31 +337,6 @@ $('body').on('click', '.showSizeBox span', function() {
}
});
$('body').on('click', '.cut, .add', function() {
count = $(this).hasClass('minus') ? 'decreaseNum' : 'increaseNum';
if (promotionId) {
if ($(this).hasClass('cut')) {
new Alert('-_-,已经是最后一件,不能再减了!').show();
} else {
new Alert('最多只能购买一件,您好像购买的太多了!').show();
}
} else {
if ($(this).hasClass('add')) {
shopNum++;
} else {
shopNum--;
}
if (shopNum < 1) {
new Alert('-_-,已经是最后一件,不能在减了!').show();
shopNum = 1;
return false;
}
$('#num').val(shopNum);
}
});*/
// 凑单弹框 商品信息弹出框,加入收藏夹
$cartGoodsDetail.on('click', '.btn-favCount', function() {
$.ajax({
... ... @@ -299,7 +344,7 @@ $cartGoodsDetail.on('click', '.btn-favCount', function() {
dataType: 'json',
url: '',
data: {
productId: productId,
// productId: productId,
type: 'add'
}
}).then(function(d) {
... ... @@ -452,6 +497,9 @@ $goodsChoose.on('click', '.choose-color .dt', function() {
});
*/
// ----------------底部 凑单 end --------------
// 结算
$paySum.on('click', '.btn-account', function() {
// 结算
... ... @@ -513,3 +561,5 @@ $('.shop-cart').on('click', '[data-role="cart-gift-win"] .close', function() {
});
require('./cart-action');
... ...
... ... @@ -326,6 +326,7 @@
.submit {
text-align: left;
margin-top: 15px;
button {
float: none;
line-height:40px;
... ... @@ -334,6 +335,7 @@
font-size: 15px;
color: #444;
margin-right: 20px;
padding: 0;
border: 1px solid #b0b0b0;
background-color: #fff;
box-sizing: border-box;
... ...
... ... @@ -1408,9 +1408,15 @@
float: left;
margin-right: 10px;
width: 190px;
&:nth-child(5n) {
&:nth-child(5n) {
margin-right: 0;
}
&:hover {
.name {
color: #000;
font-weight: 500;
}
}
}
img {
... ...