Authored by 陈峰

eslint + stylelint

Too many changes to show.

To preserve performance only 18 of 18+ files are displayed.

... ... @@ -7,14 +7,13 @@
'use strict';
const helpers = global.yoho.helpers;
const headerModel = require('../../../doraemon/models/header'); // 头部model
const footerModel = require('../../../doraemon/models/footer_tab'); // 底部tab
const indexModel = require('../models/index');
/**
* [购物车首页]
*/
const index = (req, res, next) => {
const index = (req, res) => {
let isLogin = req.user && req.user.uid,
pageData = {
isLogin,
... ... @@ -63,7 +62,7 @@ const indexData = (req, res, next) => {
message: '操作失败'
});
}).catch(next);
}
};
/**
* [选择或者取消商品]
... ... @@ -95,7 +94,7 @@ const select = (req, res, next) => {
message: '操作失败'
});
}).catch(next);
}
};
/**
* [移出购物车]
... ... @@ -127,7 +126,8 @@ const del = (req, res, next) => {
message: '操作失败'
});
}).catch(next);
}
};
/**
* [加入购物车]
*/
... ... @@ -158,7 +158,7 @@ const add = (req, res, next) => {
message: '操作失败'
});
}).catch(next);
}
};
/**
* [获取购物车数据]
... ... @@ -181,26 +181,26 @@ const goodinfo = (req, res, next) => {
}
return indexModel.cartProductData(uid, skn, buyNum).then(data => {
return new Promise((resolve, reject) => {
return new Promise((resolve) => {
if (mnum && data) {
return indexModel.handleBundleInfo(skn).then(result => {
data.discountBuy = result;
resolve(data);
})
});
}
resolve(data);
}).then(data => {
data ? res.json({
}).then(cartInfo => {
cartInfo ? res.json({
code: 200,
cartInfo: data,
cartInfo: cartInfo,
promotionId: promotionId
}) : res.status(400).json({
message: '操作失败'
});
})
});
}).catch(next);
}
};
/**
* [加入收藏]
... ... @@ -209,8 +209,7 @@ const col = (req, res, next) => {
if (!req.xhr) {
return next();
}
let shoppingKey = req.cookies._SPK || '',
uid = req.user && req.user.uid;
let uid = req.user && req.user.uid;
let skuList = req.body.skuList,
cartType = req.cookies.cartType || 'ordinary';
... ... @@ -220,6 +219,7 @@ const col = (req, res, next) => {
message: '参数错误'
});
}
// shoppingKey = 'dc9d09e2ffd8607f2cfd8b9c95962923';
// uid = 20422448;
if (!uid) {
... ... @@ -227,7 +227,7 @@ const col = (req, res, next) => {
code: 401,
message: '请先登录',
data: helpers.urlFormat('/signin.html')
})
});
}
return indexModel.addToFav(uid, skuList, cartType).then(data => {
data ? res.json({
... ... @@ -238,7 +238,7 @@ const col = (req, res, next) => {
});
}).catch(next);
}
};
/**
* [修改购物车数量]
... ... @@ -283,9 +283,10 @@ const modifyNum = (req, res, next) => {
message: data.message
});
}
}).catch(next);
}
};
/**
* [修改购物车数据]
*/
... ... @@ -305,7 +306,7 @@ const modify = (req, res, next) => {
return res.json({
code: 400,
message: '参数错误'
})
});
}
// shoppingKey = 'dc9d09e2ffd8607f2cfd8b9c95962923';
... ... @@ -319,8 +320,9 @@ const modify = (req, res, next) => {
data ? res.json(data) : res.status(400).json({
message: '操作失败'
});
})
}
});
};
/**
* [修改购物车赠品、加价购数据]
*/
... ... @@ -339,7 +341,7 @@ const modifyPriceGift = (req, res, next) => {
return res.json({
code: 400,
message: '参数错误'
})
});
}
// shoppingKey = 'dc9d09e2ffd8607f2cfd8b9c95962923';
... ... @@ -348,8 +350,9 @@ const modifyPriceGift = (req, res, next) => {
data ? res.json(data) : res.status(400).json({
message: '操作失败'
});
})
}
});
};
/**
* [获取赠品商品列表]
*/
... ... @@ -363,6 +366,7 @@ const gift = (req, res, next) => {
// shoppingKey = 'dc9d09e2ffd8607f2cfd8b9c95962923';
// uid = 20422448;
let promise;
if (promotionId) {
promise = indexModel.getPriceGiftList(promotionId);
} else {
... ... @@ -387,7 +391,8 @@ const gift = (req, res, next) => {
cartType: cartType
}));
}).catch(next);
}
};
/**
* [获取加价购商品列表]
*/
... ... @@ -401,6 +406,7 @@ const advanceBuy = (req, res, next) => {
// shoppingKey = 'dc9d09e2ffd8607f2cfd8b9c95962923';
// uid = 20422448;
let promise;
if (promotionId) {
promise = indexModel.getPriceGiftList(promotionId);
} else {
... ... @@ -425,7 +431,8 @@ const advanceBuy = (req, res, next) => {
cartType: cartType
}));
}).catch(next);
}
};
/**
* [获取购物车加价购商品数据]
*/
... ... @@ -440,17 +447,17 @@ const giftinfo = (req, res, next) => {
return res.json({
code: 400,
message: '参数错误'
})
});
}
return indexModel.giftProductData(skn, promotionId).then(data => {
return indexModel.giftProductData(skn, promotionId).then(data => {
data ? res.json({
promotionId: promotionId,
cartInfo: data
}) : res.status(400).json({
message: '操作失败'
});
})
}
});
};
module.exports = {
index,
... ...
/**
<<<<<<< HEAD
* sub app cart
* @author: xuan.chen@yoho.cn<xuan.chen@yoho.cn>
* @date: 2016/09/26
=======
* sub app guang
* @author: Bi Kai<kai.bi@yoho.cn>
* @date: 2016/05/09
>>>>>>> feature/payment
*/
var express = require('express'),
... ...
... ... @@ -7,7 +7,6 @@
'use strict';
const api = global.yoho.API;
const cartProcess = require(global.utils + '/cart-process');
const detailModel = require('../../product/models/detail');
/**
* 获取购物车信息
... ... @@ -47,7 +46,7 @@ const selectGood = (uid, sku, shoppingKey, cartType) => {
}).then((data) => {
return data.code === 200 ? cartProcess.processData(data, cartType) : undefined;
});
}
};
/**
* 移出购物车
... ... @@ -66,7 +65,8 @@ const removeFromCart = (uid, sku, shoppingKey, cartType) => {
}).then((data) => {
return data.code === 200 ? cartProcess.processData(data, cartType) : undefined;
});
}
};
/**
* 获取购物车商品数据
*
... ... @@ -82,9 +82,9 @@ const cartProductData = (uid, skn, num) => {
uid: uid,
showcomment: 'N'
}).then((data) => {
return data.code === 200 ? cartProcess.procGoodsDetail(data.data, num) : undefined
return data.code === 200 ? cartProcess.procGoodsDetail(data.data, num) : undefined;
});
}
};
/**
* 修改购物车商品数量-增加
... ... @@ -103,7 +103,8 @@ const increaseProductNum = (uid, sku, increaseNum, shoppingKey) => {
uid: uid,
shopping_key: shoppingKey
});
}
};
/**
* 修改购物车商品数量-减少
*
... ... @@ -121,7 +122,7 @@ const decreaseProductNum = (uid, sku, decreaseNum, shoppingKey) => {
uid: uid,
shopping_key: shoppingKey
});
}
};
/**
* 修改购物车商品数据
... ... @@ -138,7 +139,8 @@ const modifyCartProduct = (uid, swapData, shoppingKey) => {
uid: uid,
shopping_key: shoppingKey
});
}
};
/**
* 修改购物车赠品、加价购数据
*
... ... @@ -156,7 +158,8 @@ const modifyCartPriceGiftProduct = (uid, newProductSku, newProductSkn, promotion
uid: uid,
shopping_key: shoppingKey
});
}
};
/**
* 移入收藏夹
*
... ... @@ -173,7 +176,8 @@ const addToFav = (uid, sku, shoppingKey, cartType) => {
}).then((data) => {
return data.code === 200 ? cartProcess.processData(data, cartType) : undefined;
});
}
};
/**
* 加入购物车
*
... ... @@ -198,7 +202,7 @@ const addToCart = (productSku, buyNumber, goodsType, isEdit, promotionId, uid, s
uid: uid,
shopping_key: shoppingKey
});
}
};
/**
* 获取商品的套餐量贩信息
... ... @@ -212,7 +216,8 @@ const handleBundleInfo = (productSkn) => {
}).then(data => {
return data.code === 200 ? cartProcess.handleBundleInfo(data) : undefined;
});
}
};
/**
* 获取加价购商品数据
*
... ... @@ -228,7 +233,7 @@ const giftProductData = (skn, promotionId) => {
}).then(data => {
return data.code === 200 ? cartProcess.procGoodsDetail(data.data) : undefined;
});
}
};
/**
* [获取赠品、加价购促销商品列表]
... ... @@ -240,7 +245,7 @@ const getPriceGiftList = (promotionId) => {
}).then((data) => {
return data.code === 200 ? cartProcess.procPriceGiftData(data.data) : undefined;
});
}
};
module.exports = {
indexData,
... ... @@ -256,4 +261,4 @@ module.exports = {
giftProductData,
getPriceGiftList,
modifyCartPriceGiftProduct
}
\ No newline at end of file
};
... ...
... ... @@ -4,11 +4,11 @@
{{#if isPromotion}}
<div class="promotion-header {{#if promotionMore}}more-box{{/if}}">
{{#promotions}}
<div class="promo-item" data-id="{{promotionId}}" data-title="{{promotionOriginTitle}}" data-type="{{promotionType}}">
<div class="promo-item" data-id="{{promotionId}}" data-title="{{promotionOriginTitle}}" data-type="{{promotionType}}" data-status="{{status}}">
<div class="info"><i class="iconfont cuxiao"></i>{{promotionTitle}}</div>
{{#if optTitle}}
<div class="opt to-gift">
<a href="javascript:;" data-status="{{status}}">{{optTitle}}</a><i class="iconfont to-arrow"></i>
<a href="javascript:;">{{optTitle}}</a><i class="iconfont to-arrow"></i>
</div>
{{/if}}
</div>
... ... @@ -21,7 +21,7 @@
{{#if isPromotion}}
<div class="promos {{#if promotionMore}}more-box{{/if}}">
{{#promotions}}
<div class="promo-item" data-id="{{promotionId}}" data-title="{{promotionOriginTitle}}" data-type="{{promotionType}}">
<div class="promo-item" data-id="{{promotionId}}" data-title="{{promotionOriginTitle}}" data-type="{{promotionType}}" data-status="{{status}}">
<div class="info">
<span class="flag">{{promotionFlag}}</span>{{promotionTitle}}
</div>
... ...
... ... @@ -68,7 +68,7 @@ var C_ID;
require('../common');
C_ID = window._ChannelVary[window.cookie('_Channel')];
C_ID = window._ChannelVary[window.cookie('_Channel')];
// 禁用数字编辑
function disableNumEdit() {
... ... @@ -280,7 +280,7 @@ function displayGoodNum(curGoodNum) {
// 老的选中尺码去掉勾选,新的选中尺码加上勾选
function changeSizeChosed(newSizeIndex) {
var sizes,
queryString,
sizeBlock,
i;
if (curColorIndex && $curSizeBlock && $curSizeBlock.length > 0) {
... ... @@ -289,8 +289,8 @@ function changeSizeChosed(newSizeIndex) {
for (i = 0; i < sizes.length; i++) {
if ($(sizes[i]).data('id') === $curSizeBlock.data('id')) {
$curSizeBlock = $(sizes[i]);
queryString = '#' + $curSizeBlock.data('id');
curColorIndex = $(queryString).data('index');
sizeBlock = '#' + $curSizeBlock.data('id');
curColorIndex = $(sizeBlock).data('index');
$curSizeBlock.addClass('chosed');
return $curSizeBlock.data('num');
}
... ... @@ -618,7 +618,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
$chosed = $('.block-list>ul>li.chosed');
setTimeout(function() {
if (window._yas && window._yas.sendCustomInfo) {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_GDS_DT_ADD_TO_SC',
param: JSON.stringify({
... ... @@ -630,7 +630,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
})
}, true);
}
})
});
if ($chosed.length === 2 && $chosed.closest('.zero-stock').length === 0) {
isSecKills = $('.seckill-time').length; // 秒杀标记
... ...
module.exports = {
"alg": "SALT_MD5",
"code": 200,
"data": {
"advance_cart_data": {
"gift_list": [],
"goods_list": [],
"off_shelves_goods_list": [],
"price_gift": [],
"promotion_info": [],
"promotion_pool_list": [],
"shopping_cart_data": {
"discount_amount": 0,
"fast_shopping_cost": 15,
"gain_yoho_coin": 0,
"goods_count": 0,
"has_invalid_goods": 0,
"is_multi_package": "N",
"last_order_amount": 0,
"offline_goods_count": 0,
"online_goods_count": 0,
"order_amount": 0,
"package_list": [],
"promotion_formula": "总计¥0.00=商品金额¥0.00",
"promotion_formula_list": [
{
"promotion": "商品金额",
"promotion_amount": "¥0.00"
}
],
"remain_time": 0,
"selected_goods_count": 0,
"shipping_cost": 10,
"str_discount_amount": "¥0.00",
"str_order_amount": "¥0.00"
},
"sold_out_goods_list": []
},
"ordinary_cart_data": {
"gift_list": [],
"goods_list": [],
"off_shelves_goods_list": [],
"price_gift": [],
"promotion_info": [],
"promotion_pool_list": [
{
"goods_list": [
{
"attribute": "1",
"brand_domain": "5CM",
"brand_id": "4",
"brand_name": "5cm",
"buy_limit": 0,
"buy_number": "1",
"buy_type": 2,
"can_cod_pay": "Y",
"cn_alphabet": "5CM5CXSTB8117F55ChenShan",
"color_id": "2",
"color_name": "黑色",
"delay_notice": "",
"discount_tag": "",
"expect_arrival_time": "",
"factory_goods_name": "黑色",
"fit_promotions": [],
"get_yoho_coin": "0",
"goods_id": "352263",
"goods_images": "http://img12.static.yhbimg.com/goodsimg/2015/11/02/10/0239295214e59200bcad3af41522646fb1.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/80",
"goods_type": "ordinary",
"is_advance": "N",
"is_deposit_advance": "N",
"is_jit": "N",
"is_limited": "N",
"is_outlets": "N",
"is_special": "N",
"last_price": "259.0",
"last_vip_price": 259,
"local_buy_number": 0,
"market_price": 839,
"max_sort_id": "1",
"middle_sort_id": "12",
"min_buy_number": 1,
"off_shelves": 0,
"offline_goods_status": 1,
"offline_storage_number": 0,
"offline_storage_status": 1,
"online_storage_number": 0,
"product_id": 272565,
"product_name": "5CM 3D立体印花衬衫",
"product_skc": "278071",
"product_skn": "51151583",
"product_sku": "888728",
"promotion_flag": "0",
"promotion_id": "0",
"real_price": 259,
"real_vip_price": 0,
"sale_price": 0,
"sales_price": 259,
"selected": "N",
"shop_id": 0,
"shopping_cart_goods_id": "60244",
"shopping_cart_id": "118792348",
"shopping_key": "2a7729e3e974cfe476e4472a89c13743",
"size_id": "207",
"size_name": "S",
"small_sort_id": "115",
"storage_number": "7",
"store_id": 0,
"str_subtotal": "¥259.00",
"subtotal": 259,
"supplier_id": 0,
"tags": [],
"uid": "8040155",
"vip1_price": "0.00",
"vip2_price": "0.00",
"vip3_price": "0.00",
"vip_discount": 1,
"vip_discount_money": 0,
"vip_discount_type": "3",
"vip_price": 0,
"wareHouseId": 0,
"yoho_coin_num": "0"
}
],
"promotion_list": [
{
"alreadyMatch": false,
"condition_unit": 1,
"condition_value": -2,
"gift_goods_List": [],
"gift_price": 0,
"promotion_id": 9042,
"promotion_title": "james 5cm两件5折",
"promotion_type": "Discount",
"status": 0
},
{
"alreadyMatch": false,
"condition_unit": 1,
"condition_value": -1,
"gift_goods_List": [],
"gift_price": 0,
"promotion_id": 9004,
"promotion_title": "5cm 赠品",
"promotion_type": "Gift",
"status": 0
},
{
"alreadyMatch": false,
"condition_unit": 2,
"condition_value": -899,
"gift_goods_List": [],
"gift_price": 0,
"promotion_id": 6193,
"promotion_title": "【5CM 新品】 满¥899赠潮袜",
"promotion_type": "Gift",
"status": 0
},
{
"alreadyMatch": false,
"condition_unit": 2,
"condition_value": -300,
"gift_goods_List": [],
"gift_price": 0,
"promotion_id": 9080,
"promotion_title": "线下店满300减30勿动",
"promotion_type": "Cashreduce",
"status": 0
},
{
"alreadyMatch": false,
"condition_unit": 1,
"condition_value": -1,
"gift_goods_List": [],
"gift_price": 0,
"promotion_id": 9156,
"promotion_title": "5CM 促销",
"promotion_type": "Discount",
"status": 0
}
],
"sub_promotion_list": []
},
{
"goods_list": [
{
"attribute": "1",
"brand_domain": "Android Homme",
"brand_id": "813",
"brand_name": "androidhomme",
"buy_limit": 0,
"buy_number": "1",
"buy_type": 2,
"can_cod_pay": "Y",
"cn_alphabet": "ANDROIDHOMMEAHP1510024PROPULSIONHI",
"color_id": "11",
"color_name": "红色",
"delay_notice": "",
"discount_tag": "",
"expect_arrival_time": "12月",
"factory_goods_name": "红色",
"fit_promotions": [],
"get_yoho_coin": "0",
"goods_id": "423037",
"goods_images": "http://img10.static.yhbimg.com/goodsimg/2015/12/14/08/01911a55ae0a88128358f2029683cdf908.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/80",
"goods_type": "ordinary",
"is_advance": "N",
"is_deposit_advance": "N",
"is_jit": "N",
"is_limited": "N",
"is_outlets": "N",
"is_special": "N",
"last_price": "11.0",
"last_vip_price": 11,
"local_buy_number": 0,
"market_price": 2950,
"max_sort_id": "6",
"middle_sort_id": "44",
"min_buy_number": 1,
"off_shelves": 0,
"offline_goods_status": 1,
"offline_storage_number": 0,
"offline_storage_status": 1,
"online_storage_number": 0,
"product_id": 328777,
"product_name": "葡萄牙原产 Android Homme PROPULSION HI 中性高帮休闲鞋 红色",
"product_skc": "319742",
"product_skn": "51184089",
"product_sku": "1002521",
"promotion_flag": "109",
"promotion_id": "0",
"real_price": 11,
"real_vip_price": 0,
"sale_price": 0,
"sales_price": 11,
"selected": "N",
"shop_id": 0,
"shopping_cart_goods_id": "60240",
"shopping_cart_id": "118792348",
"shopping_key": "2a7729e3e974cfe476e4472a89c13743",
"size_id": "129",
"size_name": "43码",
"small_sort_id": "147",
"storage_number": "5",
"store_id": 0,
"str_subtotal": "¥11.00",
"subtotal": 11,
"supplier_id": 0,
"tags": [],
"uid": "8040155",
"vip1_price": "10.45",
"vip2_price": "9.90",
"vip3_price": "9.68",
"vip_discount": 1,
"vip_discount_money": 0,
"vip_discount_type": "1",
"vip_price": 11,
"wareHouseId": 0,
"yoho_coin_num": "0"
},
{
"attribute": "1",
"brand_domain": "5CM",
"brand_id": "4",
"brand_name": "5cm",
"buy_limit": 0,
"buy_number": "1",
"buy_type": 2,
"can_cod_pay": "Y",
"cn_alphabet": "5CM5CXSTT8109F55ChenShan",
"color_id": "7",
"color_name": "蓝色",
"delay_notice": "",
"discount_tag": "",
"expect_arrival_time": "",
"factory_goods_name": "蓝色",
"fit_promotions": [],
"get_yoho_coin": "0",
"goods_id": "352259",
"goods_images": "http://img12.static.yhbimg.com/goodsimg/2015/11/03/03/0246270e89981ca3d5835193cf328cd28b.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/80",
"goods_type": "ordinary",
"is_advance": "N",
"is_deposit_advance": "N",
"is_jit": "N",
"is_limited": "N",
"is_outlets": "N",
"is_special": "N",
"last_price": "11.0",
"last_vip_price": 11,
"local_buy_number": 0,
"market_price": 739,
"max_sort_id": "1",
"middle_sort_id": "12",
"min_buy_number": 1,
"off_shelves": 0,
"offline_goods_status": 1,
"offline_storage_number": 0,
"offline_storage_status": 1,
"online_storage_number": 0,
"product_id": 272563,
"product_name": "5CM 字母刺绣纯色衬衫",
"product_skc": "278069",
"product_skn": "51151582",
"product_sku": "888719",
"promotion_flag": "0",
"promotion_id": "0",
"real_price": 11,
"real_vip_price": 0,
"sale_price": 0,
"sales_price": 11,
"selected": "N",
"shop_id": 0,
"shopping_cart_goods_id": "60242",
"shopping_cart_id": "118792348",
"shopping_key": "2a7729e3e974cfe476e4472a89c13743",
"size_id": "203",
"size_name": "M",
"small_sort_id": "115",
"storage_number": "6",
"store_id": 0,
"str_subtotal": "¥11.00",
"subtotal": 11,
"supplier_id": 0,
"tags": [],
"uid": "8040155",
"vip1_price": "10.45",
"vip2_price": "9.90",
"vip3_price": "9.68",
"vip_discount": 1,
"vip_discount_money": 0,
"vip_discount_type": "1",
"vip_price": 11,
"wareHouseId": 0,
"yoho_coin_num": "0"
}
],
"promotion_list": [
{
"alreadyMatch": false,
"condition_unit": 1,
"condition_value": -2,
"gift_goods_List": [],
"gift_price": 0,
"promotion_id": 9102,
"promotion_title": "买一送一(dev)",
"promotion_type": "Cheapestfree",
"status": 0
}
],
"sub_promotion_list": []
}
],
"shopping_cart_data": {
"discount_amount": 0,
"fast_shopping_cost": 15,
"gain_yoho_coin": 0,
"goods_count": 3,
"has_invalid_goods": 0,
"is_multi_package": "N",
"last_order_amount": 0,
"offline_goods_count": 0,
"online_goods_count": 0,
"order_amount": 0,
"package_list": [],
"promotion_formula": "总计¥0.00=商品金额¥0.00",
"promotion_formula_list": [
{
"promotion": "商品金额",
"promotion_amount": "¥0.00"
}
],
"remain_time": 0,
"selected_goods_count": 0,
"shipping_cost": 10,
"str_discount_amount": "¥0.00",
"str_order_amount": "¥0.00"
},
"sold_out_goods_list": []
}
},
"md5": "ee0be93e30274f6e49c22dcfe2d1012c",
"message": "cart goods list."
}
\ No newline at end of file
... ... @@ -26,24 +26,32 @@ function getProductInfo(skn, promotionId) {
skn: skn,
promotionId: promotionId
}).then(function(data) {
if (!data) {
tip.show('网络错误');
return;
}
//删掉页面上原有的pannel
chosePanel.remove();
let html = require('common/chose-panel.hbs')(data);
$(html).appendTo('#chose-panel');
if (queryString.edit) {
// 删掉页面上原有的pannel
chosePanel.remove();
$(html).appendTo('#chose-panel');
chosePanel.init();
chosePanel.setEditModeWithSknId(skn, true, true);
chosePanel.disableNumEdit();
chosePanel.show('', function() {
window.location.href = '/cart/index/index?cartType=' + queryString.cartType;
});
} else {
chosePanel.show(html, function() {
window.location.href = '/cart/index/index?cartType=' + queryString.cartType;
});
}
chosePanel.init();
chosePanel.setEditModeWithSknId(skn, true, true);
chosePanel.disableNumEdit();
chosePanel.show('', function() {
// window.location.href = '/cart/index/index?cartType=' + queryString.cartType;
});
}, function() {
tip.show('网络错误');
}).always(function() {
... ...
... ... @@ -5,10 +5,9 @@
*/
'use strict';
require('cart/index.page.css')
require('cart/index.page.css');
require('../common');
let testData = require('./data.json'),
$ = require('yoho-jquery'),
let $ = require('yoho-jquery'),
hbsTemplate = require('cart/index/index.hbs'),
lazyLoad = require('yoho-jquery-lazyload');
... ... @@ -19,14 +18,13 @@ let indexObj = {
let self = this;
$('.nav-btn').on('click', () => {
$('.main-wrap').toggleClass('edit')
$('.main-wrap').toggleClass('edit');
if ($('.main-wrap').hasClass('edit')) {
self.editMode = true;
} else {
self.editMode = false;
}
})
});
self.refreshPage();
require('./index/recommend-for-you').init(self);
},
... ... @@ -40,30 +38,30 @@ let indexObj = {
let self = this;
if (!data) {
return self.getCartData().then(data => {
return self.renderPage(data.data, true)
})
return self.getCartData().then(cartData => {
return self.renderPage(cartData.data, true);
});
}
return self.renderPage(data);
},
renderPage(data, no_try) {
let self = this;
if ((!data || (!data.commonCart && !data.preSellCart)) && no_try != true) {
self.refreshPage()
if ((!data || (!data.commonCart && !data.preSellCart)) && no_try !== true) {
self.refreshPage();
return;
}
let cartType = window.cookie('cartType') || 'ordinary';
// 普通购物车空,则显示预售购物车
if (data.commonGoodsCount === 0 && data.ordinarySoldOut === 0) {
data.cartNav = false;
data.cartType = 'advance';
} // 预售购物车空,则显示普通购物车
else if (data.presellGoodsCount === 0 && data.advanceSoldOut === 0) {
} else if (data.presellGoodsCount === 0 && data.advanceSoldOut === 0) { // 预售购物车空,则显示普通购物车
data.cartNav = false;
data.cartType = 'ordinary';
} // 以上两个购物车中都有数据, 默认显示普通购物车
else {
} else { // 以上两个购物车中都有数据, 默认显示普通购物车
data.cartNav = true;
data.cartType = cartType || 'ordinary';
}
... ... @@ -76,8 +74,9 @@ let indexObj = {
lazyLoad($('img.lazy'));
return Promise.resolve();
}
}
};
$(() => {
indexObj.init();
})
\ No newline at end of file
})
;
\ No newline at end of file
... ...
... ... @@ -19,11 +19,12 @@ let cartObj = {
$('.cart-nav').on('click', 'li', function() {
let type = $(this).data('type');
window.setCookie('cartType', type);
self.handle.refreshPage('');
});
});
$('.more-box>.down-arrow').on('click', function() {
$(this).parent().toggleClass('down')
$(this).parent().toggleClass('down');
});
$('.btn-balance').on('click', function() {
self.toBalance();
... ... @@ -33,43 +34,55 @@ let cartObj = {
let promotionType = $(this).data('type');
let promotionTitle = encodeURIComponent($(this).data('title'));
let title = '促销商品';
if (promotionType === 'Gift' ) {
window.location.href = `/cart/index/new/gift?promotion_id=${promotionId}&title=${title}&intro_text=${promotionTitle}&cartType=${cartType}`;
if (promotionType === 'Gift') {
if ($(this).data('status') === 30) {
window.location.href = `/cart/index/new/gift?promotion_id=${promotionId}&title=${title}&intro_text=${promotionTitle}&cartType=${cartType}&edit=1`;
} else {
window.location.href = `/cart/index/new/gift?promotion_id=${promotionId}&title=${title}&intro_text=${promotionTitle}&cartType=${cartType}`;
}
} else if (promotionType === 'Needpaygift') {
window.location.href = `/cart/index/new/advanceBuy?promotion_id=${promotionId}&title=${title}&intro_text=${promotionTitle}&cartType=${cartType}`;
if ($(this).data('status') === 30) {
window.location.href = `/cart/index/new/advanceBuy?promotion_id=${promotionId}&title=${title}&intro_text=${promotionTitle}&cartType=${cartType}&edit=1`;
} else {
window.location.href = `/cart/index/new/advanceBuy?promotion_id=${promotionId}&title=${title}&intro_text=${promotionTitle}&cartType=${cartType}`;
}
} else {
window.location.href = `/product/index/index?promotion_id=${promotionId}&title=${title}&intro_text=${promotionTitle}&cartType=${cartType}`;
}
})
});
$('.all-gift-box').on('click', '.gift-item', (e) => {
if ($(e.currentTarget).hasClass('advanceBuy')) {
window.location.href = '/cart/index/new/advanceBuy?cartType=' + cartType;
} else {
window.location.href = '/cart/index/new/gift?cartType=' + cartType;
}
})
});
},
toBalance() {
let self = this;
let cartType = window.cookie('cartType') || 'ordinary';
if (window._yas && window._yas.sendCustomInfo) {
var productId = Array.from($('.good-item.is-checked').map((i,e) => $(e).data('id')));
var productId = Array.from($('.good-item.is-checked').map((i, e) => $(e).data('id')));
setTimeout(function() {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_SC_TOBUY_CLICK',
param: JSON.stringify({
C_ID: C_ID,
C_ID: window.C_ID,
PRD_ID: productId.join(','),
})
}, true);
}
}
}, 200);
}
let lowStocks = $('.good-item.low-stocks.is-checked').length;
if (lowStocks > 0) {
tip.show(`所选商品中有${lowStocks}种库存不足的商品`);
return false;
... ... @@ -94,6 +107,6 @@ let cartObj = {
}
window.location.href = '/cart/index/orderEnsure?cartType=' + cartType;
}
}
};
module.exports = cartObj;
\ No newline at end of file
module.exports = cartObj;
... ...
... ... @@ -15,6 +15,7 @@ let $ = require('yoho-jquery'),
let goodObj = {
init(handle) {
let self = this;
self.handle = handle;
$('.good-item').on('click', '.num-opt .btn', function(e) {
... ... @@ -30,8 +31,8 @@ let goodObj = {
$('.good-item').on('click', '.chk.edit', function() {
$(this).toggleClass('checked');
});
$('.btn-fav').on('click', function () {
$('.btn-fav').on('click', function() {
if (!$('.good-item .chk.edit.checked').length) {
tip.show('请至少选择一件商品');
return;
... ... @@ -45,9 +46,10 @@ let goodObj = {
}, () => {
dialog.hideDialog();
});
})
});
$('.good-item').on('click', '.size-info', function(e) {
let isGift = $(e.delegateTarget).hasClass('is-gift');
self.openChosepanel(e, isGift);
});
$('.good-item').on('click', '.name,.color-size-row,.img', function(e) {
... ... @@ -61,27 +63,29 @@ let goodObj = {
if (self.handle.editMode) {
$(this).find('.chk.edit').toggleClass('checked');
if ($(this).find('.chk.edit').hasClass('checked')) {
$('.good-item .chk.edit').addClass('checked');
$('.good-item .chk.edit').addClass('checked');
} else {
$('.good-item .chk.edit').removeClass('checked');
}
} else {
$(this).find('.chk.select').toggleClass('checked');
let checked = $(this).find('.chk.select').hasClass('checked');
if (checked) {
let promise = self.clearLowStock();
if (promise) {
tip.show('您全选的商品中存在库存不足商品,已帮您自动取消勾选');
promise.then(() => {
self.selectGood($('.good-item:not(.low-stocks) .chk.select'), true);
})
});
} else {
self.selectGood($('.good-item:not(.low-stocks) .chk.select'), true);
}
} else {
self.selectGood($('.good-item .chk.select'), false);
}
}
});
$('.btn-del').on('click', function() {
... ... @@ -95,7 +99,7 @@ let goodObj = {
leftBtnText: '取消',
rightBtnText: '确定'
}
}, function() {
}, function() {
self.delGood($('.good-item .chk.edit.checked')).then(() => {
dialog.showDialog({
dialogText: '删除成功',
... ... @@ -105,8 +109,8 @@ let goodObj = {
}, () => {
dialog.hideDialog();
});
})
});
});
$('.btn-remove').on('click', function() {
dialog.showDialog({
... ... @@ -118,6 +122,7 @@ let goodObj = {
}, function() {
((callback) => {
let promise = self.removeAllDisabled();
if (promise) {
promise.then(() => {
callback();
... ... @@ -125,7 +130,7 @@ let goodObj = {
dialog.hideDialog();
});
} else {
callback();
return callback();
}
})(() => {
dialog.showDialog({
... ... @@ -133,11 +138,11 @@ let goodObj = {
autoHide: true,
fast: true
});
})
})
})
});
});
});
self.clearLowStock();
},
selectGood(eles, selectAll) {
... ... @@ -167,7 +172,7 @@ let goodObj = {
}, err => {
tip.show(err.responseJSON ? err.responseJSON.message : '网络异常');
});
},
delGood(eles) {
let self = this;
... ... @@ -217,7 +222,7 @@ let goodObj = {
tip.show(data.message);
setTimeout(() => {
window.location.href = data.data;
}, 1000)
}, 1000);
}
}, err => {
tip.show(err.responseJSON ? err.responseJSON.message : '网络异常');
... ... @@ -233,7 +238,7 @@ let goodObj = {
let goodInfo = {};
goodInfo.goods_type = $('#cartType').val();
if (selectAll != undefined) {
if (selectAll !== undefined) {
goodInfo.selected = selectAll ? 'Y' : 'N';
} else {
goodInfo.selected = $this.hasClass('checked') ? 'N' : 'Y';
... ... @@ -242,10 +247,10 @@ let goodObj = {
goodInfo.promotion_id = promotion;
goodInfo.buy_number = $good.find('.good-num').val();
return goodInfo;
}))
}));
},
showEditPannelWithSku (html, id, isSelected, isEditNum, isGift, e) {
showEditPannelWithSku(html, id, isSelected, isEditNum, isGift, e) {
let self = this;
if (html.length < 2) {
... ... @@ -253,7 +258,7 @@ let goodObj = {
return false;
}
//删掉页面上原有的pannel
// 删掉页面上原有的pannel
chosePanel.remove();
$(html).appendTo('#chose-panel');
... ... @@ -269,21 +274,23 @@ let goodObj = {
$(e.delegateTarget).data('id', cartGoodData.new_product_sku);
let goodNum = parseInt($(e.delegateTarget).find('.good-num').val(), 10);
let max = parseInt($(e.delegateTarget).find('.good-num').data('max'), 10);
if (!$(e.delegateTarget).find('.chk.select').hasClass('checked') && goodNum <= max) {
self.selectGood($(e.delegateTarget).find('.chk.select'))
self.selectGood($(e.delegateTarget).find('.chk.select'));
} else {
self.handle.refreshPage()
self.handle.refreshPage();
}
});
},
modifyNum (e) {
modifyNum(e) {
let self = this;
if (self.handle.posting) {
return;
}
let isGift = $(e.delegateTarget).hasClass('is-gift');
if (isGift) {
return;
}
... ... @@ -302,31 +309,31 @@ let goodObj = {
if (goodNum <= minNumber) {
$(minusEl).addClass('disabled');
} else if($(minusEl).hasClass('disabled')) {
} else if ($(minusEl).hasClass('disabled')) {
$(minusEl).removeClass('disabled');
}
if (goodNum >= maxNumber) {
$(plusEl).addClass('disabled');
} else if($(plusEl).hasClass('disabled')) {
} else if ($(plusEl).hasClass('disabled')) {
$(plusEl).removeClass('disabled');
}
if (goodNum < minNumber) {
if (minNumber === 1) {
tip.show('您选择的数量不能为零~')
} else if(minNumber > 1) {
tip.show(`量贩商品,${minNumber}件起购`)
tip.show('您选择的数量不能为零~');
} else if (minNumber > 1) {
tip.show(`量贩商品,${minNumber}件起购`);
}
return;
}
if (goodNum > maxNumber && $(e.currentTarget).hasClass('btn-opt-plus')) {
tip.show('您选择的数量超过了最大库存量~')
tip.show('您选择的数量超过了最大库存量~');
return;
}
self.handle.posting = true;
goodNumEle.val(goodNum);
$(e.delegateTarget).find('.count').text(`x${goodNum}`);
$.ajax({
type: 'post',
url: '/cart/index/new/modifyNum',
... ... @@ -336,22 +343,23 @@ let goodObj = {
decreaseNum: oldGoodNum > goodNum ? oldGoodNum - goodNum : 0,
},
success: (data) => {
if (data.code != 200) {
if (data.code !== 200) {
self.handle.posting = false;
tip.show('网络异常');
} else {
let goodNum = parseInt($(e.delegateTarget).find('.good-num').val(), 10);
goodNum = parseInt($(e.delegateTarget).find('.good-num').val(), 10);
let max = parseInt($(e.delegateTarget).find('.good-num').data('max'), 10);
if (!$(e.delegateTarget).find('.chk.select').hasClass('checked') && goodNum <= max) {
self.selectGood($(e.delegateTarget).find('.chk.select')).then(() => {
self.handle.posting = false;
})
});
} else {
self.handle.refreshPage().then(() => {
self.handle.posting = false;
});
}
}
},
error: (err) => {
... ... @@ -366,8 +374,7 @@ let goodObj = {
openChosepanel(e, isGift) {
let self = this;
let $this = $(e.currentTarget),
skn = $(e.delegateTarget).data('skn');
let skn = $(e.delegateTarget).data('skn');
let id,
count,
... ... @@ -375,13 +382,15 @@ let goodObj = {
minNum,
promotionId;
let isSelected = $(e.delegateTarget).find('.chk.select').hasClass('checked');
id = $(e.delegateTarget).data('id');
count = $(e.delegateTarget).find('.good-num').val();
minNum = $(e.delegateTarget).data('mnum');
promotionId = $(e.delegateTarget).data('promotion');
//加价购或者赠品不能编辑数量
// 加价购或者赠品不能编辑数量
canEditNum = $(e.delegateTarget).find('.flag.gift').length || $(e.delegateTarget).find('.flag.price-gift').length ? false : true;
e.stopPropagation();
loading.showLoadingMask();
... ... @@ -393,9 +402,10 @@ let goodObj = {
mnum: minNum,
promotion_id: promotionId
},
type: "POST",
type: 'POST',
success: function(data) {
let html = require('common/chose-panel.hbs')(data);
self.showEditPannelWithSku(html, id, isSelected, canEditNum, isGift, e);
},
error: function(err) {
... ... @@ -415,16 +425,17 @@ let goodObj = {
return self.selectGood(goods);
}
return false;
},
removeAllDisabled() {
let self = this;
let goods = $('.good-item.in-valid').find('.disable');
if (goods.length) {
return self.delGood(goods);
}
return false;
}
}
};
module.exports = goodObj;
\ No newline at end of file
module.exports = goodObj;
... ...
... ... @@ -11,14 +11,15 @@ let $ = require('yoho-jquery');
let recommendObj = {
init(handle) {
let self = this;
self.handle = handle;
if ($('.recommend-for-you').length) {
setTimeout(() => {
require('../recommend-for-you-cart');
}, 0)
}, 0);
}
}
}
};
module.exports = recommendObj;
\ No newline at end of file
module.exports = recommendObj;
... ...
.good-item {
display: flex;
width: 100%;
min-height: 246px;
display: flex;
width: 100%;
min-height: 246px;
&:last-child {
.good-new-info {
border: none;
&:last-child {
.good-new-info {
border: none;
}
}
}
.good-new-info {
padding-left: 0px;
}
.good-new-info {
padding-left: 0;
}
.opt {
width: 100px;
display: flex;
align-items: center;
justify-content: center;
.opt {
width: 100px;
display: flex;
align-items: center;
justify-content: center;
.select {
display: block;
}
.select {
display: block;
}
.edit {
display: none;
}
.edit {
display: none;
}
.disable {
background-color: #7f7f7f;
.disable {
background-color: #7f7f7f;
}
}
}
}
.promos {
padding: 11px 30px 11px 100px;
height: 57px;
overflow: hidden;
width: 100%;
padding: 11px 30px 11px 100px;
height: 57px;
overflow: hidden;
width: 100%;
&.more-box {
height: 77px;
&.more-box {
height: 77px;
.promo-item {
display: none;
.promo-item {
display: none;
&:first-child {
display: flex;
}
}
&:first-child {
display: flex;
}
}
.down-arrow {
display: block;
}
.down-arrow {
display: block;
}
&.down {
height: auto;
&.down {
height: auto;
.promo-item {
display: flex;
}
.promo-item {
display: flex;
}
.down-arrow {
.iconfont:before {
content: "\e608";
.down-arrow {
.iconfont:before {
content: "\e608";
}
}
}
}
}
}
.down-arrow {
display: none;
width: 100%;
height: 25px;
margin-top: -7px;
text-align: center;
.down-arrow {
display: none;
width: 100%;
height: 25px;
margin-top: -7px;
text-align: center;
.iconfont {
color: #e0e0e0;
font-size: 30px;
.iconfont {
color: #e0e0e0;
font-size: 30px;
&:before {
content: "\e609";
}
&:before {
content: "\e609";
}
}
}
}
.promo-item {
display: flex;
width: 100%;
height: 45px;
line-height: 45px;
.info {
flex: 1;
font-size: 23px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.flag {
margin-right: 11px;
color: #ff575c;
border: solid 1PX #ff575c;
padding: 0px 16px 0px 16px;
border-radius: 4px;
}
.promo-item {
display: flex;
width: 100%;
height: 45px;
line-height: 45px;
.info {
flex: 1;
font-size: 23px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.flag {
margin-right: 11px;
color: #ff575c;
border: solid 1PX #ff575c;
padding: 0 16px;
border-radius: 4px;
}
}
}
}
+ .good-item {
margin-top: -11px;
}
+ .good-item {
margin-top: -11px;
}
}
.fill-text {
padding: 2px 12px 2px 12px;
color: #fff;
font-size: 25px;
line-height: 30px;
border-radius: 30px 30px;
padding: 2px 12px;
color: #fff;
font-size: 25px;
line-height: 30px;
border-radius: 30px;
}
.iconfont.chk {
font-size: 40px;
font-size: 40px;
&:before {
content: "\e647";
}
&:before {
content: "\e647";
}
&.checked:before {
content: "\e60a";
}
&.checked:before {
content: "\e60a";
}
}
.good-new-info {
width: 100%;
padding: 20px 30px 20px 30px;
display: flex;
flex: 1;
border-bottom: solid 1PX #f0f0f0;
.img-a {
width: 100%;
padding: 20px 30px;
display: flex;
align-items: center;
}
.img {
position: relative;
.thumb {
width: 152px;
min-height: 204px;
}
.flag {
position: absolute;
left: 0px;
bottom: 0px;
width: 100%;
height: 23px;
text-align: center;
line-height: 23px;
color: #fff;
font-size: 23px;
&.price-gift {
background-color: #ff0062;
}
&.gift {
background-color: #85c45b;
}
.text {
transform: scale(0.7, 0.7);
}
}
}
.info {
flex: 1;
margin-left: 32px;
padding-top: 20px;
position: relative;
.fixed-height {
width: 100%;
min-height: 100px;
display: flex;
border-bottom: solid 1PX #f0f0f0;
.intro {
width: 100%;
flex: 1;
}
}
.name-row {
display: flex;
.name {
flex: 1;
font-size: 28px;
color: #5a5a5a;
}
.img-a {
display: flex;
align-items: center;
}
.color-size-row {
color: #b6b6b6;
font-size: 28px;
margin-top: 4px;
.img {
position: relative;
span {
margin-right: 18px;
}
}
.price {
font-size: 28px;
color: #d0253b;
.thumb {
width: 152px;
min-height: 204px;
}
.vip {
margin-left: 11px;
background-color: #d0021b;
}
.flag {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 23px;
text-align: center;
line-height: 23px;
color: #fff;
font-size: 23px;
&.price-gift {
background-color: #ff0062;
}
&.gift {
background-color: #85c45b;
}
.text {
transform: scale(0.7, 0.7);
}
}
}
.tags {
width: 100%;
line-height: 30px;
text-align: right;
.low-stocks {
background-color: #7f7f7f;
}
.info {
flex: 1;
margin-left: 32px;
padding-top: 20px;
position: relative;
.fixed-height {
width: 100%;
min-height: 100px;
display: flex;
.intro {
width: 100%;
flex: 1;
}
}
.appear-date {
display: none;
padding: 4px 0px;
float: left;
font-size: 23px;
color: #d0253b;
}
}
.name-row {
display: flex;
.count {
width: 45px;
text-align: right;
color: #999;
font-size: 28px;
}
}
.name {
flex: 1;
font-size: 28px;
color: #5a5a5a;
}
}
.intro-edit {
display: none;
}
.color-size-row {
color: #b6b6b6;
font-size: 28px;
margin-top: 4px;
.edit-box {
width: 280px;
margin-bottom: 11px;
span {
margin-right: 18px;
}
}
.num-opt {
height: 74px;
border: solid 1PX #dfdfdf;
border-radius: 5px 5px 0px 0px;
display: flex;
.btn {
width: 80px;
display: block;
height: 100%;
text-align: center;
line-height: 74px;
.price {
font-size: 28px;
color: #d0253b;
.iconfont {
color: #444444;
.vip {
margin-left: 11px;
background-color: #d0021b;
}
}
&.disabled {
.iconfont {
color: #b0b0b0;
}
.tags {
width: 100%;
line-height: 30px;
text-align: right;
.low-stocks {
background-color: #7f7f7f;
}
.appear-date {
display: none;
padding: 4px 0;
float: left;
font-size: 23px;
color: #d0253b;
}
}
&.btn-opt-minus {
border-right: 1PX solid #dfdfdf;
.iconfont:before {
content: "\e625";
}
.count {
width: 45px;
text-align: right;
color: #999;
font-size: 28px;
}
}
&.btn-opt-plus {
border-left: 1px solid #dfdfdf;
.intro-edit {
display: none;
}
.iconfont:before {
content: "\e624";
}
.edit-box {
width: 280px;
margin-bottom: 11px;
.size-info {
width: 100%;
height: 74px;
line-height: 74px;
padding-left: 14px;
border: solid 1PX #dfdfdf;
border-top: none;
border-radius: 0 0 5px 5px;
display: flex;
color: #444;
.txt {
flex: 1;
font-size: 23px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.down {
text-align: center;
width: 55px;
.iconfont {
font-size: 30px;
}
& .iconfont:before {
content: "\e609";
}
}
}
}
.good-num {
width: 120px;
text-align: center;
color: #444444;
font-size: 32px;
background-color: #fff;
border: none;
line-height: 50px;
}
}
.size-info {
width: 100%;
height: 74px;
line-height: 74px;
padding-left: 14px;
border: solid 1PX #dfdfdf;
border-top: none;
border-radius: 0px 0px 5px 5px;
display: flex;
color: #444;
.txt {
flex: 1;
font-size: 23px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.down {
text-align: center;
width: 55px;
.num-opt {
height: 74px;
border: solid 1PX #dfdfdf;
border-radius: 5px 5px 0 0;
display: flex;
.iconfont {
font-size: 30px;
.btn {
width: 80px;
display: block;
height: 100%;
text-align: center;
line-height: 74px;
.iconfont {
color: #444;
}
&.disabled {
.iconfont {
color: #b0b0b0;
}
}
&.btn-opt-minus {
border-right: 1PX solid #dfdfdf;
.iconfont:before {
content: "\e625";
}
}
&.btn-opt-plus {
border-left: 1px solid #dfdfdf;
.iconfont:before {
content: "\e624";
}
}
}
& .iconfont:before {
content: "\e609";
.good-num {
width: 120px;
text-align: center;
color: #444;
font-size: 32px;
background-color: #fff;
border: none;
line-height: 50px;
}
}
}
}
}
.cart-content {
&.advance-good {
.appear-date {
display: block;
&.advance-good {
.appear-date {
display: block;
}
}
}
}
.main-wrap.edit {
.good-item:not(.no-edit) {
.info {
padding-top: 0px;
}
.good-item:not(.no-edit) {
.info {
padding-top: 0;
}
.opt {
.select {
display: none;
}
}
.intro-name {
display: none;
}
.intro-name {
display: none;
.intro-edit {
display: block;
}
}
.intro-edit {
display: block;
}
}
.good-item {
.opt {
.edit {
display: block;
}
.good-item {
.opt {
.edit {
display: block;
}
.select {
display: none;
}
.disable {
display: none;
}
.disable {
display: none;
}
}
}
}
}
... ...
.chose-panel {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 3;
display: none;
height: 100%;
background: rgba(0, 0, 0, 0.3);
.main {
position: absolute;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
height: 610px;
background: #fff;
}
.infos {
padding: 0 22px;
height: 460px;
}
.chose-items {
overflow: auto;
height: 325px;
}
.basic-info {
position: relative;
overflow: hidden;
margin-top: 30px;
margin-bottom: 30px;
}
.thumb {
float: left;
margin-right: 20px;
width: 100px;
}
.text-info {
height: auto;
.seckill-time {
position: absolute;
bottom: 0;
right: 0;
float: none;
z-index: 3;
display: none;
height: 100%;
background: rgba(0, 0, 0, 0.3);
.main {
position: absolute;
right: 0;
bottom: 0;
left: 0;
height: 610px;
background: #fff;
}
.name {
display: -webkit-box;
overflow: hidden;
height: 74px;
font-size: 28px;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
.infos {
padding: 0 22px;
height: 460px;
}
.price {
display: inline;
font-size: 24px;
.chose-items {
overflow: auto;
height: 325px;
}
.sale-price {
margin-right: 15px;
color: #e10;
&.no-price {
color: #000;
}
.basic-info {
position: relative;
overflow: hidden;
margin-top: 30px;
margin-bottom: 30px;
}
.market-price {
color: #b0b0b0;
text-decoration: line-through;
.thumb {
float: left;
margin-right: 20px;
width: 100px;
}
}
.color-list,
.size-list,
.num {
position: relative;
padding-left: 80px;
font-size: 28px;
input.disabled {
border-radius: 0;
background-color: #fff;
color: #000;
opacity: 1;
-webkit-appearance: none;
.text-info {
height: auto;
.seckill-time {
position: absolute;
bottom: 0;
right: 0;
float: none;
}
.name {
display: -webkit-box;
overflow: hidden;
height: 74px;
font-size: 28px;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.price {
display: inline;
font-size: 24px;
}
.sale-price {
margin-right: 15px;
color: #e10;
&.no-price {
color: #000;
}
}
.market-price {
color: #b0b0b0;
text-decoration: line-through;
}
}
> span {
position: absolute;
top: 20px;
left: 0;
.color-list,
.size-list,
.num {
position: relative;
padding-left: 80px;
font-size: 28px;
input.disabled {
border-radius: 0;
background-color: #fff;
color: #000;
opacity: 1;
-webkit-appearance: none;
}
> span {
position: absolute;
top: 20px;
left: 0;
}
> span.left-num {
position: absolute;
top: 20px;
left: 380px;
overflow: hidden;
white-space: nowrap;
}
span.disabled {
color: #e6e6e6;
}
}
> span.left-num {
position: absolute;
top: 20px;
left: 380px;
overflow: hidden;
white-space: nowrap;
.size-list li.hide {
display: none;
}
span.disabled {
color: #e6e6e6;
.block {
display: block;
float: left;
box-sizing: border-box;
margin-right: 30px;
margin-bottom: 30px;
padding: 0 20px;
min-width: 80px;
max-width: 480px;
height: 80px;
border: 1px solid #000;
text-align: center;
line-height: 80px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
&.chosed {
border-color: #e10;
background: resolve("shopping-cart/right.png") no-repeat;
background-position: bottom right;
background-size: 38px;
color: #e10;
}
&.zero-stock {
border-color: #e0e0e0;
color: #e0e0e0;
}
&.zero-stock.chosed {
border-color: #e0e0e0;
background: none;
background-color: #c0c0c0;
color: #e0e0e0;
}
}
}
.size-list li.hide {
display: none;
}
.block {
display: block;
float: left;
box-sizing: border-box;
margin-right: 30px;
margin-bottom: 30px;
padding: 0 20px;
min-width: 80px;
max-width: 480px;
height: 80px;
border: 1px solid #000;
text-align: center;
line-height: 80px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
&.chosed {
border-color: #e10;
background: resolve("shopping-cart/right.png") no-repeat;
background-position: bottom right;
background-size: 38px;
color: #e10;
.num {
margin-bottom: 20px;
}
&.zero-stock {
border-color: #e0e0e0;
color: #e0e0e0;
.num .btn {
display: block;
float: left;
width: 80px;
height: 80px;
border: 1px solid #e6e6e6;
text-align: center;
line-height: 80px;
&.disable {
color: #e6e6e6;
}
}
&.zero-stock.chosed {
border-color: #e0e0e0;
background: none;
background-color: #c0c0c0;
color: #e0e0e0;
.good-num {
float: left;
margin-left: -1px;
padding: 0;
width: 106px;
height: 80px;
border: 1px solid #e6e6e6;
text-align: center;
line-height: 80px;
}
}
.num {
margin-bottom: 20px;
}
.num .btn {
display: block;
float: left;
width: 80px;
height: 80px;
border: 1px solid #e6e6e6;
text-align: center;
line-height: 80px;
&.disable {
color: #e6e6e6;
.btn-plus {
margin-left: -1px;
}
}
.good-num {
float: left;
margin-left: -1px;
padding: 0;
width: 106px;
height: 80px;
border: 1px solid #e6e6e6;
text-align: center;
line-height: 80px;
}
.btn-plus {
margin-left: -1px;
}
.btn-wrap {
position: relative;
box-sizing: border-box;
padding: 20px;
height: 120px;
border-top: 1px solid #e6e6e6;
background: #fff;
text-align: center;
.btn-sure {
width: 260px;
height: 80px;
border: none;
background: #e10;
color: #fff;
font-size: 32px;
.btn-wrap {
position: relative;
box-sizing: border-box;
padding: 20px;
height: 120px;
border-top: 1px solid #e6e6e6;
background: #fff;
text-align: center;
.btn-sure {
width: 260px;
height: 80px;
border: none;
background: #e10;
color: #fff;
font-size: 32px;
}
}
}
.discount-gray {
background-color: #e0e0e0;
}
}
\ No newline at end of file
.discount-gray {
background-color: #e0e0e0;
}
}
... ...
.gift-advance-page {
.gift-advance-good {
position: relative;
padding: 20px 0;
margin-left: 34px;
height: 200px;
border-bottom: 1px solid #e0e0e0;
}
.advance-block:last-child .gift-advance-good:last-child {
border-bottom: 1px solid #e0e0e0;
}
.thumb-wrap {
position: relative;
float: left;
width: 120px;
height: 160px;
.thumb {
width: 100%;
height: 100%;
.gift-advance-good {
position: relative;
padding: 20px 0;
margin-left: 34px;
height: 200px;
border-bottom: 1px solid #e0e0e0;
}
}
.tag {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 25px;
color: #fff;
text-align: center;
background: #eb76aa;
&:before {
content: "加价购";
display: block;
font-size: 12px;
line-height: 25px;
transform: scale(0.833);
.advance-block:last-child .gift-advance-good:last-child {
border-bottom: 1px solid #e0e0e0;
}
.thumb-wrap {
position: relative;
float: left;
width: 120px;
height: 160px;
.thumb {
width: 100%;
height: 100%;
}
}
.tag {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 25px;
color: #fff;
text-align: center;
background: #eb76aa;
&:before {
content: "加价购";
display: block;
font-size: 12px;
line-height: 25px;
transform: scale(0.833);
}
}
.deps {
margin-left: 135px;
}
.gift-advance-good .name {
margin-bottom: 20px;
width: 440px;
font-size: 28px;
}
}
.deps {
margin-left: 135px;
}
.row:nth-child(2) {
font-size: 22px;
height: 45px;
line-height: 45px;
.gift-advance-good .name {
margin-bottom: 20px;
width: 440px;
font-size: 28px;
}
> span {
margin-right: 15px;
}
}
.row:nth-child(2) {
font-size: 22px;
height: 45px;
line-height: 45px;
.row:nth-child(3) {
position: relative;
}
> span {
margin-right: 15px;
.color,
.size {
color: #b6b6b6;
}
}
.row:nth-child(3) {
position: relative;
}
.price {
font-size: 24px;
color: #f1545b;
.color,
.size {
color: #b6b6b6;
}
&.market-price {
color: #999;
text-decoration: line-through;
}
}
.price {
font-size: 24px;
color: #f1545b;
.count {
font-size: 20px;
color: #999;
margin-left: 22px;
}
&.market-price {
color: #999;
text-decoration: line-through;
.chose {
position: absolute;
width: 88px;
height: 58px;
background: #f8f8f8;
border: 1px solid #ccc;
right: 20px;
top: 71px;
font-size: 26px;
line-height: 58px;
text-align: center;
}
}
.count {
font-size: 20px;
color: #999;
margin-left: 22px;
}
.chose {
position: absolute;
width: 88px;
height: 58px;
background: #f8f8f8;
border: 1px solid #ccc;
right: 20px;
top: 71px;
font-size: 26px;
line-height: 58px;
text-align: center;
}
.title {
width: 640px;
height: 60px;
line-height: 60px;
padding: 0 20px;
font-size: 24px;
background: #f8f8f8;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.gift-block .tag {
background: #a1ce4e;
&:before {
content: "赠品";
.title {
width: 640px;
height: 60px;
line-height: 60px;
padding: 0 20px;
font-size: 24px;
background: #f8f8f8;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.gift-block .tag {
background: #a1ce4e;
&:before {
content: "赠品";
}
}
}
}
... ...
.shopping-cart-good {
$cartRed: #d0253b;
position: relative;
padding-left: 16px;
$cartRed: #d0253b;
.prevent-img-click {
position: absolute;
width: 20px;
height: 200px;
background-color: transparent;
z-index: 99;
position: absolute;
width: 20px;
height: 200px;
background-color: transparent;
z-index: 99;
}
.none{
.none {
display: none;
}
.checkbox {
position: absolute;
top: 50%;
... ... @@ -43,11 +45,11 @@
}
.gift-tag {
background-color: #88BE51;
background-color: #88be51;
}
.plus-tag {
background-color: #FC1264;
background-color: #fc1264;
}
.few-tag-expire {
... ... @@ -102,7 +104,8 @@
margin-right: 15px;
}
.color, .size {
.color,
.size {
font-size: 0.6rem;
color: #b6b6b6;
}
... ... @@ -118,7 +121,8 @@
font-size: 0.6rem;
color: $cartRed;
display: inline;
.sale-price{
.sale-price {
color: #b0b0b0;
text-decoration: line-through;
}
... ... @@ -145,7 +149,6 @@
float: right;
margin-right: 16px;
padding: 4px;
border-radius: 20px;
}
... ... @@ -189,7 +192,6 @@
right: 0;
top: 0;
bottom: 0;
color: #fff;
> div {
... ... @@ -208,7 +210,6 @@
.put-in-favorite {
background: #bbb;
}
.del {
... ... @@ -219,61 +220,70 @@
}
}
}
.calculate-num{
.calculate-num {
float: right;
.calculate{
float: right;
border:1px solid #b0b0b0;
border-radius:.2rem;
p{
color: #444;
&:first-child{
height: 60px;
border-bottom:1px solid #b0b0b0;
span {
border-left:1px solid #b0b0b0;
border-right:1px solid #b0b0b0;
}
}
i{
width: 72px;
height: 60px;
float: left;
line-height: 60px;
text-align: center;
}
span{
width: 96px;
height: 60px;
float: left;
font-size: 40px;
line-height: 60px;
text-align: center;
}
&:last-child {
span{
width: 168px;
overflow: hidden;
font-size: 36px;
text-overflow:ellipsis;
white-space:nowrap;
}
}
}
}
.price{
.price {
line-height: 60px;
font-size: 46px;
font-weight: bold;
}
.count {
position: absolute;
right: 20px;;
top: 20px;;
right: 20px;
top: 20px;
font-size: 46px;
}
}
.calculate {
float: right;
border: 1px solid #b0b0b0;
border-radius: 0.2rem;
p {
color: #444;
&:first-child {
height: 60px;
border-bottom: 1px solid #b0b0b0;
span {
border-left: 1px solid #b0b0b0;
border-right: 1px solid #b0b0b0;
}
}
i {
width: 72px;
height: 60px;
float: left;
line-height: 60px;
text-align: center;
}
span {
width: 96px;
height: 60px;
float: left;
font-size: 40px;
line-height: 60px;
text-align: center;
}
&:last-child {
span {
width: 168px;
overflow: hidden;
font-size: 36px;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
}
}
.shopping-cart-good:last-child {
... ...
.shopping-cart-page {
margin-bottom: 120px;
overflow-x: hidden;
margin-bottom: 120px;
overflow-x: hidden;
.cart-content {
display: none;
.cart-content {
display: none;
&.active {
display: block;
&.active {
display: block;
}
}
}
.box {
background-color: #fff;
margin-top: 20px;
.box {
background-color: #fff;
margin-top: 20px;
&.cart-brand:first-child {
margin-top: 0px;
}
}
.cart-nav {
color: #c6c6c6;
margin-bottom: 20px;
border-bottom: 1PX solid #e0e0e0;
background: #fff;
li {
float: left;
width: 50%;
padding: 35px 0;
height: 35px;
box-sizing: content-box;
&.cart-brand:first-child {
margin-top: 0;
}
}
li.active {
color: #000;
}
.cart-nav {
color: #c6c6c6;
margin-bottom: 20px;
border-bottom: 1PX solid #e0e0e0;
background: #fff;
span {
display: block;
box-sizing: border-box;
width: 100%;
height: 35px;
line-height: 35px;
font-size: 35px;
text-align: center;
}
li {
float: left;
width: 50%;
padding: 35px 0;
height: 35px;
box-sizing: content-box;
}
li:first-child span {
border-right: 1PX solid #e0e0e0;
}
li.active {
color: #000;
}
li:last-child {
position: relative;
}
span {
display: block;
box-sizing: border-box;
width: 100%;
height: 35px;
line-height: 35px;
font-size: 35px;
text-align: center;
}
.presell-tip {
position: absolute;
z-index: 1;
left: -2rem;
top: 1.75rem;
}
li:first-child span {
border-right: 1PX solid #e0e0e0;
}
.triangle {
width: 0;
height: 0;
border-left: 8PX solid transparent;
border-right: 8PX solid transparent;
border-bottom: 12PX solid #000;
margin-left: 6rem;
}
li:last-child {
position: relative;
}
.pt-content {
position: relative;
padding: 12px;
background: #000;
color: #fff;
font-size: 14px;
border-radius: 5PX;
text-align: center;
width: 7rem;
}
}
.login-info {
height: 54px;
padding: 20px 23px;
color: #24acaa;
text-align: center;
font-size: 33px;
box-sizing: content-box;
.iconfont {
font-size: 33px;
.presell-tip {
position: absolute;
z-index: 1;
left: -2rem;
top: 1.75rem;
}
.triangle {
width: 0;
height: 0;
border-left: 8PX solid transparent;
border-right: 8PX solid transparent;
border-bottom: 12PX solid #000;
margin-left: 6rem;
}
.pt-content {
position: relative;
padding: 12px;
background: #000;
color: #fff;
font-size: 14px;
border-radius: 5PX;
text-align: center;
width: 7rem;
}
}
.btn {
display: inline-block;
background: #ed0010;
color: #fff;
width: 94px;
height: 54px;
line-height: 54px;
.login-info {
height: 54px;
padding: 20px 23px;
color: #24acaa;
text-align: center;
font-size: 33px;
box-sizing: content-box;
.iconfont {
font-size: 33px;
}
.btn {
display: inline-block;
background: #ed0010;
color: #fff;
width: 94px;
height: 54px;
line-height: 54px;
}
}
}
}
.more-box {
transition: all 200s;
transition: all 200s;
}
.promotion-header {
width: 100%;
height: 88px;
overflow: hidden;
padding: 11px 30px 11px 30px;
border-bottom: solid 1PX #f0f0f0;
.promo-item {
height: 66px;
line-height: 66px;
font-size: 26px;
color: #444;
display: flex;
width: 100%;
}
&.more-box {
height: 108px;
height: 88px;
overflow: hidden;
padding: 11px 30px;
border-bottom: solid 1PX #f0f0f0;
.promo-item {
display: none;
&:first-child {
height: 66px;
line-height: 66px;
font-size: 26px;
color: #444;
display: flex;
}
width: 100%;
}
.down-arrow {
display: block;
}
&.more-box {
height: 108px;
&.down {
height: auto;
.promo-item {
display: none;
.promo-item {
display: flex;
}
&:first-child {
display: flex;
}
}
.down-arrow {
.iconfont:before {
content: "\e608";
.down-arrow {
display: block;
}
}
}
}
.down-arrow {
display: none;
width: 100%;
height: 34px;
margin-top: -14px;
text-align: center;
&.down {
height: auto;
.iconfont {
color: #e0e0e0;
font-size: 30px;
.promo-item {
display: flex;
}
&:before {
content: "\e609";
}
.down-arrow {
.iconfont:before {
content: "\e608";
}
}
}
}
}
.info {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.cuxiao {
margin-right: 11px;
color: #ff575c;
font-size: 30px;
.down-arrow {
display: none;
width: 100%;
height: 34px;
margin-top: -14px;
text-align: center;
.iconfont {
color: #e0e0e0;
font-size: 30px;
&:before {
content: "\e609";
}
}
}
.cuxiao:before {
content: "\e6b5";
.info {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.cuxiao {
margin-right: 11px;
color: #ff575c;
font-size: 30px;
}
.cuxiao:before {
content: "\e6b5";
}
}
}
}
.to-gift {
text-align: right;
width: 139px;
text-align: right;
width: 139px;
a {
color: #ff575c;
font-size: 23px;
}
a {
color: #ff575c;
font-size: 23px;
}
}
.iconfont.to-arrow {
color: #e0e0e0;
margin-left: 11px;
color: #e0e0e0;
margin-left: 11px;
&:before {
content: "\e604";
}
&:before {
content: "\e604";
}
}
.activity-title {
background-color: #fff;
border-top: 1PX solid #e0e0e0;
font-size: 32px;
padding: 20px 20px 0;
background-color: #fff;
border-top: 1PX solid #e0e0e0;
font-size: 32px;
padding: 20px 20px 0;
}
.activity {
background-color: #fff;
padding: 8px 20px 20px 32px;
font-size: 26px;
li:before {
content: "";
display: inline-block;
margin-right: 11px;
width: 8px;
height: 8px;
background-color: #000;
border-radius: 50%;
position: relative;
left: 0;
top: -.12rem;
}
background-color: #fff;
padding: 8px 20px 20px 32px;
font-size: 26px;
li:before {
content: "";
display: inline-block;
margin-right: 11px;
width: 8px;
height: 8px;
background-color: #000;
border-radius: 50%;
position: relative;
left: 0;
top: -0.12rem;
}
}
.price-compute {
background-color: #fff;
padding: 20px;
border-top: 1px solid #e0e0e0;
font-size: 28px;
margin-bottom: 38px;
.title {
display: inline-block;
width: 175px;
}
.minus {
float: right;
}
background-color: #fff;
padding: 20px;
border-top: 1px solid #e0e0e0;
font-size: 28px;
margin-bottom: 38px;
.title {
display: inline-block;
width: 175px;
}
.minus {
float: right;
}
}
.main-wrap {
background: #f0f0f0;
background: #f0f0f0;
.nav-btn {
&:before {
content: "编辑";
.nav-btn {
&:before {
content: "编辑";
}
}
}
}
.main-wrap.edit {
.nav-btn {
&:before {
content: "完成";
.nav-btn {
&:before {
content: "完成";
}
}
}
.cart-content.active {
.cart-footer {
.check-all {
.select {
display: none;
}
.cart-content.active {
.cart-footer {
.check-all {
.select {
display: none;
}
.edit {
display: block;
}
}
.edit {
display: block;
}
}
.opts {
&.edit {
display: flex;
}
.opts {
&.edit {
display: flex;
}
&.bill {
display: none;
&.bill {
display: none;
}
}
}
}
}
}
}
.cart-footer {
z-index: 2;
background-color: #fff;
position: fixed;
width: 100%;
left: 0px;
bottom: 0px;
height: 120px;
display: flex;
.check-all {
width: 90px;
text-align: center;
padding-top: 20px;
.select {
display: block;
}
z-index: 2;
background-color: #fff;
position: fixed;
width: 100%;
left: 0;
bottom: 0;
height: 120px;
display: flex;
.edit {
display: none;
}
.check-all {
width: 90px;
text-align: center;
padding-top: 20px;
p {
font-size: 26px;
color: #666;
}
}
.select {
display: block;
}
.opts {
flex: 1;
padding: 18px;
text-align: right;
display: flex;
justify-content: flex-end;
.edit {
display: none;
}
&.edit {
display: none;
p {
font-size: 26px;
color: #666;
}
}
&.bill {
display: flex;
}
.opts {
flex: 1;
padding: 18px;
text-align: right;
display: flex;
justify-content: flex-end;
.btn {
width: 170px;
height: 88px;
border-radius: 5px;
color: #fff;
margin-left: 14px;
margin-right: 14px;
&.btn-gray {
background-color: #444444;
}
&.btn-red {
background-color: #d1021c;
}
}
&.edit {
display: none;
}
.total {
flex: 1;
padding-top: 11px;
&.bill {
display: flex;
}
.price {
color: #d0253b;
font-size: 32px;
}
.btn {
width: 170px;
height: 88px;
border-radius: 5px;
color: #fff;
margin-left: 14px;
margin-right: 14px;
&.btn-gray {
background-color: #444;
}
&.btn-red {
background-color: #d1021c;
}
}
.intro {
color: #b6b6b6;
font-size: 23px;
}
}
}
}
.total {
flex: 1;
padding-top: 11px;
.all-gift-box {
.gift-item {
width: 100%;
display: flex;
.price {
color: #d0253b;
font-size: 32px;
}
&:last-child {
.content {
border: none;
}
.intro {
color: #b6b6b6;
font-size: 23px;
}
}
}
}
.flag {
width: 80px;
line-height: 80px;
padding-right: 18px;
text-align: right;
color: #444444;
.iconfont {
vertical-align: middle;
font-size: 32px;
.all-gift-box {
.gift-item {
width: 100%;
display: flex;
&.gift:before {
content: "\e620";
&:last-child {
.content {
border: none;
}
}
&.price-gift:before {
content: "\e645";
.flag {
width: 80px;
line-height: 80px;
padding-right: 18px;
text-align: right;
color: #444;
.iconfont {
vertical-align: middle;
font-size: 32px;
&.gift:before {
content: "\e620";
}
&.price-gift:before {
content: "\e645";
}
}
}
}
}
.content {
flex: 1;
width: 100%;
display: flex;
height: 88px;
line-height: 88px;
padding-right: 30px;
border-bottom: solid 1PX #f1f1f1;
.info {
flex: 1;
}
.opt {
text-align: right;
width: 139px;
}
.content {
flex: 1;
width: 100%;
display: flex;
height: 88px;
line-height: 88px;
padding-right: 30px;
border-bottom: solid 1PX #f1f1f1;
.info {
flex: 1;
}
.opt {
text-align: right;
width: 139px;
}
}
}
}
}
.disable-box {
.remove-all {
width: 100%;
height: 122px;
border-top: solid 1PX #f1f1f1;
text-align: center;
padding-top: 30px;
.btn-remove {
width: 229px;
height: 60px;
border: solid 1PX #b0b0b0;
background-color: #fff;
color: #444444;
font-size: 29px;
border-radius: 4px;
.remove-all {
width: 100%;
height: 122px;
border-top: solid 1PX #f1f1f1;
text-align: center;
padding-top: 30px;
.btn-remove {
width: 229px;
height: 60px;
border: solid 1PX #b0b0b0;
background-color: #fff;
color: #444;
font-size: 29px;
border-radius: 4px;
}
}
}
}
.cart-zero {
width: 100%;
height: auto;
padding-top: 90px;
padding-bottom: 20%;
i {
font-size: 144px;
display: block;
margin: 0 auto;
text-align: center;
color: #505050;
}
p {
display: block;
text-align: center;
font-size: 24px;
color: #444444;
padding: .6rem 0;
}
a {
width: 27%;
height: 56px;
overflow: hidden;
line-height: 56px;
border: 1PX solid #505050;
border-radius: 5PX;
display: block;
margin: 0 auto;
text-align: center;
color: #fff;
background: #444;
font-size: 24px;
}
width: 100%;
height: auto;
padding-top: 90px;
padding-bottom: 20%;
i {
font-size: 144px;
display: block;
margin: 0 auto;
text-align: center;
color: #505050;
}
p {
display: block;
text-align: center;
font-size: 24px;
color: #444;
padding: 0.6rem 0;
}
a {
width: 27%;
height: 56px;
overflow: hidden;
line-height: 56px;
border: 1PX solid #505050;
border-radius: 5PX;
display: block;
margin: 0 auto;
text-align: center;
color: #fff;
background: #444;
font-size: 24px;
}
}
... ...
... ... @@ -8,331 +8,331 @@
@import "jit-detail";
.icon-checkbox:before {
content: "\e61c";
content: "\e61c";
}
.icon-cb-checked:before {
content: "\e61d";
content: "\e61d";
}
.icon-radio:before {
content: "\e647";
content: "\e647";
}
.icon-cb-radio:before {
content: "\e646";
content: "\e646";
}
.shopping-cart-page {
margin-bottom: 120px;
overflow-x: hidden;
background: #f0f0f0;
display: none;
.yoho-tip {
z-index: 4;
}
.cart-content > * {
background: #fff;
&:first-child {
border-top: none;
margin-top: 0;
}
}
.cart-nav {
color: #c6c6c6;
border-bottom: 1px solid #e0e0e0;
background: #fff;
li {
float: left;
width: 50%;
padding: 30px 0;
height: 30px;
}
li.active {
color: #000;
}
span {
display: block;
box-sizing: border-box;
width: 100%;
height: 30px;
line-height: 30px;
font-size: 30px;
text-align: center;
}
li:first-child span {
border-right: 1px solid #e0e0e0;
}
li:last-child {
position: relative;
}
margin-bottom: 120px;
overflow-x: hidden;
background: #f0f0f0;
display: none;
.presell-tip {
position: absolute;
z-index: 1;
left: -2rem;
top: 1.75rem;
.yoho-tip {
z-index: 4;
}
.triangle {
width: 0;
height: 0;
border-left: 8PX solid transparent;
border-right: 8PX solid transparent;
border-bottom: 12PX solid #000;
margin-left: 6rem;
}
.cart-content > * {
background: #fff;
.pt-content {
position: relative;
padding: 10px;
background: #000;
color: #fff;
font-size: 12px;
border-radius: 5PX;
text-align: center;
width: 7rem;
&:first-child {
border-top: none;
margin-top: 0;
}
}
}
.login-info {
height: 46px;
padding: 17px 20px;
color: #24acaa;
text-align: center;
font-size: 28px;
.btn {
display: inline-block;
background: #ed0010;
color: #fff;
width: 80px;
height: 46px;
line-height: 46px;
}
}
.presell-info {
height: 60px;
padding: 15px 30px;
font-size: 22px;
background: #f0f0f0;
color: #b7b7b7;
> span {
display: block;
.cart-nav {
color: #c6c6c6;
border-bottom: 1px solid #e0e0e0;
background: #fff;
li {
float: left;
width: 50%;
padding: 30px 0;
height: 30px;
}
li.active {
color: #000;
}
span {
display: block;
box-sizing: border-box;
width: 100%;
height: 30px;
line-height: 30px;
font-size: 30px;
text-align: center;
}
li:first-child span {
border-right: 1px solid #e0e0e0;
}
li:last-child {
position: relative;
}
.presell-tip {
position: absolute;
z-index: 1;
left: -2rem;
top: 1.75rem;
}
.triangle {
width: 0;
height: 0;
border-left: 8PX solid transparent;
border-right: 8PX solid transparent;
border-bottom: 12PX solid #000;
margin-left: 6rem;
}
.pt-content {
position: relative;
padding: 10px;
background: #000;
color: #fff;
font-size: 12px;
border-radius: 5PX;
text-align: center;
width: 7rem;
}
}
.iconfont {
float: left;
font-size: 45px;
.login-info {
height: 46px;
padding: 17px 20px;
color: #24acaa;
text-align: center;
font-size: 28px;
.btn {
display: inline-block;
background: #ed0010;
color: #fff;
width: 80px;
height: 46px;
line-height: 46px;
}
}
.txt {
height: 30px;
line-height: 30px;
margin-left: 80px;
.presell-info {
height: 60px;
padding: 15px 30px;
font-size: 22px;
background: #f0f0f0;
color: #b7b7b7;
> span {
display: block;
}
.iconfont {
float: left;
font-size: 45px;
}
.txt {
height: 30px;
line-height: 30px;
margin-left: 80px;
}
}
}
.cart-goods {
border-bottom: 1px solid #e0e0e0;
margin-bottom: 0.75rem;
.cart-goods {
border-bottom: 1px solid #e0e0e0;
margin-bottom: 0.75rem;
.shopping-cart-good:last-child .info {
border-bottom: none;
}
}
.invalid-goods {
border-top: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
margin: 0.75rem 0;
}
.freebie-and-advance-buy {
font-size: 24px;
border-top: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
margin-bottom: 30px;
> li {
box-sizing: border-box;
height: 80px;
line-height: 80px;
margin-bottom: 10px;
padding: 0 20px;
&:last-child {
margin-bottom: 0;
}
a {
float: right;
width: 100%;
}
.under-line {
display: inline-block;
height: 1px;
width: 91%;
position: absolute;
left: 9%;
background-color: #f1f1f1;
}
.shopping-cart-good:last-child .info {
border-bottom: none;
}
}
> li:first-child {
.under-line {
display: none;
}
.invalid-goods {
border-top: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
margin: 0.75rem 0;
}
.count {
color: #7b7b7b;
float: right;
.freebie-and-advance-buy {
font-size: 24px;
border-top: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
margin-bottom: 30px;
> li {
box-sizing: border-box;
height: 80px;
line-height: 80px;
margin-bottom: 10px;
padding: 0 20px;
&:last-child {
margin-bottom: 0;
}
a {
float: right;
width: 100%;
}
.under-line {
display: inline-block;
height: 1px;
width: 91%;
position: absolute;
left: 9%;
background-color: #f1f1f1;
}
}
> li:first-child {
.under-line {
display: none;
}
}
.count {
color: #7b7b7b;
float: right;
}
.icon-right-arrow {
color: #8f8f8f;
float: right;
}
}
.icon-right-arrow {
color: #8f8f8f;
float: right;
.activity-title {
border-top: 1px solid #e0e0e0;
font-size: 32px;
padding: 20px 20px 0;
}
}
.activity-title {
border-top: 1px solid #e0e0e0;
font-size: 32px;
padding: 20px 20px 0;
}
.activity {
padding: 8px 20px 20px 32px;
font-size: 26px;
li:before {
content: "";
display: inline-block;
margin-right: 10px;
width: 8px;
height: 8px;
background-color: #000;
border-radius: 50%;
position: relative;
left: 0;
top: -.12rem;
}
}
.price-compute {
padding: 20px;
border-top: 1px solid #e0e0e0;
font-size: 28px;
margin-bottom: 37px;
.title {
display: inline-block;
width: 175px;
.activity {
padding: 8px 20px 20px 32px;
font-size: 26px;
li:before {
content: "";
display: inline-block;
margin-right: 10px;
width: 8px;
height: 8px;
background-color: #000;
border-radius: 50%;
position: relative;
left: 0;
top: -0.12rem;
}
}
.minus {
float: right;
}
}
.balance {
position: fixed;
box-sizing: border-box;
bottom: 0;
width: 100%;
padding: 20px;
height: 120px;
border-top: 1px solid #e0e0e0;
background: #fff;
.iconfont {
position: absolute;
top: 50%;
margin-top: -14px;
font-size: 28px;
}
.price-compute {
padding: 20px;
border-top: 1px solid #e0e0e0;
font-size: 28px;
margin-bottom: 37px;
p {
float: right;
margin-right: 32px;
font-size: 26px;
span {
display: block;
height: 40px;
line-height: 40px;
color: #d0253b;
font-weight: bold;
}
.tip {
color: #666;
font-size: 22px;
text-align: right;
font-weight: normal;
}
}
.title {
display: inline-block;
width: 175px;
}
.btn-balance {
float: right;
width: 140px;
height: 80px;
line-height: 80px;
text-align: center;
background: #e01;
color: #fff;
border: none;
font-size: 28px;
}
}
.cart-zero {
width: 100%;
height: auto;
padding-top: 2rem;
padding-bottom: 20%;
i {
font-size: 6em;
display: block;
margin: 0 auto;
text-align: center;
color: #505050;
.minus {
float: right;
}
}
p {
display: block;
text-align: center;
font-size: 1.0em;
color: #444444;
padding: .6rem 0;
.balance {
position: fixed;
box-sizing: border-box;
bottom: 0;
width: 100%;
padding: 20px;
height: 120px;
border-top: 1px solid #e0e0e0;
background: #fff;
.iconfont {
position: absolute;
top: 50%;
margin-top: -14px;
font-size: 28px;
}
p {
float: right;
margin-right: 32px;
font-size: 26px;
span {
display: block;
height: 40px;
line-height: 40px;
color: #d0253b;
font-weight: bold;
}
.tip {
color: #666;
font-size: 22px;
text-align: right;
font-weight: normal;
}
}
.btn-balance {
float: right;
width: 140px;
height: 80px;
line-height: 80px;
text-align: center;
background: #e01;
color: #fff;
border: none;
font-size: 28px;
}
}
a {
width: 27%;
height: 1.2rem;
overflow: hidden;
line-height: 1.2rem;
border: 1px solid #505050;
border-radius: .2rem;
display: block;
margin: 0 auto;
text-align: center;
color: #fff;
background: #444;
.cart-zero {
width: 100%;
height: auto;
padding-top: 2rem;
padding-bottom: 20%;
i {
font-size: 6em;
display: block;
margin: 0 auto;
text-align: center;
color: #505050;
}
p {
display: block;
text-align: center;
font-size: 1em;
color: #444;
padding: 0.6rem 0;
}
a {
width: 27%;
height: 1.2rem;
overflow: hidden;
line-height: 1.2rem;
border: 1px solid #505050;
border-radius: 0.2rem;
display: block;
margin: 0 auto;
text-align: center;
color: #fff;
background: #444;
}
}
}
}
... ...
... ... @@ -10,7 +10,7 @@
.title {
color: #444;
font-size: 28px;
font-size: 28px;
float: left;
position: relative;
... ... @@ -51,7 +51,7 @@
font-size: 28px;
color: #b0b0b0;
padding: 0 20px;
margin-bottom: 15px;
margin-bottom: 15px;
}
.tel {
... ... @@ -165,7 +165,7 @@
z-index: 9;
.mask-bg {
background: rgba(0,0,0,0.4);
background: rgba(0, 0, 0, 0.4);
position: absolute;
top: 0;
left: 0;
... ... @@ -212,4 +212,4 @@
}
}
}
}
\ No newline at end of file
}
... ...