Showing 51 changed files with 1062 additions and 2606 deletions

Too many changes to show.

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

... ... @@ -4,7 +4,9 @@
'use strict';
const _ = require('lodash');
const co = require('bluebird').coroutine;
const logger = global.yoho.logger;
const service = require('../models/cart-service');
const helper = require('../models/cart-helper');
const ghelper = require('../../guang/models/guang-helper');
... ... @@ -26,6 +28,12 @@ const getProductInfo = (req, res, next) => {
}).catch(next);
};
/**
* 获取产品数据json信息
* @param req
* @param res
* @param next
*/
const getProductData = (req, res, next) => {
let pid = req.query.productId || '';
... ... @@ -58,11 +66,15 @@ const setShoppingCookie = (req, res) => {
_r: 1
});
}
}).finally(() => {
return;
});
};
/**
* 首页迷你购物车数据信息json
* @param req
* @param res
* @param next
*/
const miniCart = (req, res, next) => {
let uid = req.user.uid;
... ... @@ -89,8 +101,7 @@ const miniCart = (req, res, next) => {
*/
const cart = (req, res, next) => {
let uid = req.user.uid; // 8040155; // req.user.uid; 20422448
// console.log('====================> ' + uid);
let uid = req.user.uid;
let shoppingKey = helper.getShoppingKeyByCookie(req);
let cartDelList = req.cookies['cart-del-list'];
... ... @@ -101,22 +112,15 @@ const cart = (req, res, next) => {
});
}
service.getCartData(uid, shoppingKey, cartDelList)
service.getCartData(uid, shoppingKey)
.then(ret => {
if (req.query.json === '1') {
return res.send(ret);
}
if (req.query.page === '1') {
return res.render('cart_bak', {
cart: {
}
});
}
return res.render('cart', {
title: '购物车 | ' + (res.locals.title || ''),
module: 'cart',
page: 'cart',
stepper: stepper,
... ... @@ -141,8 +145,12 @@ const cartAdd = (req, res) => {
let goodsType = req.body.goodsType || 0;
let promotionId = req.body.promotionId || 0;
let isEdit = req.body.isEdit || 0;
let isReAdd = !!req.body.isReAdd || false;
let cartDelList = helper.getCartDelList(req, res, null, isReAdd ? productSku : null);
let result = yield service.addToCart(productSku, buyNumber, goodsType, isEdit, promotionId, uid, shoppingKey);
let result = yield service.addToCart(productSku, buyNumber,
goodsType, isEdit, promotionId,
uid, shoppingKey, cartDelList);
// 设置加入购物车凭证到客户端浏览器
if (!shoppingKey && result && result.data && result.data.shopping_key) {
... ... @@ -152,12 +160,10 @@ const cartAdd = (req, res) => {
}
if (result && result.code === 200) {
return setShoppingCookie(req, res).then(() => {
return res.send(result);
});
} else {
res.send(result);
yield setShoppingCookie(req, res);
}
res.send(result);
})();
};
... ... @@ -180,21 +186,18 @@ const cartTotal = (req, res) => {
/**
* 购物车商品选择与取消
*/
const selectProduct = (req, res) => {
const selectProduct = (req, res, next) => {
let uid = req.user.uid;
let productId = req.body.skuList;
let hasPromotion = req.body.hasPromotion || false;
let shoppingKey = helper.getShoppingKeyByCookie(req);
let cartDelList = helper.getCartDelList(req, res);
service.selectGoods(uid, productId, shoppingKey, hasPromotion)
service.selectGoods(uid, productId, shoppingKey, hasPromotion, cartDelList)
.then(ret => {
res.send(ret);
}).catch(() => {
res.send({
code: 400
});
});
}).catch(next);
};
/**
... ... @@ -207,8 +210,9 @@ const modifyProductNum = (req, res, next) => {
let sku = req.body.sku;
let increaseNum = req.body.increaseNum || null;
let decreaseNum = req.body.decreaseNum || null;
let cartDelList = helper.getCartDelList(req, res);
return service.modifyProductNum(uid, sku, increaseNum, decreaseNum, shoppingKey)
return service.modifyProductNum(uid, sku, increaseNum, decreaseNum, shoppingKey, cartDelList)
.then(ret => {
if (ret && ret.code === 200) {
return setShoppingCookie(req, res).then(() => {
... ... @@ -234,8 +238,9 @@ const removeProduct = (req, res) => {
let shoppingKey = helper.getShoppingKeyByCookie(req);
let skuList = req.body.skuList;
let hasPromotion = true;
let cartDelList = helper.getCartDelList(req, res, req.body.cartDelList);
let ret = yield service.removeFromCart(uid, shoppingKey, skuList, hasPromotion);
let ret = yield service.removeFromCart(uid, shoppingKey, skuList, hasPromotion, cartDelList);
if (ret && ret.code === 200) {
yield setShoppingCookie(req, res);
... ... @@ -253,12 +258,27 @@ const moveToFav = (req, res) => {
co(function * () {
let uid = req.user.uid;
// let shoppingKey = helper.getShoppingKeyByCookie(req);
let skuList = req.body.skuList;
let hasPromotion = req.body.hasPromotion || false;
let isReFav = !!req.body.isReFav || false;
let productSku = null;
let cartDelList;
let ret;
if (isReFav) {
try {
let sl = JSON.parse(skuList);
if (sl && sl.length) {
productSku = _.get(sl[0], 'product_sku');
}
} catch (err) {
logger.error(err);
}
}
let ret = yield service.addToFav(uid, skuList, hasPromotion);
cartDelList = helper.getCartDelList(req, res, null, productSku);
ret = yield service.addToFav(uid, skuList, hasPromotion, cartDelList);
if (ret && ret.code === 200) {
yield setShoppingCookie(req, res);
... ... @@ -297,12 +317,6 @@ const getTogetherProduct = (req, res) => {
co(function * () {
let page = req.query.page;
/* let ret = {
code: 200,
message: '凑单商品'
};*/
let ret = yield service.getTogetherProduct(page);
return res.send(ret);
... ... @@ -339,36 +353,34 @@ const getIncreasePurchase = (req, res) => {
co(function * () {
let page = req.query.page;
/* let ret = {
code: 200,
message: '凑单商品'
};*/
let ret = yield service.getTogetherProduct(page);
return res.send(ret);
});
};
// 修改购物车商品颜色和尺寸
/**
* 修改购物车商品颜色和尺寸
*/
const modifyProduct = (req, res, next) => {
const uid = req.user && req.user.uid;
const shoppingKey = helper.getShoppingKeyByCookie(req);
let cartDelList = helper.getCartDelList(req, res);
// swapData => [{"buy_number":"1","selected":"Y","new_product_sku":"735172","old_product_sku":"735171"}]
const swapData = req.body.swapData;
service.modifyProduct({swapData, shoppingKey, uid}).then((result) => {
/* if (result.code === 200) {
} else {
res.json(result);
}*/
service.modifyProduct({swapData, shoppingKey, uid}, uid, shoppingKey, cartDelList).then((result) => {
res.send(result);
}).catch(next);
};
/**
* 换购赠品或加价购
* @param req
* @param res
* @param next
*/
const swapGift = (req, res, next) => {
let uid = req.user && req.user.uid;
... ... @@ -377,8 +389,9 @@ const swapGift = (req, res, next) => {
let promotionId = req.body.promotionId;
let newSkn = req.body.newSkn;
let newSku = req.body.newSku;
let cartDelList = helper.getCartDelList(req, res);
service.swapGift(uid, shoppingKey, promotionId, newSkn, newSku)
service.swapGift(uid, shoppingKey, promotionId, newSkn, newSku, cartDelList)
.then(ret => {
res.send(ret);
}).catch(next);
... ...
... ... @@ -17,7 +17,6 @@ const index = (req, res, next) => {
let uid = req.user.uid;
let params = req.query;
// params = {bundle: 1124, sku: '809291,789238'};
easypay.getEasypayOrderData(params, uid).then(result => {
let header = headerModel.setSimpleHeaderData() || {};
... ...
... ... @@ -6,6 +6,8 @@
'use strict';
const crypto = global.yoho.crypto;
const authcode = require(`${global.utils}/authcode`);
const headerModel = require('../../../doraemon/models/simple-header');
const oeModel = require('../models/order-ensure');
... ... @@ -26,6 +28,7 @@ const index = (req, res, next) => {
});
res.render('order-ensure2016', {
title: '填写订单 | ' + (res.locals.title || ''),
page: 'ensure',
content: result,
simpleHeader: header
... ... @@ -53,6 +56,7 @@ const compute = (req, res, next) => {
// 提交订单
const submit = (req, res, next) => {
let cartType = req.body.cartType === '2' ? 'advance' : 'ordinary';
let uid = req.user.uid;
if (!req.body.addressId) {
res.send({
... ... @@ -62,7 +66,56 @@ const submit = (req, res, next) => {
return;
}
oeModel.submit(req.user.uid, cartType, req.body).then(data => {
/* 判断是否是友盟过来的用户 */
let userAgent = null;
let unionKey = '';
let unionInfo = {};
if (req.cookies.mkt_code || req.cookies._QYH_UNION) {
/* eslint-disable */
/*
*1、http://union.yohobuy.com/go?client_id=3415&aid=0118&channel=3415&cid=3601&wi=NDgwMDB8dGVzdA==&target=http://m.yohobuy.com/
*2、http://union.yoho.cn/union/jump?channel_id=51fanli&u_id=6&tracking_code=fanli123&target_url=http%3a%2f%2fm.yohobuy.com%3funion_type%3d3063%26utm_source%3dmfanli%26utm_medium%3dcps%26utm_campaign%3dmpfanli
*3、union.yohobuy.com/go/proxy?utm_medium=none&utm_campaign=none&client_id=991002&ads_code=&go_url=https%253A%252F%252Fm.yohobuy.com%252F%253Futm_source%253Dhyyx%2526utm_medium%253Dnone%2526utm_campaign%253Dnone%2526union_type%253D991002&channel_code=hyyx&append=&mbr_name=&u_id=&aid=&channel=cps&cid=&wi=
**/
/* tar modified 161108 添加新的联盟数据处理逻辑,兼容原有联盟数据处理,
区别是旧的北京写 cookie 加密过来,新的 node 写 cookie,没有加密 */
/* eslint-enable */
if (req.cookies._QYH_UNION) {
unionKey = authcode(req.cookies._QYH_UNION, 'q_union_yohobuy');
if (!unionKey) {
let encryData, testQyhUnion;
encryData = crypto.decrypt('', decodeURIComponent(req.cookies._QYH_UNION));
encryData = encryData.substr(0, encryData.lastIndexOf('}') + 1);
testQyhUnion = JSON.parse(encryData);
unionKey = testQyhUnion.client_id ? encryData : '';
}
} else {
unionKey = '{"client_id":' + req.cookies.mkt_code + '}';
}
/* 检查联盟参数是否有效 */
unionInfo = unionKey ? JSON.parse(unionKey) : {};
/* 模拟APP的User-Agent */
userAgent = unionInfo.client_id ? 'YOHO!Buy/3.8.2.259(Model/PC;Channel/' +
unionInfo.client_id + ';uid/' + uid + ')' : null;
}
Object.assign(req.body, {
qhyUnion: unionKey,
userAgent: userAgent
});
oeModel.submit(uid, cartType, req.body).then(data => {
if (data && data.code === 200 && unionKey) {
data.data.unionKey = {
client_id: unionInfo.client_id
};
}
res.send(data);
}).catch(next);
};
... ...
... ... @@ -23,7 +23,7 @@ app.use(global.yoho.hbs({
extname: '.hbs',
defaultLayout: 'layout',
layoutsDir: doraemon,
partialsDir: [path.join(__dirname, 'views/partial')],
partialsDir: [path.join(__dirname, 'views/partial'), path.join(__dirname, '../../mix')],
views: path.join(__dirname, 'views/action'),
helpers: Object.assign(require('./utils/helper'), global.yoho.helpers)
}));
... ...
... ... @@ -76,10 +76,11 @@ const addToCart = (productSku, buyNumber,
* @param bool $hasPromotion 是否有促销ID
* @return array 购物车接口返回的数据
*/
const selectGoods = (uid, sku, shoppingKey, hasPromotion) => {
const selectGoods = (uid, sku, shoppingKey /* , hasPromotion*/) => {
let param = {
method: hasPromotion ? 'app.Shopping.selectedAndCart' : 'app.Shopping.selected',
// method: hasPromotion ? 'app.Shopping.selectedAndCart' : 'app.Shopping.selected',
method: 'app.Shopping.selectedAndQryCart',
product_sku_list: sku
};
... ... @@ -104,10 +105,11 @@ const selectGoods = (uid, sku, shoppingKey, hasPromotion) => {
* @param bool $hasPromotion 是否有促销ID
* @return array 接口返回的数据
*/
const removeFromCart = (uid, shoppingKey, skuList, hasPromotion) =>{
const removeFromCart = (uid, shoppingKey, skuList /* , hasPromotion*/) =>{
let param = {
method: hasPromotion ? 'app.Shopping.removeAndCart' : 'app.Shopping.remove',
// method: hasPromotion ? 'app.Shopping.removeAndCart' : 'app.Shopping.remove',
method: 'app.Shopping.removeAndQryCart',
product_sku_list: skuList
};
... ... @@ -129,10 +131,11 @@ const removeFromCart = (uid, shoppingKey, skuList, hasPromotion) =>{
* @param bool $hasPromotion 是否有促销ID
* @return array 接口返回的数据
*/
const addToFav = (uid, skuList, hasPromotion) =>{
const addToFav = (uid, skuList /* , hasPromotion*/) =>{
let param = {
method: hasPromotion ? 'app.Shopping.addfavoriteAndCart' : 'app.Shopping.addfavorite',
// method: hasPromotion ? 'app.Shopping.addfavoriteAndCart' : 'app.Shopping.addfavorite',
method: 'app.Shopping.addfavoriteAndQryCart',
product_sku_list: skuList,
uid: uid
};
... ... @@ -140,45 +143,6 @@ const addToFav = (uid, skuList, hasPromotion) =>{
return api.get('', param);
};
/**
* 获取购物车商品详情数据
*
* @param int $uid 用户ID
* @param int $skn 商品skn
* @return array 接口返回的数据
*/
const cartProductData = (uid, skn) => {
let param = {
method: 'app.product.data',
product_skn: skn,
showcomment: 'N',
uid: uid
};
return api.get('', param);
};
/**
* 获取加价购商品详情数据
*
* @param int $skn 商品skn
* @param int $promotionId 加价购商品促销ID
* @return array 接口返回的数据
*/
const giftProductData = (skn, promotionId) => {
let param = {
method: 'app.product.gift',
product_skn: skn,
promotion_id: promotionId
};
return api.get('', param);
};
/**
* 增减购物车商品数量
*
... ... @@ -218,160 +182,6 @@ const modifyProductNum = (uid, sku, increaseNum, decreaseNum, shoppingKey) => {
};
/**
* 修改购物车商品数据
*
* @param int $uid 用户ID
* @param string $swapData 商品数据
* @param string $shoppingKey 未登录用户唯一识别码
* @return array 接口返回的数据
*/
const modifyCartProduct = (uid, swapData, shoppingKey) => {
let param = {
method: 'app.Shopping.swap',
swap_data: swapData
};
if (uid) {
param.uid = uid;
}
if (shoppingKey) {
param.shopping_key = shoppingKey;
}
return api.get('', param);
};
/**
* 购物车结算
*
* @param int $uid 用户ID
* @param string $cartType 购物车类型,ordinary表示普通, advance表示预售
* @param int $isUseYohoCoin 是否使用有货币,默认0不使用, 1使用
* @return array 接口返回的数据
*/
const cartPay = (uid, cartType, isUseYohoCoin) => {
let param = {
method: 'app.Shopping.payment',
cart_type: cartType,
yoho_coin_mode: isUseYohoCoin || 0,
uid: uid
};
if (_.indexOf(['ordinary', 'advance'], cartType) === -1) {
return {
code: 400,
message: '购物车参数类型有误!',
data: {}
};
}
return api.get('', param);
};
/**
* 购物车结算--支付方式和配送方式选择
*
* @param int $uid 用户ID
* @param string $cartType 购物车类型,ordinary表示普通, advance表示预售
* @param int $deliveryWay 配送方式,1表示普通快递,2表示顺丰速运
* @param int $paymentType 支付方式,1表示在线支付,2表示货到付款
* @param string $couponCode 优惠券码
* @param string $promotionCode 优惠码
* @param mixed $yohoCoin 使用的有货币数量
* @param int $redEnvelopes 红包
* @return array 接口返回的数据
*/
const orderCompute = (uid, cartType, deliveryWay, paymentType, couponCode, promotionCode, yohoCoin, redEnvelopes) =>{
let param = {
method: 'app.Shopping.compute',
cart_type: cartType,
delivery_way: deliveryWay,
payment_type: paymentType,
check_yohocoin_amount: 'Y', // 控制是否判断有货币超出订单金额
uid: uid
};
if (_.indexOf(['ordinary', 'advance'], cartType) === -1) {
return {
code: 400,
message: '购物车参数类型有误!',
data: {}
};
}
if (couponCode) {
param.coupon_code = couponCode;
}
if (promotionCode) {
param.promotion_code = promotionCode;
}
if (yohoCoin) {
param.use_yoho_coin = yohoCoin;
}
if (redEnvelopes) {
param.use_red_envelopes = redEnvelopes;
}
return api.get('', param);
};
/**
* 购物车结算--使用优惠券
*
* @param int $uid 用户ID
* @param string $couponCode 优惠券代码
* @return array 接口返回的数据
*/
const searchCoupon = (uid, couponCode) => {
let param = {
method: 'app.Shopping.useCoupon',
coupon_code: couponCode,
uid: uid
};
return api.get('', param);
};
/**
* 购物车结算--获取优惠券列表
*
* @param int $uid 用户ID
* @return array 接口返回的数据
*/
const getCouponList = (uid, limit) => {
let param = {
method: 'app.coupons.lists',
type: 'notuse',
page: 1,
limit: limit || 10,
uid: uid
};
return api.get('', param);
};
/**
* 购物车结算--获取用户可用和不可用的优惠券列表
*
* @param int $uid 用户ID
* @return array 接口返回的数据
*/
const getListCoupon = (uid) => {
let param = {
method: 'app.Shopping.listCoupon',
uid: uid
};
return api.get('', param);
};
/**
* 购物车数量
*
* @param int $uid 用户ID
... ... @@ -414,103 +224,11 @@ const togetherProduct = (page) => {
};
/**
* 浏览记录数据
*
* @param int $uid 用户ID
* @param int $udid 客户端唯一标识
* @param int $page 第几页,默认为1
* @param int $limit 限制多少条,默认100
* @return array 接口返回的数据
*/
const browseRecord = (uid, udid, page, limit) => {
let param = {
method: 'app.browse.product',
uid: uid,
udid: udid,
page: page || 1,
limit: limit || 10
};
return api.get('', param);
};
/**
* 通过搜索查询商品信息
*
* 备注:因默认的搜索方法会有过滤, 浏览记录不需要过滤
*
* @param string $query 查询的条件
* @param int $limit 查询的限制数
* @return array
*/
const browseRecordFromSearch = (query, limit) => {
let param = {
method: 'web.search.search',
order: 'shelve_time:desc',
page: 1,
viewNum: limit || 10,
query: query
};
return api.get('', param);
};
/**
* 选择支付,校验时间间隔,插入数据
* @param string $uid
* @param string $orderCode
* @param int $payment 14:银联手机支付 15:支付宝手机 18:支付宝wap(wap) 19:微信支付 22:微信wap(wap) 26:QQ钱包手机支付
* @return type
*/
const savePrePayInfo = (uid, orderCode, payment) => {
let param = {
method: 'app.order.savePrePayInfo',
uid: uid,
orderCode: orderCode,
payment: payment
};
return api.get('', param);
};
/**
* 电子票添加和查询
* @param int $uid 用户ID
* @param type int $productSku 产品sku
* @param type int $buyNumber 购买数量,范围1-4
* @param type int $yohoCoin 有货币
* @return type []
* 判断商品列表是否收藏情况
* @param uid
* @param pidList
* @returns {Promise.<T>}
*/
const addTicket = (uid, productSku, buyNumber, yohoCoin) => {
let param = {
method: 'app.shopping.ticket',
uid: Number(uid),
product_sku: Number(productSku),
buy_number: Number(buyNumber)
};
// 有货币转换成元,1有货币等于一分钱
if (yohoCoin && yohoCoin > 0) {
param.use_yoho_coin = yohoCoin / 100;
}
return api.get('', param).then(ret => {
// 展览票不显示区域,上面要求的。@高扬、@徐洪云,2016/7/6
if (ret && ret.data && ret.data.goods_list) {
_.forEach(() => {
// it.size_name = it.product_skn * 1 === EXHIBITION_TICKET ? '' : it.size_name;
// ret.data.goods_list[key] = it;
});
}
return ret;
});
};
const checkUserIsFavProductList = (uid, pidList) => {
pidList = _.isArray(pidList) ? pidList : [];
... ... @@ -646,21 +364,9 @@ module.exports = {
selectGoods,
removeFromCart,
addToFav,
cartProductData,
giftProductData,
modifyProductNum,
modifyCartProduct,
cartPay,
orderCompute,
searchCoupon,
getCouponList,
getListCoupon,
cartCount,
togetherProduct,
browseRecord,
browseRecordFromSearch,
savePrePayInfo,
addTicket,
checkUserIsFavProductList,
newPreference,
modifyProduct,
... ...
... ... @@ -6,6 +6,7 @@
const _ = require('lodash');
const helpers = global.yoho.helpers;
const md5 = require('md5');
const logger = global.yoho.logger;
const PROMOTION_TYPE_TAG_MAP = {
Cashreduce: '满减', // 满减
... ... @@ -15,7 +16,8 @@ const PROMOTION_TYPE_TAG_MAP = {
Gift: '赠品',
Needpaygift: '加价购',
SpecifiedAmount: '满减', // X件X元
FreeShippingCost: '免运费'
FreeShippingCost: '免运费',
VipFreeShippingCost: '免运费'
};
const GOODS_TYPE_TAG_MAP = {
... ... @@ -52,6 +54,55 @@ const makeToken = (str) => {
};
/**
* cookie cart-del-list 的数据操作
* @param req
* @param res
* @param addsStr 向删除列表中加入数据
* @param delId 删除列表中移除某个 id 的产品
*/
const getCartDelList = (req, res, addsStr, delSkuId) => {
let cartDelListStr = req.cookies['cart-del-list'] || '';
let isMod = false;
let cookieDelStr = '';
try {
let cartDelList = cartDelListStr ? JSON.parse(cartDelListStr) : [];
let addList = addsStr ? JSON.parse(addsStr) : null;
// 追加
if (addList && addList.length && _.isArray(cartDelList)) {
isMod = true;
cartDelList = cartDelList.concat(addList);
}
if (delSkuId) {
isMod = true;
_.remove(cartDelList, it => {
return Number(it.productSku) === Number(delSkuId);
});
}
if (isMod) {
if (cartDelList && cartDelList.length > 0) {
cookieDelStr = JSON.stringify(cartDelList);
}
res.cookie('cart-del-list', cookieDelStr, {
domain: '.yohobuy.com',
path: '/'
});
}
return cartDelList;
} catch (err) {
logger.error(err);
}
return null;
};
/**
* 购物车商品
* @param array cartGoods 购物车商品列表
* @param bool isAdvanceCart 是否是预售购物车(和上市期有关)
... ... @@ -86,10 +137,15 @@ const formatCartGoods = (cartGoods, isAdvanceCart, inValid, isOffShelves, analys
isAdvance: isAdvanceCart
};
if (it.min_buy_number) {
goods.minBuyNumber = Number(it.min_buy_number);
}
// 已下架
if (isOffShelves) {
goods.isTipNoStore = true;
goods.tipMessage = '库存不足';
goods.isOffShelve = true;
} else if (!inValid) { // 有效
if (goods.productNum > goods.storageNum) {
goods.isTipNoStore = true; // 是否在结算时候显示库存不足
... ... @@ -156,9 +212,8 @@ const formatCartGoods = (cartGoods, isAdvanceCart, inValid, isOffShelves, analys
}
// 商品链接
let cnAlphaBet = it.cn_alphabet ? it.cn_alphabet : md5(it.product_name);
goods.link = helpers.urlFormat(`/product/pro_${it.product_id}_${it.goods_id}/${cnAlphaBet}.html`, null, 'item');
// let cnAlphaBet = it.cn_alphabet ? it.cn_alphabet : md5(it.product_name);
goods.link = helpers.getUrlBySkc(it.product_id, it.goods_id, it.cn_alphabet);
return goods;
});
... ... @@ -236,8 +291,8 @@ const formatPriceGiftOne = (it) => {
maxSelectNumber: it.max_select_number,
promotionType: it.promotion_type,
tag: PROMOTION_TYPE_TAG_MAP[it.promotion_type],
isGift: 'Gift' === it.promotion_type,
isPriceGift: 'Needpaygift' === it.promotion_type
isGift: it.promotion_type === 'Gift',
isPriceGift: it.promotion_type === 'Needpaygift'
};
gift.goodsList = _.map(it.goods_list, (g) => {
... ... @@ -256,10 +311,8 @@ const formatPriceGiftOne = (it) => {
// 商品链接
if (g.goods_id) {
let cnAlphaBet = g.cn_alphabet ? g.cn_alphabet : md5(g.product_name);
goods.subjoinLink = helpers.urlFormat(`/product/pro_${g.product_id}_${g.goods_id}/${cnAlphaBet}.html`,
null, 'item');
// let cnAlphaBet = g.cn_alphabet ? g.cn_alphabet : md5(g.product_name);
goods.subjoinLink = helpers.getUrlBySkc(g.product_id, g.goods_id, g.cn_alphabet);
} else {
let uri = `/product/show_${g.product_id}_${g.product_skn}/${makeToken(g.product_skn)}.html`;
... ... @@ -325,14 +378,14 @@ const formatPromotion = (it, selectedGiftsList) => {
promotionId: it.promotion_id, // 促销id
promotionTitle: it.promotion_title, // "已满足[满30减10-dev30]",
promotionType: it.promotion_type, // 促销类型
// list.yohobuy.com?pp_id=10408
promotionPageUrl: helpers.urlFormat('', { pp_id: it.promotion_id }, 'list'),
// list.yohobuy.com?psp_id=10408
promotionPageUrl: helpers.urlFormat('', { psp_id: it.promotion_id }, 'list'),
tag: PROMOTION_TYPE_TAG_MAP[it.promotion_type],
isGift: it.promotion_type === 'Gift',
isPriceGift: it.promotion_type === 'Needpaygift',
isNotReach: status === 0, // 未满足
isReach: status === 10 || status === 30, // 满足条件
isReach: status === 10 || status === 30 || status === 20, // 满足条件
isEmpty: status === 20, // 已售完
isSelected: status === 30 // 已选择,可更换
};
... ... @@ -340,18 +393,37 @@ const formatPromotion = (it, selectedGiftsList) => {
// 判断赠品/加价购商品,是否被选中
info.giftGoodsList = checkGoodsIsSel(info.giftGoodsList, info.promotionId, selectedGiftsList);
if (status === 0) {
let tipTxt = `差${ -1 * info.conditionValue}`;
function toDecimal(x) {
var original = Math.round(Math.abs(x) * 100) / 100;
var s = original.toString();
var rs = s.indexOf('.');
if (rs < 0) {
rs = s.length;
s += '.';
}
while (s.length <= rs + 2) {
s += '0';
}
return s;
}
if (info.isNotReach) {
let tipTxtMoney = `${ toDecimal(info.conditionValue)}`;
let tipTxt = `${ -(Math.round(parseFloat(info.conditionValue) * 100) / 100)}`;
if (info.conditionUnit === 1) {
tipTxt += '件';
} else if (info.conditionUnit === 2) {
tipTxt += '元';
tipTxt = tipTxtMoney + '元';
}
info.promotionTitle = tipTxt + info.promotionTitle;
} else if (status === 10) {
info.promotionTitle = '已满足' + info.promotionTitle;
tipTxt = '<span style=\'color:#ff575c\'>' + tipTxt + '</span>';
info.promotionTitle = '还差' + tipTxt + '满足&nbsp;&nbsp;&nbsp;' + info.promotionTitle;
} else if (info.isReach && !info.isSelected) {
info.promotionTitle = '已满足&nbsp;&nbsp;&nbsp;' + info.promotionTitle;
}
if (info.giftGoodsList) {
... ... @@ -429,6 +501,146 @@ const formatPromotionPools = (pools, selectedGiftsList, isAdvance) => {
});
};
const formatCart = (cartDataRet, uid, shoppingKey, cartDelList) => {
let analysisData = {
ids: [],
criteo: []
}; // 存放分析用的数据
let result = {
isEmpty: false,
isLogin: !!uid,
searchUrl: helpers.urlFormat('', null, 'search'), // 搜索链接(再逛逛)
listUrl: helpers.urlFormat('', null, 'list'),
viewOrderUrl: helpers.urlFormat('/home/orders', {
t: new Date().getTime()
})
};
// 未登录
if (!uid) {
result.loginUrl = helpers.urlFormat('/signin.html', {
refer: helpers.urlFormat('/shopping/cart')
});
}
// 调用接口,获取购物车数据
// let cartDataRet = yield cartApi.cartData(uid, shoppingKey);
let cartData = cartDataRet && cartDataRet.data;
let advCartData = _.get(cartData, 'advance_cart_data');
let ordCartData = _.get(cartData, 'ordinary_cart_data');
// 接口异常时,购物车置为空
if (!cartData) {
result.isEmpty = true;
// UdpLog::info('【购物车】校验参数传递auth', 'uid:' . $uid . 'shoppingKey:' . $shoppingKey);
return result;
}
result.advanceCart = {
// 未参加活动的商品
// goodsList: chelper.formatCartGoods(_.get(advCartData, 'goods_list'), true, false, false, analysisData),
pools: formatPromotionPools(_.get(advCartData, 'goods_pool_list'), null, true),
offShelves: formatOffShelves(_.get(advCartData, 'off_shelves_goods_list'), true, analysisData),
soldOuts: formatSoldOuts(_.get(advCartData, 'sold_out_goods_list'), true, analysisData),
promotionInfos: formatPromotionInfos(_.get(advCartData, 'promotion_info')),
stat: formatShoppingCartData(_.get(advCartData, 'shopping_cart_data')),
ensureUrl: helpers.urlFormat('/cart/ensure', {
type: 2
})
};
// let giftsList = formatPriceGifts(_.get(ordCartData, 'gift_list'));
// let priceGifts = formatPriceGifts(_.get(ordCartData, 'price_gift'));
let goodsList = formatCartGoods(_.get(ordCartData, 'goods_list'), false, false, false, analysisData);
result.ordinaryCart = {
// 全场可选的赠品
// gifts: giftsList, // chelper.formatGifts(_.get(ordCartData, 'gift_list')),
// 全场可选的加价购商品列表
// priceGifts: priceGifts, // chelper.formatPriceGifts(_.get(ordCartData, 'price_gift')),
giftsPromotionInfos: formatPoolPromotionInfos(_.get(ordCartData, 'g_gift_list')),
priceGiftsPromotionInfos: formatPoolPromotionInfos(_.get(ordCartData, 'g_price_gift_list')),
// 已选择的全场加价购和赠品
goodsList: goodsList,
pools: formatPromotionPools(_.get(ordCartData, 'goods_pool_list'), goodsList),
offShelves: formatOffShelves(_.get(ordCartData, 'off_shelves_goods_list'), false, analysisData),
soldOuts: formatSoldOuts(_.get(ordCartData, 'sold_out_goods_list'), false, analysisData),
promotionInfos: formatPromotionInfos(_.get(ordCartData, 'promotion_info'), goodsList),
stat: formatShoppingCartData(_.get(ordCartData, 'shopping_cart_data')),
ensureUrl: helpers.urlFormat('/cart/ensure')
};
let advStat = result.advanceCart.stat;
let ordStat = result.ordinaryCart.stat;
// 为空
if (!_.get(advStat, 'goodsCount', 0)) {
result.advanceCart = false;
}
if (!_.get(ordStat, 'goodsCount', 0)) {
result.ordinaryCart = false;
}
if (!result.advanceCart && !result.ordinaryCart) {
result.isEmpty = true;
}
// promotionInfos, gifts, priceGifts 放一起展示
let hasGifts = result.ordinaryCart.gifts && result.ordinaryCart.gifts.length;
let hasPrices = result.ordinaryCart.priceGifts && result.ordinaryCart.priceGifts.length;
let hasPromo = result.ordinaryCart.promotionInfos && result.ordinaryCart.promotionInfos.length;
let orderAmount = (parseFloat(_.get(advStat, 'orderAmount', 0)) +
parseFloat(_.get(ordStat, 'orderAmount', 0))).toFixed(2);
let lastOrderAmount = (parseFloat(_.get(advStat, 'lastOrderAmount', 0)) +
parseFloat(_.get(ordStat, 'lastOrderAmount', 0))).toFixed(2);
if (result.ordinaryCart) {
result.ordinaryCart.hasGlobalBlock = hasGifts || hasPrices || hasPromo;
}
result.stat = {
orderAmount: orderAmount,
lastOrderAmount: lastOrderAmount,
discountAmount: (orderAmount - lastOrderAmount).toFixed(2),
gainYohoCoin: parseFloat(_.get(advStat, 'gainYohoCoin', 0)) + parseFloat(_.get(ordStat, 'gainYohoCoin', 0)),
goodsCount: _.get(advStat, 'goodsCount', 0) + _.get(ordStat, 'goodsCount', 0),
selectedGoodsCount: _.get(advStat, 'selectedGoodsCount', 0) + _.get(ordStat, 'selectedGoodsCount', 0)
};
// 移除的商品列表
result.deleteShop = cartDelList;
// 普通购物车和预售购物车都为空
/* if (ordinaryCount === 0 && advanceCount === 0 && ordinarySoldOut && advanceSoldOut) {
result.isEmpty = true;
return result;
}*/
// 预售和普通都有商品
if (result.advanceCart && _.get(result, 'advanceCart.stat.selectedGoodsCount') > 0 &&
result.ordinaryCart && _.get(result, 'ordinaryCart.stat.selectedGoodsCount') > 0) {
result.stat.mix = true;
} else if (result.advanceCart && _.get(result, 'advanceCart.stat.selectedGoodsCount') > 0) {
result.stat.ensureUrl = result.advanceCart.ensureUrl;
} else if (result.ordinaryCart && _.get(result, 'ordinaryCart.stat.selectedGoodsCount') > 0) {
result.stat.ensureUrl = result.ordinaryCart.ensureUrl;
}
Object.assign(result, {
ids: _.isArray(analysisData.ids) ? analysisData.ids.join(',') : '',
criteo: analysisData.criteo || ''
});
return result;
};
module.exports = {
transPrice,
getShoppingKeyByCookie,
... ... @@ -442,5 +654,8 @@ module.exports = {
formatPromotionPools,
formatPromotionInfos,
formatOffShelves,
formatSoldOuts
formatSoldOuts,
formatCart,
getCartDelList
};
... ...
... ... @@ -11,14 +11,25 @@ const co = Promise.coroutine;
const _ = require('lodash');
const api = global.yoho.API;
const helpers = global.yoho.helpers;
const logger = global.yoho.logger;
const md5 = require('md5');
// const md5 = require('md5');
const ERROR_400_MESSAGE = '系统繁忙,请稍候再试!';
const productAPI = require('./product-api');
const cartApi = require('./cart-api');
const chelper = require('./cart-helper');
/**
* 转换价格
*
* @param float|string $price 价格
* @return float|string 转换之后的价格
*/
const transPrice = (price) => {
return price ? (price * 1).toFixed(2) : '0.00';
};
const _getProductIntroAsync = (productSkn) => {
return co(function * () {
let result = yield Promise.props({
... ... @@ -411,6 +422,13 @@ const getCoupons = (uid) => api.get('', {
return result;
});
/**
* 购物车数据
* @param uid
* @param shoppingKey
* @param cartDelList
* @returns {*}
*/
const getCartData = (uid, shoppingKey, cartDelList) => {
let analysisData = {
... ... @@ -576,7 +594,7 @@ const getCartCount = (uid, shoppingKey) => {
* @param string $shoppingKey 购物车在浏览器的唯一识别码,可以不传
* @return array 加入购物车接口返回的数据
*/
const addToCart = (productSku, buyNumber, goodsType, isEdit, promotionId, uid, shoppingKey) => {
const addToCart = (productSku, buyNumber, goodsType, isEdit, promotionId, uid, shoppingKey, cartDelList) => {
return co(function * () {
let result = {
... ... @@ -591,9 +609,13 @@ const addToCart = (productSku, buyNumber, goodsType, isEdit, promotionId, uid, s
let ret = yield cartApi.addToCart(productSku, buyNumber, goodsType, isEdit, promotionId, uid, shoppingKey);
if (ret && ret.code) {
result = ret;
result = {
code: ret.code,
data: yield getCartData(uid, shoppingKey, cartDelList)
};
}
/* if (empty($addCart) || (isset($addCart['code']) && $addCart['code'] !== 200) ) {
UdpLog::info('【购物车】校验参数传递auth','productSku:'.$productSku.'buyNumber:'.$buyNumber.
'goodsType:'.$goodsType,'isEdit:'.$isEdit.'promotionId:'.$promotionId.'uid:'.$uid.'shoppingKey:'.$shoppingKey);
... ... @@ -612,7 +634,7 @@ const addToCart = (productSku, buyNumber, goodsType, isEdit, promotionId, uid, s
* @param bool hasPromotion 标识是不是有promotion_id参数, 后端会去调用不同的接口
* @return array 处理之后的数据的数据
*/
const selectGoods = (uid, skuList, shoppingKey, hasPromotion) => {
const selectGoods = (uid, skuList, shoppingKey, hasPromotion, cartDelList) => {
return co(function * () {
let result = {
... ... @@ -628,7 +650,12 @@ const selectGoods = (uid, skuList, shoppingKey, hasPromotion) => {
let select = yield cartApi.selectGoods(uid, skuList, shoppingKey, hasPromotion);
if (select && select.code) {
result = select;
result = {
code: select.code,
data: chelper.formatCart(select, uid, shoppingKey, cartDelList)
};
// result = select;
}/* else {
UdpLog::info('【购物车】校验参数传递auth', 'uid:' . $uid . 'skuList:'
. $skuList . 'shoppingKey:' . $shoppingKey . 'hasPromotion:' . $hasPromotion);
... ... @@ -648,7 +675,7 @@ const selectGoods = (uid, skuList, shoppingKey, hasPromotion) => {
* @param string $shoppingKey 未登录用户唯一识别码
* @return array 接口返回的数据
*/
const modifyProductNum = (uid, sku, increaseNum, decreaseNum, shoppingKey) => {
const modifyProductNum = (uid, sku, increaseNum, decreaseNum, shoppingKey, cartDelList) => {
return co(function * () {
let result = {
... ... @@ -661,10 +688,13 @@ const modifyProductNum = (uid, sku, increaseNum, decreaseNum, shoppingKey) => {
return result;
}
let modify = yield cartApi.modifyProductNum(uid, sku, increaseNum, decreaseNum, shoppingKey);
let ret = yield cartApi.modifyProductNum(uid, sku, increaseNum, decreaseNum, shoppingKey);
if (modify && modify.code) {
result = modify;
if (ret && ret.code) {
result = {
code: ret.code,
data: yield getCartData(uid, shoppingKey, cartDelList)
};
}/* else {
UdpLog::info('【购物车】校验参数传递auth', 'uid:' . $uid . 'sku:' . $sku, 'increaseNum:'
. $increaseNum . 'decreaseNum:' . $decreaseNum . 'shoppingKey:' . $shoppingKey);
... ... @@ -685,7 +715,7 @@ const modifyProductNum = (uid, sku, increaseNum, decreaseNum, shoppingKey) => {
* @param bool hasPromotion 标识是不是有promotion_id参数, 后端会去调用不同的接口
* @return array 接口返回的数据
*/
const removeFromCart = (uid, shoppingKey, skuList, hasPromotion) => {
const removeFromCart = (uid, shoppingKey, skuList, hasPromotion, cartDelList) => {
return co(function * () {
let result = {
... ... @@ -698,14 +728,13 @@ const removeFromCart = (uid, shoppingKey, skuList, hasPromotion) => {
return result;
}
let remove = yield cartApi.removeFromCart(uid, shoppingKey, skuList, hasPromotion);
let ret = yield cartApi.removeFromCart(uid, shoppingKey, skuList, hasPromotion);
if (remove && remove.code) {
result.code = remove.code;
result.message = remove.message;
if (remove.data && remove.data.goods_count) {
result.totalGoodsNum = remove.data.goods_count;
}
if (ret && ret.code) {
result = {
code: ret.code,
data: chelper.formatCart(ret, uid, shoppingKey, cartDelList)
};
}/* else {
UdpLog::info('【购物车】校验参数传递auth', 'uid:' . $uid . 'skuList:' .
$skuList . 'shoppingKey:' . $shoppingKey . 'hasPromotion:' . $hasPromotion);
... ... @@ -723,7 +752,7 @@ const removeFromCart = (uid, shoppingKey, skuList, hasPromotion) => {
* @param bool hasPromotion 标识是不是有promotion_id参数, 后端会去调用不同的接口
* @return array 接口返回的数据
*/
const addToFav = (uid, skuList, hasPromotion) => {
const addToFav = (uid, skuList, hasPromotion, cartDelList) => {
return co(function * () {
let result = {
... ... @@ -748,10 +777,13 @@ const addToFav = (uid, skuList, hasPromotion) => {
return result;
}
let add = yield cartApi.addToFav(uid, skuList, hasPromotion);
let ret = yield cartApi.addToFav(uid, skuList, hasPromotion);
if (add && add.code) {
result = add;
if (ret && ret.code) {
result = {
code: ret.code,
data: chelper.formatCart(ret, uid, null, cartDelList)
};
}/* else {
UdpLog::info('【购物车】校验参数传递auth', 'uid:' . $uid . 'skuList:' . $skuList . 'hasPromotion:' . $hasPromotion);
}*/
... ... @@ -856,9 +888,6 @@ const getRecommendProduct = (channel, uid, udid, page) => {
let item = {
id: it.product_id,
skn: it.product_skn,
// href: Helpers::getUrlBySkc($value['product_id'],
// $value['goods_list'][0]['product_skc'], $value['cn_alphabet']),
title: it.product_name,
img: it.default_images ? helpers.image(it.default_images, 190, 250) : '',
alt: it.product_name,
... ... @@ -866,11 +895,11 @@ const getRecommendProduct = (channel, uid, udid, page) => {
};
// 商品链接
let cnAlphaBet = it.cn_alphabet ? it.cn_alphabet : md5(it.product_name);
// let cnAlphaBet = it.cn_alphabet ? it.cn_alphabet : md5(it.product_name);
let firstGoods = it.goods_list && it.goods_list[0];
let productSkc = firstGoods && firstGoods.product_skc;
item.href = helpers.url(`/product/pro_${it.product_id}_${productSkc}/${cnAlphaBet}.html`, null, 'item');
item.href = helpers.getUrlBySkc(it.product_id, productSkc, it.cn_alphabet);
if (it.sales_price !== it.market_price) {
it.marketPrice = chelper.transPrice(it.market_price);
... ... @@ -879,8 +908,6 @@ const getRecommendProduct = (channel, uid, udid, page) => {
});
Object.assign(result.data, {
// hasPrev: page > 1,
// hasNext: plist.length >= end,
item: items
});
... ... @@ -935,13 +962,6 @@ const getTogetherProduct = (page) => {
price: Number(it.price.sales_price)
};
// 商品链接
/* let cnAlphaBet = it.cn_alphabet ? it.cn_alphabet : md5(it.product_name);
let firstGoods = it.goods_list && it.goods_list[0];
let productSkc = firstGoods && firstGoods.product_skc;
item.href = helpers.url(`/product/pro_${it.product_id}_${productSkc}/${cnAlphaBet}.html`, null, 'item');*/
if (item.price !== Number(it.price.market_price)) {
it.marketPrice = Number(it.price.market_price);
}
... ... @@ -962,15 +982,71 @@ const getTogetherProduct = (page) => {
})();
};
const modifyProduct = (param) => {
/**
* 修改购物车商品
* @param param
* @param uid
* @param shoppingKey
* @param cartDelList
*/
const modifyProduct = (param, uid, shoppingKey, cartDelList) => {
return co(function * () {
let result = {
code: 400,
message: ERROR_400_MESSAGE
};
let ret = yield cartApi.modifyProduct(param);
if (ret && ret.code) {
result = {
code: ret.code,
data: yield getCartData(uid, shoppingKey, cartDelList)
};
}
return cartApi.modifyProduct(param);
return result;
})();
};
const swapGift = (uid, shoppingKey, promotionId, newSkn, newSku) => {
return cartApi.swapGift(uid, shoppingKey, promotionId, newSkn, newSku);
/**
* 重选赠品或加价购商品
* @param uid
* @param shoppingKey
* @param promotionId
* @param newSkn
* @param newSku
* @param cartDelList
*/
const swapGift = (uid, shoppingKey, promotionId, newSkn, newSku, cartDelList) => {
return co(function * () {
let result = {
code: 400,
message: ERROR_400_MESSAGE
};
let ret = yield cartApi.swapGift(uid, shoppingKey, promotionId, newSkn, newSku);
if (ret && ret.code) {
result = {
code: ret.code,
data: yield getCartData(uid, shoppingKey, cartDelList)
};
}
return result;
})();
};
/**
* 查询指定优惠下的可选赠品或加价购
* @param promotionId 优惠ID
* @param uid
* @param shoppingKey
*/
const queryUserPromotionGift = (promotionId, uid, shoppingKey) => {
return co(function * () {
... ... @@ -1020,6 +1096,11 @@ const queryUserPromotionGift = (promotionId, uid, shoppingKey) => {
};
/**
* 首页mini购物车数据
* @param uid
* @param shoppingKey
*/
const getMiniCartData = (uid, shoppingKey) => {
return co(function * () {
... ... @@ -1056,16 +1137,14 @@ const getMiniCartData = (uid, shoppingKey) => {
product_name: g.product_name,
factory_goods_name: g.factory_goods_name,
size_name: g.size_name,
show_price: g.real_price,
show_price: transPrice(g.real_price),
buy_number: g.buy_number,
goods_incart_id: g.shopping_cart_id,
product_sku: g.product_sku,
promotion_id: g.promotion_id
};
let cnAlphaBet = g.cn_alphabet ? g.cn_alphabet : md5(g.product_name);
let uri = `/product/pro_${g.product_id}_${g.goods_id}/${cnAlphaBet}.html`;
goods.product_url = helpers.urlFormat(uri, null, 'item');
goods.product_url = helpers.getUrlBySkc(g.product_id, g.goods_id, g.cn_alphabet);
return goods;
});
... ... @@ -1080,20 +1159,20 @@ const getMiniCartData = (uid, shoppingKey) => {
};
module.exports = {
getProductInfoAsync, // 获取某一个商品详情主页面
getCartData,
getCartCount,
addToCart,
selectGoods,
modifyProductNum,
removeFromCart,
addToFav,
checkUserIsFav,
getRecommendProduct,
getTogetherProduct,
modifyProduct,
swapGift,
queryUserPromotionGift,
getCoupons, // 获取优惠券列表
getMiniCartData
getProductInfoAsync, /** 获取商品信息 **/
getCartData, /** 购物车数据 **/
getCartCount, /** 得到购物车数量 **/
addToCart, /** 加入到购物车 **/
selectGoods, /** 选中/取消选中商品 **/
modifyProductNum, /** 修改商品数量 **/
removeFromCart, /** 从购物车中删除 **/
addToFav, /** 移入收藏 **/
checkUserIsFav, /** 判断商品是否已收藏 **/
getRecommendProduct, /** 为您优选商品 **/
getTogetherProduct, /** 凑单商品 **/
modifyProduct, /** 修改购物车商品 **/
swapGift, /** 重选赠品或加价购商品 **/
queryUserPromotionGift, /** 查询指定优惠下的可选赠品或加价购 **/
getCoupons, /** 获取优惠券列表 **/
getMiniCartData /** 首页mini购物车数据 **/
};
... ...
... ... @@ -8,6 +8,15 @@
const api = global.yoho.API;
/**
* 获取用户信息API
* @param uid [number] uid
*/
const getUserProfileAsync = (uid) => api.get('', {
method: 'app.passport.profile',
uid: uid
});
/**
* 购物车结算API
* @param uid [number] uid
* @param cartType [string] 购物车类型,ordinary表示普通, advance表示预售
... ... @@ -57,9 +66,9 @@ const getOrderComputeAsync = (uid, cartType, paymentType, deliveryWay, other) =>
});
}
if (other.useRedEnvelops) {
if (other.redEnvelopes) {
Object.assign(param, {
use_red_envelopes: other.useRedEnvelops
use_red_envelopes: other.redEnvelopes
});
}
... ... @@ -154,13 +163,20 @@ const orderSubmitAsync = (uid, cartType, addressId, deliveryTime, deliveryWay, p
Object.assign(param, {
is_continue_buy: 'Y'
});
}
// 友盟有关信息的传递
if (other.qhyUnion) {
Object.assign(param, {
qhy_union: other.qhyUnion
});
}
return api.get('', param);
};
module.exports = {
getUserProfileAsync,
getOrderPaymentAsync,
getUesrCouponAsync,
getOrderComputeAsync,
... ...
... ... @@ -91,7 +91,10 @@ const handlePaymentInfo = (d, address) => {
paymentWay: d.payment_way,
deliveryTime: d.delivery_time,
deliveryWay: d.delivery_way,
shoppingCartData: Object.assign(d.shopping_cart_data, handleUseYohoCoin(d)),
shoppingCartData: Object.assign(d.shopping_cart_data, handleUseYohoCoin(d), {
redEnvelopes: d.red_envelopes,
useRedEnvelopes: d.use_red_envelopes
}),
invoices: d.invoices
});
... ...
... ... @@ -24,13 +24,18 @@ const index = (uid, cartType) => {
return Promise.all([
ensureApi.getOrderPaymentAsync(uid, cartType, 0),
addressApi.getAddressListAsync(uid)
addressApi.getAddressListAsync(uid),
ensureApi.getUserProfileAsync(uid)
]).then(result => {
let data = _.get(result, '[0].data', false);
let address = _.get(result, '[1].data', []);
let receiver = _.get(result, '[2].data.mobile', '');
if (data) {
Object.assign(resData, ensureHandle.handlePaymentInfo(data, address));
Object.assign(resData, ensureHandle.handlePaymentInfo(data, address), {
receiverMobile: receiver,
hideReceiverMobile: _.replace(receiver, /(\d{3})\d{4}(\d{4,9})/, '$1****$2')
});
}
return resData;
... ... @@ -74,6 +79,7 @@ const submit = (uid, cartType, p) => {
ordercode: d.order_code
});
}
return result;
}
);
... ...
... ... @@ -5,6 +5,12 @@
'use strict';
/**
* and 逻辑运算
* {{and arg1 arg2 ...}}
* {{#and arg1 arg2 ...}}{{/and}}
* @returns {*}
*/
exports.and = function() {
let options = arguments[arguments.length - 1];
... ... @@ -31,6 +37,10 @@ exports.and = function() {
}
};
/**
* or 逻辑运算 {{or arg1 arg2 ... }}
* @returns {*}
*/
exports.or = function() {
let options = arguments[arguments.length - 1];
let ret = false;
... ... @@ -56,6 +66,13 @@ exports.or = function() {
}
};
/**
* 大于逻辑 v1 > v2
* @param v1
* @param v2
* @param options
* @returns {*}
*/
exports.gt = function(v1, v2, options) {
var ret = v1 > v2;
... ... @@ -71,6 +88,13 @@ exports.gt = function(v1, v2, options) {
}
};
/**
* 大于等于逻辑 v1 >= v2
* @param v1
* @param v2
* @param options
* @returns {*}
*/
exports.ge = function(v1, v2, options) {
var ret = v1 >= v2;
... ... @@ -86,6 +110,13 @@ exports.ge = function(v1, v2, options) {
}
};
/**
* 小于逻辑 v1 < v2
* @param v1
* @param v2
* @param options
* @returns {*}
*/
exports.lt = function(v1, v2, options) {
var ret = v1 < v2;
... ... @@ -101,6 +132,13 @@ exports.lt = function(v1, v2, options) {
}
};
/**
* 小于等于逻辑 v1 <= v2
* @param v1
* @param v2
* @param options
* @returns {*}
*/
exports.le = function(v1, v2, options) {
var ret = v1 <= v2;
... ... @@ -116,6 +154,13 @@ exports.le = function(v1, v2, options) {
}
};
/**
* 相等逻辑 v1 === v2
* @param v1
* @param v2
* @param options
* @returns {*}
*/
exports.eq = function(v1, v2, options) {
var ret = v1 === v2;
... ...
... ... @@ -19,333 +19,10 @@
</div>
</div>
{{/unless}}
<div class="order-pay">
{{#if cart.isEmpty}}
<div class="pay-wapper">
<div class="shop-cart-empty">
<i class="iconfont"></i>
<p>购物车空空的哦,去看看心仪的商品吧~</p>
<a href="{{cart.listUrl}}">去购物</a>
</div>
</div>
<div class="dev-revocation {{#unless cart.deleteShop}}none{{/unless}}">
<table>
{{# cart.deleteShop}}
<tr data-productnum="{{productNum}}" data-productsku="{{productSku}}">
<td style="width:35%; text-align: left;">成功删除<a class="title" href="{{link}}"
target="_blank">{{productTitle}}</a>
</td>
<td style="width:14%;"><span class="productPrice">{{productPrice}}</span></td>
<td style="width:15%;">{{productNum}}</td>
<td style="width:16%;"></td>
<td style="width:11.8%; border-right: none; text-align: right;">
<a href="javascript:void(0);"><span class="goBack">撤销本次删除</span></a>
</td>
</tr>
{{/ cart.deleteShop}}
</table>
</div>
{{^}}
<!-- 购物车商品列表 -->
{{#cart}}
<div class="pay-wapper">
<div class="cart-title">
<p class="left" style="width:6%;">
<i class="cart-item-check iconfont"></i>&nbsp;&nbsp;全选
</p>
<p style="width:35%">商品信息</p>
<p style="width:14%">单价</p>
<p style="width:15%;">数量</p>
<p style="width:16%;">小计</p>
<p class="right" style="width:11.8%;">操作</p>
</div>
{{#advanceCart}}
<div class="mb40">
<!-- 预售商品 -->
<div class="pre-sell">
<code>预售商品</code>预售商品不参加活动,不可使用优惠券,不同上市期的商品我们将为您先到先发。
</div>
{{#pools}}
{{#if goodsList}}
<div class="cart-table">
<ul class="table">
{{#goodsList}}
{{> cart-item}}
{{/goodsList}}
</ul>
</div>
{{/if}}
{{/pools}}
{{#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}}
{{#if promotionInfos}}
<div class="gift-sell">
{{#promotionInfos}}
<p class="gift-sell-info"><code class="order-pay-mark">{{tag}}</code>{{promotionTitle}}
<!--<a class="btn-clear blue" data-together-id="6">去凑单&nbsp;&gt;</a>-->
</p>
{{/promotionInfos}}
</div>
{{/if}}
</div>
{{/advanceCart}}
{{#ordinaryCart}}
{{#pools}}
<div class="promotion-pool" data-role="promotion-pool">
{{#if promotionInfos}}
<div class="gift-sell mt20">
{{#promotionInfos}}
<div class="gift-sell-info"
data-role="promotion-wrap"
data-promotionid="{{promotionId}}">
<code class="order-pay-mark
{{#unless isReach}}order-pay-mark-white{{/unless}}">
{{tag}}
</code>{{promotionTitle}}
{{>cart-promotion-btn}}
{{!--{{#if isPriceGift}}
{{#if isNotReach}}
<a class="btn-clear blue order-pay-link" target="_blank" href="{{promotionPageUrl}}">去凑单&nbsp;></a>
{{/if}}
{{/if}}--}}
{{#if isNotReach}}
<a class="btn-clear blue order-pay-link" target="_blank" href="{{promotionPageUrl}}">去凑单&nbsp;></a>
{{/if}}
{{!--{{> cart-sel-gift-tpl }}--}}
{{!--<textarea data-role="gifts-cansel" class="hide" data-promotionid="{{promotionId}}">{{{giftGoodsListStr}}}</textarea>--}}
</div>
{{/promotionInfos}}
</div>
{{/if}}
{{#if subs}}
<div class="cart-table">
{{#each subs}}
<ul class="table {{#isBrandGroup}}table-group{{/isBrandGroup}}">
{{#each goodsList}}
{{> cart-item}}
{{/each}}
</ul>
{{/each}}
</div>
{{/if}}
{{#if goodsList}}
<div class="cart-table">
<ul class="table {{#isBrandGroup}}table-group{{/isBrandGroup}}">
{{#goodsList}}
{{> cart-item}}
{{/goodsList}}
</ul>
</div>
{{/if}}
</div>
{{/pools}}
{{#if offShelves}}
<div class="mt20">
<div class="cart-table">
<ul class="table">
{{#offShelves}}
{{> cart-item}}
{{/offShelves}}
</ul>
</div>
</div>
{{/if}}
<!-- -->
{{#if soldOuts}}
<div class="mt20">
<div class="cart-table">
<ul class="table">
{{#soldOuts}}
{{> cart-item}}
{{/soldOuts}}
</ul>
</div>
</div>
{{/if}}
<!--可选的加价购商品 -->
<!--priceGifts-->
<!--可选择的赠品-->
<!--gifts-->
{{#if hasGlobalBlock}}
<div class="gift-sell mt20">
{{#gifts}}
<div class="gift-sell-info"
data-role="promotion-wrap"
data-promotionid="{{promotionId}}">
<code class="order-pay-mark order-pay-mark-white">
{{tag}}
</code>{{promotionTitle}}
{{#if isGift}}
<a class="order-pay-link" href="javascript:void(0);"
data-role="gift-sel-btn">领赠品</a>
{{/if}}
{{#if isPriceGift}}
<a href="javascript:void(0);"
class="order-pay-link"
data-role="pg-sel-btn">去换购</a>
<a class="btn-clear blue order-pay-link" target="_blank" href="{{promotionPageUrl}}">去凑单&nbsp;></a>
{{/if}}
{{!--{{> cart-sel-gift-tpl }}--}}
{{!--<textarea data-role="gifts-cansel" class="hide" data-promotionid="{{promotionId}}">{{{giftGoodsListStr}}}</textarea>--}}
</div>
{{/gifts}}
{{#priceGifts}}
<div class="gift-sell-info"
data-role="promotion-wrap"
data-promotionid="{{promotionId}}">
<code class="order-pay-mark">
{{tag}}
</code>{{promotionTitle}}
{{#if isGift}}
<a class="order-pay-link" href="javascript:void(0);"
data-role="gift-sel-btn">领赠品</a>
{{/if}}
{{#if isPriceGift}}
<a href="javascript:void(0);"
class="order-pay-link"
data-role="pg-sel-btn">去换购</a>
<a class="btn-clear blue order-pay-link" target="_blank" href="{{promotionPageUrl}}">去凑单&nbsp;></a>
{{/if}}
{{!--{{> cart-sel-gift-tpl }}--}}
{{!--<textarea data-role="gifts-cansel" class="hide" data-promotionid="{{promotionId}}">{{{giftGoodsListStr}}}</textarea>--}}
</div>
{{/priceGifts}}
{{#promotionInfos}}
<p class="gift-sell-info"><code class="order-pay-mark">{{tag}}</code>{{promotionTitle}}
<!--<a class="btn-clear blue" data-together-id="6">去凑单&nbsp;&gt;</a>-->
</p>
{{/promotionInfos}}
</div>
{{/if}}
<!-- 全场已选择的 加价购+赠品 -->
{{#if goodsList}}
<div class="cart-table">
<ul class="table">
{{#each goodsList}}
{{> cart-item}}
{{/each}}
</ul>
</div>
{{/if}}
{{/ordinaryCart}}
{{#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>
<i class="cart-item-check iconfont" id="cbSelAllGoods"></i>
<span>全选</span>
<a class="delAll delete-all-sel" href="javascript:void(0);">删除选中商品</a>
<a class="removeAll remove-all-2fav" href="javascript:void(0);">移入收藏夹</a>
<a class="emptyDisabled clean-all-disable"
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>
</div>
</div>
<div class="cartnew-submit" id="pay-sum">
<span>添加礼品袋</span>
<a href="javascript:void(0);"
id="Y_SubmitBtn"
class="btn-account"
{{#if mix}}data-mix="true"{{/if}}
{{#if ensureUrl}}data-ensureurl="{{ensureUrl}}"{{/if}}
{{#if noSelectGiftTip}}data-noSelectGiftTip="true"{{/if}}>去结算</a>
</div>
{{/stat}}
{{#if deleteShop}}
<div class="cart-del-goods">
<div class="cart-del-goods-title">已删除商品,您可以重新购买或移入收藏:</div>
<ul id="Y_delReselWrap">
{{#each deleteShop}}
<li data-sku="{{productSku}}"
data-promotionid="{{promotionId}}"
data-num="{{productNum}}">
<span class="good-name" style="width: 392px;">
<a href="{{link}}" target="_blank">{{productTitle}}</a>
</span>
<span class="good-price" style="width: 148px;">{{productPrice}}</span>
<span class="good-num" style="width: 128px;">{{productNum}}</span>
<span class="good-operate" style="width: 260px;">
<a href="javascript:void(0);" data-role="readd2cart">重新购买</a>
<a href="javascript:void(0);" data-role="reFav">移入收藏</a>
</span>
</li>
{{/each}}
</ul>
</div>
{{/if}}
{{> cart-pre-sell-tpl }}
</div>
{{/cart}}
{{!--{{#cart.salesPromotion}}
<div class="salesPromotion">
<p>
{{#if salesTitle}}
<b>{{salesTitle}}</b>
{{/if}}
{{salesMessage}}</p>
<span><i></i>已参与</span>
</div>
{{/cart.salesPromotion}} --}}
{{/if}}
<div class="order-pay" id="Y_CartListWrap">
{{#cart}}
{{> mix/cart/cart-list}}
{{/cart}}
</div>
</div>
... ... @@ -359,17 +36,17 @@
</textarea>
</div>
<div class="bottom-tab bottom-tab-slide {{#unless cart.isEmpty}}mt30{{/unless}}">
<div class="bottom-tab bottom-tab-slide none {{#unless cart.isEmpty}}mt30{{/unless}}">
{{!--<span class="bottom-title {{#if cart.deleteShop}}cur{{/if}}
{{#unless cart.deleteShop}}none{{/unless}}">凑单商品</span>--}}
<span class="bottom-title cur" data-type="fine">为您优选</span>
<span class="bottom-title cur" data-type="fine" data-role="fine-tab">为您优选</span>
<span class="bottom-title" data-role="latestWalk-tab">最近浏览</span>
<span class="change">换一批
<span class="iconfont change-icon">&#xe639;</span>
</span>
</div>
<div class="individual-slide bottom-slide-content">
<div class="individual-slide bottom-slide-content none">
<!--<div data-role="together-slide" class="slide-panel"></div>-->
<div data-role="fine-slide" class="slide-panel"></div>
<div data-role="latestWalk-slide" class="slide-panel" style="display:none;"></div>
... ... @@ -377,12 +54,12 @@
{{> cart-together-tpl }}
{{/unless}}
<div class="loading"><span></span>请稍后...</div>
<div class="loading loading-single"><span></span>请稍后...</div>
<div class="modal-overflow" style="display: none;" data-role="mdialog" id="Y_goodsSelectWinDialog">
<div class="body-modal-black"></div>
<div id="Y_goodsSelectWin" class="goods-select-win mmodal-dialog cart-togetherGoods" style="top:50px;">
<div class="close" data-role="mdialog-close">
<i class="iconfont">&#xe60d;</i>
<i class="iconfont">&#xe6ee;</i>
</div>
<div class="content goods-select-content">
<div class="detail-body"></div>
... ... @@ -391,11 +68,6 @@
</div>
</div>
<script type="text/javascript">
/*<textarea data-role="gifts-cansel" class="hide" data-promotionid="{{promotionId}}">{{{giftGoodsListStr}}}</textarea>*/
</script>
<!-- 商品详细信息窗口 -->
<!--
<script type="text/javascript">
... ...
<div class="order-ensure-page shop-cart yoho-page clearfix">
<div class="order-edit order-cart" id="cart-page">
<div class="order-title cart-page-title order-ensure-title">
<ul>
<li class="first active">查看购物车</li>
<li>填写订单</li>
<li class="end">付款,完成购买</li>
</ul>
</div>
{{#if cart.loginUrl}}
<div class="cartnew-tips">
<div class="tipsbox" id="tipsbox">
<a href="javascript:void(0);" class="btn_close" title="关闭"></a>
<strong>温馨提示:</strong>亲爱的顾客,您还没有 <a href="{{cart.loginUrl}}" class="a_eu">登录</a> 哦,所有商品价格、活动信息以登录后显示为准.
</div>
</div>
{{^}}
<div class="cartnew-tips">
<div class="tipsbox" id="tipsbox">
<a href="javascript:void(0);" class="btn_close" title="关闭"></a>
<strong>温馨提示:</strong>1. 选购单中的商品不保留库存,请及时结算。 2. 商品的价格、相关活动信息及库存以订单提交时为准。
</div>
</div>
{{/if}}
<div class="order-pay">
{{#if cart.isEmpty}}
<div class="pay-wapper">
<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>
<div class="dev-revocation {{#unless cart.deleteShop}}none{{/unless}}">
<table>
{{# cart.deleteShop}}
<tr data-productnum="{{productNum}}" data-productsku="{{productSku}}">
<td style="width:40%; text-align: left;">成功删除<a class="title" href="{{link}}" target="_blank">{{productTitle}}</a></td>
<td style="width:10%;"><span class="productPrice">{{productPrice}}</span></td>
<td style="width:10%;"></td>
<td style="width:10%;">{{productNum}}</td>
<td style="width:10%;"></td>
<td style="width:20%; border-right: none; text-align: right;">
<a href="javascript:void(0);"><span class="goBack">撤销本次删除</span></a>
</td>
</tr>
{{/ cart.deleteShop}}
</table>
</div>
{{^}}
<!-- 购物车商品列表 -->
{{#cart}}
<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>
<!-- 预售商品 -->
<div class="pre-sell">
<code>预售商品</code>预售商品不参加活动,不可使用优惠券,不同上市期的商品我们将为您先到先发。
</div>
<div class="cart-table">
<ul class="table table-group">
<li class="pre-sell-box tr tr-group" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}} {{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<div class="td pay-pro" style="width: 45%;">
<sub class="out-of-stock">您勾选的商品库存不足</sub>
<input class="cart-item-check cart-item-checked" readonly="readonly" data-goodstype="{{goodsType}}" {{#if isChecked}}checked{{/if}}/>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
<span class="incentive">预售</span>
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}</span>
<span class="presell">上市期:2016-09-01{{preSellDate}}</span>
</p>
</div>
<div class="td productPrice" style="width:17%;">¥66666{{productPrice}}</div>
<div style="width:10%;" class="td adjust-cart-num">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="67{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">{{tipMessage}}</p>
{{/if}}
{{/if}}
</div>
<div style="width:17%;" class="td sub-total red">¥888{{productSubtotal}}</div>
<div style="width:11%;" class="td cart-operation">
<span class="cart-del-btn">删除</span>
<span class="cart-col-btn">移入收藏</span>
</div>
</li>
<li class="pre-sell-box tr" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}} {{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<div class="pay-pro td" style="width:45%;">
<input readonly="readonly" class="cart-item-check" name="" id="" data-goodstype="{{goodsType}}" {{#if isChecked}}checked{{/if}}/>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
<span class="incentive">预售</span>
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}</span>
<span class="presell">上市期:2016-09-01{{preSellDate}}</span>
</p>
</div>
<div class="productPrice td" style="width:17%;">¥{{productPrice}}</div>
<div style="width:10%;" class="adjust-cart-num td">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">{{tipMessage}}</p>
{{/if}}
{{/if}}
</div>
<div style="width:17%;" class="sub-total red td">¥{{productSubtotal}}</div>
<div style="width:11%;" class="cart-operation td">
<span class="cart-del-btn">删除</span>
<span class="cart-col-btn">移入收藏</span>
</div>
</li>
<li class="pre-sell-box tr" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}} {{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<div class="pay-pro td" style="width:45%;">
<input readonly="readonly" class="cart-item-check" name="" id="" data-goodstype="{{goodsType}}" {{#if isChecked}}checked{{/if}}/>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
<span class="incentive">预售</span>
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}</span>
<span class="presell">上市期:2016-09-01{{preSellDate}}</span>
</p>
</div>
<div class="productPrice td" style="width:17%;">¥{{productPrice}}</div>
<div style="width:10%;" class="adjust-cart-num td">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="1{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">库存不足{{tipMessage}}</p>
{{/if}}
{{/if}}
</div>
<div style="width:17%;" class="sub-total red td">¥{{productSubtotal}}</div>
<div style="width:11%;" class="cart-operation td">
<span class="cart-del-btn">删除</span>
<span class="cart-col-btn">移入收藏</span>
</div>
</li>
</ul>
</div>
<!-- 加价购 -->
<div class="gift-sell mt40">
<p><code class="order-pay-mark-white">加价购</code>【全场热销】活动商品已购满¥398.00,可加价换购商品<a>去换购</a><button class="btn-clear blue" data-together-id="1" >去凑单&nbsp;></button></p>
<p><code class="order-pay-mark-white">满减</code>【热销满减】活动商品已购满¥498.00,享优惠¥49<button class="btn-clear blue" data-together-id="2" >去凑单&nbsp;></button></p>
</div>
<div class="cart-table">
<ul class="table">
<li class="pre-sell-box tr" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}} {{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<div class="pay-pro td" style="width: 45%;">
<input class="cart-item-check cart-item-checked" readonly="readonly" data-goodstype="{{goodsType}}" {{#if isChecked}}checked{{/if}}/>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
<span class="incentive red">预售</span>
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}</span>
</p>
</div>
<div class="product-price td" style="width:17%;">¥66666{{productPrice}}
<div class="sale-info">
<span class="sale-info-title">促销信息<i></i></span>
<ul class="none">
<li>[Levi's]活动商品已满购¥398.00,可加价换购商品<a>去换购</a></li>
<li class="invalid">【Life·After Life】满¥300元享7折</li>
</ul>
</div>
</div>
<div style="width:10%;" class="adjust-cart-num td">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="67{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">{{tipMessage}}</p>
{{/if}}
{{/if}}
</div>
<div style="width:17%;" class="sub-total red td">¥888{{productSubtotal}}</div>
<div style="width:11%;" class="cart-operation td">
<span class="cart-del-btn">删除</span>
<span class="cart-col-btn">移入收藏</span>
</div>
</li>
<li class="pre-sell-box tr" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}} {{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<div class="pay-pro td" style="width: 45%;" >
<input class="cart-item-check cart-item-checked" readonly="readonly" data-goodstype="{{goodsType}}" {{#if isChecked}}checked{{/if}}/>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
<span class="incentive red">预售</span>
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}</span>
</p>
</div>
<div class="product-price td" style="width:17%;">¥66666{{productPrice}}
<div class="sale-info">
<span class="sale-info-title">促销信息<i></i></span>
<ul class="none">
<li>[Levi's]活动商品已满购¥398.00,可加价换购商品<a>去换购</a></li>
<li class="invalid">【Life·After Life】满¥300元享7折</li>
</ul>
</div>
</div>
<div style="width:10%;" class="adjust-cart-num td">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="67{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">{{tipMessage}}</p>
{{/if}}
{{/if}}
</div>
<div style="width:17%;" class="sub-total red td">¥888{{productSubtotal}}</div>
<div style="width:11%;" class="cart-operation td">
<span class="cart-del-btn">删除</span>
<span class="cart-col-btn">移入收藏</span>
</div>
</li>
</ul>
</div>
<!-- 折扣 -->
<div class="gift-sell mt20">
<p><code>折扣</code>【New Balance】活动商品已购满2件,享优惠¥261.00<button class="btn-clear" data-together-id="3" >去凑单&nbsp;></button></p>
</div>
<div class="cart-table">
<ul class="table">
<li class="pre-sell-box tr active" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}} {{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<div class="pay-pro td" style="width: 45%;">
<input class="cart-item-check cart-item-checked" readonly="readonly" data-goodstype="{{goodsType}}" {{#if isChecked}}checked{{/if}}/>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
<span class="incentive">预售</span>
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}</span>
</p>
</div>
<div class="product-price td" style="width:17%;">¥66666{{productPrice}}</div>
<div style="width:10%;" class="adjust-cart-num td">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="67{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">{{tipMessage}}</p>
{{/if}}
{{/if}}
</div>
<div style="width:17%;" class="sub-total red td">¥888{{productSubtotal}}</div>
<div style="width:11%;" class="cart-operation td">
<span class="cart-del-btn">删除</span>
<span class="cart-col-btn">移入收藏</span>
</div>
</li>
<li class="pre-sell-box tr active" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}} {{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<div class="pay-pro td" style="width: 45%;">
<input class="cart-item-check cart-item-checked" readonly="readonly" data-goodstype="{{goodsType}}" {{#if isChecked}}checked{{/if}}/>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
<span class="incentive">预售</span>
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}</span>
</p>
</div>
<div class="product-price td" style="width:17%;">¥66666{{productPrice}}</div>
<div style="width:10%;" class="adjust-cart-num td">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="67{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">{{tipMessage}}</p>
{{/if}}
{{/if}}
</div>
<div style="width:17%;" class="sub-total red td">¥888{{productSubtotal}}</div>
<div style="width:11%;" class="cart-operation td">
<span class="cart-del-btn">删除</span>
<span class="cart-col-btn">移入收藏</span>
</div>
</li>
</ul>
</div>
<!-- 折扣 赠品 -->
<div class="gift-sell mt20">
<p><code class="order-pay-mark-white">折扣</code>【New Balance】活动商品已购满2件,享优惠¥261.00<button class="btn-clear" data-together-id="4" >去凑单&nbsp;></button></p>
<p><code>赠品</code>【Life·After Life】活动商品已购满1件,可领取赠品<a>领赠品</a><button class="btn-clear" data-together-id="5" >去凑单&nbsp;></button></p>
</div>
<div class="cart-table">
<ul class="table">
<li class="pre-sell-box tr" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}} {{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<div class="pay-pro td" style="width: 45%;">
<input class="cart-item-check cart-item-checked" readonly="readonly" data-goodstype="{{goodsType}}" {{#if isChecked}}checked{{/if}}/>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
<span class="incentive">预售</span>
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}</span>
</p>
</div>
<div class="product-price td" style="width:17%;">¥66666{{productPrice}}</div>
<div style="width:10%;" class="adjust-cart-num td">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="67{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">{{tipMessage}}</p>
{{/if}}
{{/if}}
</div>
<div style="width:17%;" class="sub-total red td">¥888{{productSubtotal}}</div>
<div style="width:11%;" class="cart-operation td">
<span class="cart-del-btn">删除</span>
<span class="cart-col-btn">移入收藏</span>
</div>
</li>
</ul>
</div>
<!-- 其他 -->
<div class="cart-table mb20">
<ul class="table table-group">
<li class="pre-sell-box tr" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}} {{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<div class="pay-pro td" style="width: 45%;">
<input class="cart-item-check cart-item-checked" readonly="readonly" data-goodstype="{{goodsType}}" {{#if isChecked}}checked{{/if}}/>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
<span class="incentive">预售</span>
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}</span>
</p>
</div>
<div class="product-price td" style="width:17%;">
¥66666{{productPrice}}
<p class="tip-message">(VIP)</p>
</div>
<div style="width:10%;" class="adjust-cart-num td">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="67{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message">仅剩2件</p>
{{/if}}
{{/if}}
</div>
<div style="width:17%;" class="sub-total red td">¥888{{productSubtotal}}</div>
<div style="width:11%;" class="cart-operation td">
<span class="cart-del-btn">删除</span>
<span class="cart-col-btn">移入收藏</span>
</div>
</li>
<li class="pre-sell-box tr" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}} {{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<div class="pay-pro td" style="width: 45%;">
<input class="cart-item-check cart-item-checked" readonly="readonly" data-goodstype="{{goodsType}}" {{#if isChecked}}checked{{/if}}/>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
<span class="incentive">预售</span>
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}</span>
</p>
</div>
<div class="product-price td" style="width:17%;">¥66666{{productPrice}}</div>
<div style="width:10%;" class="adjust-cart-num td">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="67{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">{{tipMessage}}</p>
{{/if}}
{{/if}}
</div>
<div style="width:17%;" class="sub-total red td">
¥888{{productSubtotal}}
<p class="tip-message tip-message-coin"><i class="yoho-coin"></i>返100YOHO币</p>
</div>
<div style="width:11%;" class="cart-operation td">
<span class="cart-del-btn">删除</span>
<span class="cart-col-btn">移入收藏</span>
</div>
</li>
<li class="pre-sell-box tr" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}} {{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<div class="pay-pro td" style="width: 45%;">
<input class="cart-item-check cart-item-checked" readonly="readonly" data-goodstype="{{goodsType}}" {{#if isChecked}}checked{{/if}}/>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
<span class="incentive">预售</span>
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}</span>
</p>
</div>
<div class="product-price td" style="width:17%;">¥66666{{productPrice}}</div>
<div style="width:10%;" class="adjust-cart-num td">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="67{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">{{tipMessage}}</p>
{{/if}}
{{/if}}
</div>
<div style="width:17%;" class="sub-total red td">¥888{{productSubtotal}}</div>
<div style="width:11%;" class="cart-operation td">
<span class="cart-del-btn">删除</span>
<span class="cart-col-btn">移入收藏</span>
</div>
</li>
</ul>
</div>
<!-- 失效 -->
<div class="cart-table">
<ul class="table">
<li class="pre-sell-box tr tr-disabled" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}} {{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<div class="pay-pro td" style="width: 45%;">
<i class="cart-item-disabled iconfont"></i>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
<span class="incentive">预售</span>
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}</span>
</p>
</div>
<div class="product-price td" style="width:17%;">
¥66666{{productPrice}}
<p class="tip-message">(VIP)</p>
</div>
<div style="width:10%;" class="adjust-cart-num td">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="67{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message">仅剩2件</p>
{{/if}}
{{/if}}
</div>
<div style="width:17%;" class="sub-total red td">¥888{{productSubtotal}}</div>
<div style="width:11%;" class="cart-operation td">
<span class="cart-del-btn">删除</span>
<span class="cart-col-btn">移入收藏</span>
</div>
</li>
<li class="pre-sell-box tr" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}} {{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<div class="pay-pro td" style="width: 45%;">
<input class="cart-item-disabled" readonly="readonly"/>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
<span class="incentive">预售</span>
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}</span>
</p>
</div>
<div class="product-price td" style="width:17%;">¥66666{{productPrice}}</div>
<div style="width:10%;" class="adjust-cart-num td">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="67{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">{{tipMessage}}</p>
{{/if}}
{{/if}}
</div>
<div style="width:17%;" class="sub-total red td">
¥888{{productSubtotal}}
<p class="tip-message tip-message-coin"><i class="yoho-coin"></i>返100YOHO币</p>
</div>
<div style="width:11%;" class="cart-operation td">
<span class="cart-del-btn">删除</span>
<span class="cart-col-btn">移入收藏</span>
</div>
</li>
</ul>
</div>
<!-- 失效 -->
<div class="gift-sell mt20">
<p><code>加价购</code>【全场热销】活动商品已购满¥398.00,可加价换购商品<a>去换购</a><button class="btn-clear blue" data-together-id="6">去凑单&nbsp;&gt;</button></p>
<p><code>赠品</code>【热销满减】活动商品已购满¥498.00,享优惠¥49<a>领赠品</a><button class="btn-clear blue" data-together-id="7" >去凑单&nbsp;&gt;</button></p>
<p><code>免运费</code>【热销满减】活动商品已购满¥498.00,享优惠¥49</p>
</div>
{{/cart}}
{{#cart.salesPromotion}}
<div class="salesPromotion">
<p>
{{#if salesTitle}}
<b>{{salesTitle}}</b>
{{/if}}
{{salesMessage}}</p>
<span><i></i>已参与</span>
</div>
{{/cart.salesPromotion}}
<!-- 总价计算 -->
<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 class="cartsnew-sale-info">-->
<!--<div class="sale-info">-->
<!--<span class="sale-info-title">使用优惠券<i></i></span>-->
<!--<ul class="none">-->
<!--<li>[Levi's]活动商品已满购¥398.00,可加价换购商品<a>去换购</a></li>-->
<!--<li class="invalid">【Life·After Life】满¥300元享7折</li>-->
<!--</ul>-->
<!--</div>-->
<!--<div class="sale-info">-->
<!--<span class="sale-info-title">使用优惠码<i></i></span>-->
<!--<ul class="none">-->
<!--<li>[Levi's]活动商品已满购¥398.00,可加价换购商品<a>去换购</a></li>-->
<!--<li class="invalid">【Life·After Life】满¥300元享7折</li>-->
<!--</ul>-->
<!--</div>-->
<!--</div>-->
</div>
{{/unless}}
<div class="right">
<p>
<a href="/help/?category_id=87" class="yoho-coin" target="_blank"></a>
共返有货币:666{{cart.getYoho}}&#12288;&#12288;
已选商品<strong class="ins">24件</strong>&#12288;&#12288;
商品金额:<b>¥&nbsp;8888.00</b>
</p>
<p>活动优惠:<b>&nbsp;100.00</b></p>
<p>优惠码/优惠券:<b>¥&nbsp;8888.00</b></p>
<p class="sum">
应付金额(不含邮费):<strong><kbd>¥&nbsp;</kbd>8888.00{{cart.productAllA}}</strong></p>
</div>
</div>
<div class="cartnew-submit" id="payDiv">
<span>添加礼品袋</span>
<a href="javascript:void(0);" class="btn-account">去结算</a>
</div>
{{/if}}
</div>
</div>
{{#unless @root.pc.product.removeRecentView}}
<div class="lazy-load-object">
<textarea class="datalazyload" style="visibility: hidden;">
<script>
fetchRecommend();
</script>
</textarea>
</div>
<div class="bottom-tab bottom-tab-slide">
<span class="bottom-title cur">凑单商品</span>
<span class="bottom-title">为您优选</span>
<span class="bottom-title">最近浏览</span>
<span class="change">换一批
<span class="iconfont change-icon">&#xe639;</span>
</span>
</div>
<div class="individual-slide">
<div class="individual-item individual-item-togetherGoods">
<input id="" type="hidden" value="">
<div id="" class="goods clearfix">
{{>individual-slide}}
</div>
</div>
<div class="individual-item individual-item-recommendGoods none">
<input id="" type="hidden" value="{{latestWalk}}">
<div id="" class="goods clearfix">
{{>individual-slide}}
</div>
</div>
<div class="individual-item individual-item-latestWalk none">
<input id="latest-walk-count" type="hidden" value="">
<div id="latest-walk-goods" class="goods clearfix">
{{>individual-slide}}
</div>
</div>
</div>
{{/unless}}
<div class="loading"><span></span>请稍后...</div>
</div>
</div>
<!-- 商品详细信息窗口 -->
<script type="text/javascript">
(function (d) {
window.bd_cpro_rtid="P1fsPWc";
var s = d.createElement("script");s.type = "text/javascript";s.async = true;s.src = location.protocol + "//cpro.baidu.com/cpro/ui/rt.js";
var s0 = d.getElementsByTagName("script")[0];s0.parentNode.insertBefore(s, s0);
})(document);
</script>
<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript">
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
{event:"setAccount", account: 16184},
{event:"setCustomerId", id: "{{uid}}"},
{event:"setSiteType", type: "d"},
{event:"viewBasket", item: {{{cart.criteo}}} }
);
</script>
<!-- 聚效 -->
<script type="text/javascript">
var _mvq = window._mvq || [];
window._mvq = _mvq;
_mvq.push(['$setAccount', 'm-23428-1']);
_mvq.push(['$setGeneral', 'cartview', '', /*用户名*/ '', '{{uid}}']);
_mvq.push(['$logConversion']);
_mvq.push(['$addItem', '', /*商品id*/ '{{cart.ids}}', '', '']);
_mvq.push(['$logData']);
</script>
<div class="order-ensure-page shop-cart yoho-page clearfix">
<div class="order-edit order-cart" id="cart-page">
<div class="order-title cart-page-title order-ensure-title">
<ul>
<li class="first active">查看购物车</li>
<li>填写订单</li>
<li class="end">付款,完成购买</li>
</ul>
</div>
{{#unless cart.isLogin}}
<div class="cartnew-tips">
<div class="tipsbox" id="tipsbox">
<a href="javascript:void(0);" class="btn_close" title="关闭"></a>
<strong>温馨提示:</strong>亲爱的顾客,您还没有 <a href="{{cart.loginUrl}}" class="a_eu">登录</a> 哦,所有商品价格、活动信息以登录后显示为准.
</div>
</div>
{{^}}
<div class="cartnew-tips">
<div class="tipsbox" id="tipsbox">
<a href="javascript:void(0);" class="btn_close" title="关闭"></a>
<strong>温馨提示:</strong>1. 选购单中的商品不保留库存,请及时结算。 2. 商品的价格、相关活动信息及库存以订单提交时为准。
</div>
</div>
{{/unless}}
<div class="order-pay">
{{#if cart.isEmpty}}
<div class="pay-wapper">
<div class="shop-cart-empty">
<p>购物车空空的哦,去看看心仪的商品吧~</p>
</div>
</div>
<div class="dev-revocation {{#unless cart.deleteShop}}none{{/unless}}">
<table>
{{# cart.deleteShop}}
<tr data-productnum="{{productNum}}" data-productsku="{{productSku}}">
<td style="width:40%; text-align: left;">成功删除<a class="title" href="{{link}}" target="_blank">{{productTitle}}</a></td>
<td style="width:10%;"><span class="productPrice">{{productPrice}}</span></td>
<td style="width:10%;"></td>
<td style="width:10%;">{{productNum}}</td>
<td style="width:10%;"></td>
<td style="width:20%; border-right: none; text-align: right;">
<a href="javascript:void(0);"><span class="goBack">撤销本次删除</span></a>
</td>
</tr>
{{/ cart.deleteShop}}
</table>
</div>
{{^}}
<!-- 购物车商品列表 -->
{{#cart}}
<div class="pay-wapper">
<div class="cart-title">
<p class="left" style="width:6%;">
<i class="cart-item-check iconfont cart-item-checked"></i> 全选
</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>
{{#advanceCart}}
<!-- 预售商品 -->
<div class="pre-sell">
<code>预售商品</code>预售商品不参加活动,不可使用优惠券,不同上市期的商品我们将为您先到先发。
</div>
{{#advanceCart}}
<!-- 预售商品 -->
<div class="pre-sell">
<code>预售商品</code>预售商品不参加活动,不可使用优惠券,不同上市期的商品我们将为您先到先发。
</div>
<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">
<img src="{{imgCover}}">
<span class="incentive">预售</span>
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}</span>
<span class="presell">上市期:2016-09-01{{preSellDate}}</span>
</p>
</div>
<div class="td productPrice" style="width:17%;">¥66666{{productPrice}}</div>
<div style="width:10%;" class="td adjust-cart-num">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="67{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">{{tipMessage}}</p>
{{/if}}
{{/if}}
</div>
<div style="width:17%;" class="td sub-total red">¥888{{productSubtotal}}</div>
<div style="width:11%;" class="td cart-operation">
<span class="cart-del-btn">删除</span>
<span class="cart-col-btn">移入收藏</span>
</div>
</li>
<li class="pre-sell-box tr" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}} {{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<div class="pay-pro td" 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">
<img src="{{imgCover}}">
<span class="incentive">预售</span>
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}</span>
<span class="presell">上市期:2016-09-01{{preSellDate}}</span>
</p>
</div>
<div class="productPrice td" style="width:17%;">¥{{productPrice}}</div>
<div style="width:10%;" class="adjust-cart-num td">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">{{tipMessage}}</p>
{{/if}}
{{/if}}
</div>
<div style="width:17%;" class="sub-total red td">¥{{productSubtotal}}</div>
<div style="width:11%;" class="cart-operation td">
<span class="cart-del-btn">删除</span>
<span class="cart-col-btn">移入收藏</span>
</div>
</li>
<li class="pre-sell-box tr" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}} {{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<div class="pay-pro td" style="width:45%;">
<i class="cart-item-check iconfont cart-item-checked" id="" data-goodstype="{{goodsType}}" {{#if isChecked}}checked{{/if}}></i>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
<span class="incentive">预售</span>
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}</span>
<span class="presell">上市期:2016-09-01{{preSellDate}}</span>
</p>
</div>
<div class="productPrice td" style="width:17%;">¥{{productPrice}}</div>
<div style="width:10%;" class="adjust-cart-num td">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="1{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">库存不足{{tipMessage}}</p>
{{/if}}
{{/if}}
</div>
{{/if}}
{{#if goodsList}}
<div class="cart-table">
<ul class="table">
{{#goodsList}}
{{> cart-item}}
{{/goodsList}}
</ul>
</div>
{{/if}}
{{/pools}}
<!--可选的加价购商品 -->
<!--priceGifts-->
<!--可选择的赠品-->
<!--gifts-->
<!-- -->
{{#if offShelves}}
<div class="cart-table">
<ul class="table">
{{#offShelves}}
{{> cart-item}}
{{/offShelves}}
</ul>
</div>
{{/if}}
<!-- -->
{{#if soldOuts}}
<div class="cart-table">
<ul class="table">
{{#soldOuts}}
{{> cart-item}}
{{/soldOuts}}
</ul>
</div>
{{/if}}
<!-- 全场已选择的 加价购+赠品 -->
{{#if goodsList}}
<div class="cart-table">
<ul class="table">
{{#each goodsList}}
{{> cart-item}}
{{/each}}
</ul>
</div>
{{/if}}
{{#if promotionInfos}}
<div class="gift-sell mt20">
{{#promotionInfos}}
<p><code>{{tag}}</code>{{promotionTitle}}<a class="btn-clear blue" data-together-id="6">去凑单&nbsp;&gt;</a></p>
{{/promotionInfos}}
</div>
{{/if}}
{{/ordinaryCart}}
{{#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>
<i class="cart-item-check iconfont" id="cbSelAllGoods" {{#if cart.isCheckedAll}}checked="checked"{{/if}}></i>
<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>
</div>
</div>
<div class="cartnew-submit" id="payDiv">
<span>添加礼品袋</span>
<a href="javascript:void(0);" class="btn-account">去结算</a>
</div>
{{/stat}}
<!-- 普通商品 -->
<div class="pre-sell">
普通商品
</div>
<div class="cart-table">
<ul class="table table-group">
<li class="pre-sell-box tr"
{{#if pid}}data-pid="{{pid}}"{{/if}}
{{#if id}}data-id="{{id}}"{{/if}}
{{#if skn}}data-skn="{{skn}}"{{/if}}
{{#if sku}}data-sku="{{sku}}"{{/if}}
{{#if productNum}}data-productnum="{{productNum}}"{{/if}}
{{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<div class="td pay-pro" style="width: 45%;">
<i class="cart-item-check iconfont" data-goodstype="{{goodsType}}" {{#if isChecked}}checked{{/if}}></i>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}<i class="iconfont">&#xe6c7;</i></span>
</p>
</div>
<div class="td productPrice" style="width:17%;">¥66666{{productPrice}}</div>
<div style="width:10%;" class="td adjust-cart-num">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="67{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">{{tipMessage}}</p>
{{/if}}
{{/if}}
</div>
<div style="width:17%;" class="td sub-total red">¥888{{productSubtotal}}</div>
<div style="width:11%;" class="td cart-operation">
<span class="cart-del-btn">删除</span>
<span class="cart-col-btn">移入收藏</span>
</div>
<div class="goods-choose-box none" id="goodsChoose">
<div class="goods-info">
<div class="dl choose-color">
<div class="dd">颜色:</div>
<div class="dt active">
<img src="#"/>
</div>
<div class="dt">
<img src="#"/>
</div>
<div class="dt">
<img src="#"/>
</div>
</div>
<div class="dl choose-size">
<div class="dd">尺码:</div>
<div class="dt active">
40
</div>
<div class="dt">
42
</div>
<div class="dt">
44
</div>
<div class="dt">
46
</div>
<div class="dt disabled">
48
</div>
</div>
<div class="button-group">
<button class="button-sure">确定</button>
<button class="button-cancel">取消</button>
</div>
</div>
<div class="goods-info-bigImg">
<div class="bigImg">
<img src="#"/>
</div>
<div class="bigImg none">
<img src="#"/>
</div>
<div class="bigImg none">
<img src="#"/>
</div>
<div class="bigImg none">
<img src="#"/>
</div>
<div class="bigImg none">
<img src="#"/>
</div>
</div>
</div>
</li>
<li class="pre-sell-box tr"
{{#if pid}}data-pid="{{pid}}"{{/if}}
{{#if id}}data-id="{{id}}"{{/if}}
{{#if skn}}data-skn="{{skn}}"{{/if}}
{{#if sku}}data-sku="{{sku}}"{{/if}}
{{#if productNum}}data-productnum="{{productNum}}"{{/if}}
{{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<div class="td pay-pro" style="width: 45%;">
<i class="cart-item-check iconfont" data-goodstype="{{goodsType}}" {{#if isChecked}}checked{{/if}}></i>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
{{productTitle}}</a>
<span><b title="{{productColor}}">颜色:红色{{productColor}}</b> 尺码:L{{productSize}}<i class="iconfont">&#xe6c7;</i></span>
</p>
</div>
<div class="td productPrice" style="width:17%;">¥66666{{productPrice}}</div>
<div style="width:10%;" class="td adjust-cart-num">
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus"></span>
<input type="text" value="67{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
</div>
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">{{tipMessage}}</p>
{{/if}}
{{/if}}
</div>
<div style="width:17%;" class="td sub-total red">¥888{{productSubtotal}}</div>
<div style="width:11%;" class="td cart-operation">
<span class="cart-del-btn">删除</span>
<span class="cart-col-btn">移入收藏</span>
</div>
<div class="goods-choose-box none" id="goodsChoose">
<div class="goods-info">
<div class="dl choose-color">
<div class="dd">颜色:</div>
<div class="dt active">
<img src="#"/>
</div>
<div class="dt">
<img src="#"/>
</div>
<div class="dt">
<img src="#"/>
</div>
</div>
<div class="dl choose-size">
<div class="dd">尺码:</div>
<div class="dt active">
40
</div>
<div class="dt">
42
</div>
<div class="dt">
44
</div>
<div class="dt">
46
</div>
<div class="dt disabled">
48
</div>
</div>
<div class="button-group">
<button class="button-sure">确定</button>
<button class="button-cancel">取消</button>
</div>
</div>
<div class="goods-info-bigImg">
<div class="bigImg">
<img src="#"/>
</div>
<div class="bigImg none">
<img src="#"/>
</div>
<div class="bigImg none">
<img src="#"/>
</div>
<div class="bigImg none">
<img src="#"/>
</div>
<div class="bigImg none">
<img src="#"/>
</div>
</div>
</div>
</li>
</ul>
</div>
{{/cart}}
{{!--{{#cart.salesPromotion}}
<div class="salesPromotion">
<p>
{{#if salesTitle}}
<b>{{salesTitle}}</b>
{{/if}}
{{salesMessage}}</p>
<span><i></i>已参与</span>
</div>
{{/cart.salesPromotion}} --}}
{{/if}}
</div>
</div>
{{#unless @root.pc.product.removeRecentView}}
<div class="lazy-load-object">
<textarea class="datalazyload" style="visibility: hidden;">
<script>
fetchRecommend();
</script>
</textarea>
</div>
<div class="bottom-tab bottom-tab-slide">
<span class="bottom-title cur">凑单商品</span>
<span class="bottom-title">为您优选</span>
<span class="bottom-title">最近浏览</span>
<span class="change">换一批
<span class="iconfont change-icon">&#xe639;</span>
</span>
</div>
<div class="individual-slide">
<div class="individual-item individual-item-togetherGoods">
<input id="" type="hidden" value="">
<div id="" class="goods clearfix">
{{>individual-slide}}
</div>
</div>
<div class="individual-item individual-item-recommendGoods none">
<input id="" type="hidden" value="{{latestWalk}}">
<div id="" class="goods clearfix">
{{>individual-slide}}
</div>
</div>
<div class="individual-item individual-item-latestWalk none">
<input id="latest-walk-count" type="hidden" value="">
<div id="latest-walk-goods" class="goods clearfix">
{{>individual-slide}}
</div>
</div>
</div>
{{/unless}}
<div class="loading"><span></span>请稍后...</div>
</div>
<script type="text/javascript">
/*<textarea data-role="gifts-cansel" class="hide" data-promotionid="{{promotionId}}">{{{giftGoodsListStr}}}</textarea>*/
</script>
<!-- 商品详细信息窗口 -->
<script type="text/javascript">
(function (d) {
window.bd_cpro_rtid="P1fsPWc";
var s = d.createElement("script");s.type = "text/javascript";s.async = true;s.src = location.protocol + "//cpro.baidu.com/cpro/ui/rt.js";
var s0 = d.getElementsByTagName("script")[0];s0.parentNode.insertBefore(s, s0);
})(document);
</script>
<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript">
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
{event:"setAccount", account: 16184},
{event:"setCustomerId", id: "{{uid}}"},
{event:"setSiteType", type: "d"},
{event:"viewBasket", item: {{{cart.criteo}}} }
);
</script>
<!-- 聚效 -->
<script type="text/javascript">
var _mvq = window._mvq || [];
window._mvq = _mvq;
_mvq.push(['$setAccount', 'm-23428-1']);
_mvq.push(['$setGeneral', 'cartview', '', /*用户名*/ '', '{{uid}}']);
_mvq.push(['$logConversion']);
_mvq.push(['$addItem', '', /*商品id*/ '{{cart.ids}}', '', '']);
_mvq.push(['$logData']);
</script>
... ... @@ -5,18 +5,16 @@
</div>
<div class="address-wrap">
<div class="block-title">收货信息<span id="new-address-btn" class="right">新增收货地址 +</span></div>
<div class="block-title">收货信息<span id="new-address-btn" class="right">新增收货地址 <i>+</i></span></div>
<div id="addr-list" class="addr-list clearfix">
{{# deliveryAddress}}
<div class="addr-item{{#isY is_default}} addr-default addr-select{{/isY}}" data-id="{{id}}" data-consignee="{{consignee}}" data-mobile="{{mobile}}" data-phone="{{phone}}" data-area="{{area}}" data-code="{{area_code}}" data-address="{{address}}"{{#isY is_default}} data-default="1"{{/isY}}{{#isY is_delivery}} data-delivery="1"{{/isY}}>
<div class="addr-item{{#isY is_default}} addr-default addr-select{{/isY}}" data-id="{{id}}" data-consignee="{{consignee}}" data-mobile="{{mobile}}" data-phone="{{phone}}" data-area="{{area}}" data-code="{{area_code}}" data-address="{{address}}"{{#isY is_default}} data-default="1"{{/isY}}{{#isY is_delivery}} data-delivery="1"{{/isY}}{{#isY is_cash_delivery}} data-cashdelivery="1"{{/isY}}>
<p class="name">
{{consignee}}
<span class="right">{{mobile}}</span>
</p>
<p class="area">
<span>{{area}}</span>
</p>
<p class="street">{{address}}</p>
<p class="area">{{area}}</p>
<p class="street fw300">{{address}}</p>
<p class="option">
<label class="set-default">设为默认</label>
<label class="default-tip">默认地址</label>
... ... @@ -31,13 +29,14 @@
</div>
</div>
<p class="addr-opt">
<span class="more-addr-btn">显示全部地址<i class="iconfont">&#xe60b;</i></span>
<span class="hide-more-btn">收起地址<i class="iconfont">&#xe607;</i></span>
<span class="more-addr-btn">显示全部地址</span>
<span class="hide-more-btn">收起地址</span>
</p>
</div>
<div class="pay-wrap">
<div class="block-title">支付方式</div>
<input type="hidden" id="pay-type2">
{{#each paymentWay}}
<p{{#isEqual is_support 'N'}} class="unsp-pay"{{/isEqual}}>
<label class="check-btn{{#isY default}} checked{{/isY}}" data-id="{{payment_id}}" data-type="{{payment_type}}" data-name="{{payment_type_name}}">{{payment_type_name}}</label>
... ... @@ -58,7 +57,7 @@
<label class="check-btn{{#isY default}} checked{{/isY}}" data-id="{{delivery_way_id}}"
title="{{delivery_way_name}}:运费 ¥ {{delivery_way_cost}}">{{delivery_way_name}}:运费 ¥ {{delivery_way_cost}}</label>
{{#isEqual delivery_way_id 2}}
<span>您所选择的区域暂不在支持顺丰派送范围内,点击<a href="#" class="more-info">查看详情></a> </span>
<span>您所选择的区域暂不在支持顺丰派送范围内,点击<a href="#" class="more-info">查看详情</a> </span>
{{/isEqual}}
</p>
{{/ deliveryWay}}
... ... @@ -75,20 +74,20 @@
</div>
<div class="goods-wrap">
<div class="block-title">订单商品信息<a href="/cart" id="go-cart-btn" class="right">返回购物车修改 ></a></div>
<div class="block-title">订单商品信息<a href="/cart/cart" class="right"><span id="go-cart-btn">返回购物车修改</span></a></div>
{{#with shoppingCartData}}
{{#isY is_multi_package}}
<div class="multi-package-row">
温馨提示:您购买的商品<em class="red">分属不同仓库</em>,需要调拨,将被拆分成多个包裹送达
<span class="iconfont show-package">&#xe628;</span>
<span class="show-package"></span>
<div class="package-list hide">
<div class="package-up-icon"></div>
{{#each ../package_list}}
<div class="package-item">
<p class="package-title bold">包裹{{math @index '+' 1}}:{{#if @first}}总仓发货{{^}}异地调拨{{/if}}</p>
<div class="toggle-btns">
<span class="iconfont toggle-icon left-icon">&#xe609;</span>
<span class="iconfont toggle-icon right-icon">&#xe608;</span>
<span class="toggle-icon left-icon"></span>
<span class="toggle-icon right-icon"></span>
</div>
<div class="package-goods-wrap">
<ul class="package-goods clearfix">
... ... @@ -116,18 +115,18 @@
<thead>
<tr>
<th width="3%"></th>
<th width="46%">商品信息</th>
<th width="20%">颜色/尺码</th>
<th class="aline-left" width="46%">商品信息</th>
<th>颜色/尺码</th>
<th width="18%">单价</th>
<th>数量</th>
<th width="6%">数量</th>
<th width="3%"></th>
</tr>
</thead>
<tbody>
{{#each goodsList}}
<tr>
<tr class="goods-item" data-skn="{{product_skn}}" data-sku="{{product_sku}}" data-price="{{last_price}}" data-num="{{buy_number}}">
<td{{#if @first}} class="border-top"{{/if}}></td>
<td class="border-top">
<td class="border-top aline-left">
<a class="image" href="{{linkToGoods}}">
<img src="{{image goods_images 64 85}}" class="thumb">
<p class="name">
... ... @@ -145,7 +144,9 @@
颜色:<span class="color">{{color_name}}</span>
尺码:<span class="size">{{size_name}}</span>
</td>
<td class="border-top price">¥ {{round last_price 2}}</td>
<td class="border-top price">
<span class="red">¥ {{round last_price 2}}</span>
</td>
<td class="border-top">× {{buy_number}}</td>
<td{{#if @first}} class="border-top"{{/if}}></td>
</tr>
... ... @@ -166,7 +167,7 @@
<div class="extra-wrap">
<dl>
<dt id="use-coupons" class="use-coupons">
<span class="iconfont locker-switch">&#xe645;</span>使用优惠券/优惠码
<span class="locker-switch"></span>使用优惠券/优惠码
<div class="tip-box right">
<p>优惠码不可与优惠券同时使用</p>
<p class="coupon-err-tip"></p>
... ... @@ -182,18 +183,18 @@
</span>
<div class="opt-area right">
<input type="text" class="coupon-code">
<label class="sure-use-code">直接使用</label>
<label class="sure-use-ticket">确定</label>
<label class="sure-use-code fw300">直接使用</label>
<label class="sure-use-ticket fw300">确定</label>
</div>
</div>
<div class="coupon-list-wrap"></div>
</dd>
<dt><span class="iconfont locker-switch">&#xe645;</span>使用YOHO币</dt>
<dt><span class="locker-switch"></span>使用YOHO币</dt>
<dd id="yoho-coin-box" class="yoho-coin-box" data-coin="{{usedCoinNum}}" data-max={{canUseCoinNum}}>
<div class="outer-view">
<p class="coin-err-tip">{{coinErrorTip}}</p>
<p>有货币满<span class="red">{{yoho_coin_pay_rule.num_limit}}</span>个即可使用,每次使用有货币为<span class="red">{{yoho_coin_pay_rule.num_limit}}</span>的整数倍</p>
<i class="iconfont help-icon">&#xe628;</i>
<i class="help-icon"></i>
<div class="coin-tip-help">
<p>有货币使用提示:</p>
<p>
... ... @@ -206,31 +207,31 @@
</div>
<div class="coin-main-view">
<p>本次使用有货币<span class="red">{{canUseCoinNum}}</span>个,抵扣 <span class="red">¥{{yoho_coin}}</span></p>
<p class="grey">您当前共有有货币 <span class="red">{{total_yoho_coin_num}}</span> 个,可用 <span class="red">{{canUseCoinNum}}</span></p>
<label class="coin-cancel-btn">取消使用</label>
<p class="grey fw300">您当前共有有货币 <span class="red">{{total_yoho_coin_num}}</span> 个,可用 <span class="red">{{canUseCoinNum}}</span></p>
<label class="coin-cancel-btn fw300">取消使用</label>
<label class="coin-use-btn">确定</label>
</div>
</dd>
{{#if red_envelopes}}
<dt><span class="iconfont locker-switch">&#xe645;</span>使用红包</dt>
{{#if redEnvelopes}}
<dt><span class="locker-switch"></span>使用红包</dt>
<dd id="red-packet-box" class="red-packet-box">
<div>
<label class="radio-btn"></label>
使用红包支付(当前账户红包金额:<em class="red">¥ {{red_envelopes}}</em>
<label class="sure-btn" data-num="{{red_envelopes}}">确定</label>
使用红包支付(当前账户红包金额:<em class="red">¥ {{redEnvelopes}}</em>
<label id="red-packet-sure" class="sure-btn fw300" data-num="{{redEnvelopes}}" data-used="{{useRedEnvelopes}}">确定</label>
</div>
</dd>
{{/if}}
<dt><span class="iconfont locker-switch">&#xe645;</span>添加备注信息</dt>
<dt><span class="locker-switch"></span>添加备注信息</dt>
<dd id="remark-box" class="remark-box">
<div class="note-text-box">
<p class="tip-text">声明:备注中有关收货人信息、支付方式、配送方式、发票信息等购买要求一律以上面的选择为准,备注无效。</p>
<p class="tip-text fw300">声明:备注中有关收货人信息、支付方式、配送方式、发票信息等购买要求一律以上面的选择为准,备注无效。</p>
<textarea class="note-text"></textarea>
</div>
<p class="pp-area">是否打印价格:
<label class="radio-btn on"></label>
<label class="radio-btn unprint"></label>
<span>(如:送朋友的商品可不打印价格哦!)</span>
<span class="fw300">(如:送朋友的商品可不打印价格哦!)</span>
</p>
</dd>
</dl>
... ...
<div class="yoho-dialog cart-togetherGoods"
data-role="cart-gift-win"
style="margin-top: -374.5px; margin-left: -350px; display:none;">
<span class="close">
<i class="iconfont"></i>
</span>
<div class="content">
<div class="detail-body">
<div class="slide-img">
<p class="sell-class-title">选赠品:
<em class="slide-img-title"><span
class="active">1元加价购</span>
<code class="spacing">|</code>
<span>59元加价购</span>
<code class="spacing">|</code>
<span>99元加价购</span>
</em>
</p>
<div class="side-img-dd">
<ul class="img-list">
{{#each giftGoodsList}}
<li class="img-item">
<span class="hide goods-id">{{goods_id}}</span>
<div class="good">
<a href="javascript:void(0)" target="_blank"> {{!--{{link}}--}}
<img class="lazy" src="{{imgCover}}"/>
</a>
</div>
</li>
{{/each}}
</ul>
<div class="img-brand-switch">
<a class="prev iconfont" href="javascript:;">&#xe609;</a>
<a class="next iconfont" href="javascript:;">&#xe608;</a>
</div>
</div>
</div>
<div class="detail-goods">
<div class="detail-bigpic">
<div class="bigpic">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="piclist">
<span class="pre"></span>
<div class="con">
<ul>
<li class="active"><img src=""></li>
<li><img src=""></li>
<li><img src=""></li>
<li><img src=""></li>
<li><img src=""></li>
</ul>
</div>
<span class="next"></span>
</div>
</div>
<div class="detail-bigpic none">
<div class="bigpic">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="piclist">
<span class="pre"></span>
<div class="con">
<ul>
<li class="active"><img src=""></li>
<li><img src=""></li>
<li><img src=""></li>
<li><img src=""></li>
<li><img src=""></li>
</ul>
</div>
<span class="next"></span>
</div>
</div>
<div class="detail-info">
<div class="title">
<h2>哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈{{name}}</h2>
</div>
<div class="price">
<span class="newprice">现价:<b class="promotion-price">¥7777{{salePrice}}</b></span>
<span class="activityprice">活动价:<b class="promotion-price">¥5555{{marketPrice}}</b></span>
</div>
<div class="order">
<dl>
<dd class="colorBox">选颜色:</dd>
<dt>
<div class="colorBox">
<ul>
<li class="color active">
<p class="{{#if focus}}atcive{{/if}}"><span></span><img src=""></p>
<span>{{name}}</span>
</li>
<li class="color">
<p class="{{#if focus}}atcive{{/if}}"><span></span><img src=""></p>
<span>{{name}}</span>
</li>
</ul>
</div>
</dt>
</dl>
<dl>
<dd class="showSizeBox">选尺码:</dd>
<dt>
<div class="showSizeBox">
<span data-sku="{{sku}}" data-num="{{num}}" class="disabled">40码{{name}}</span>
<span data-sku="{{sku}}" data-num="{{num}}">40码{{name}}</span>
<span data-sku="{{sku}}" data-num="{{num}}">40码{{name}}</span>
<span data-sku="{{sku}}" data-num="{{num}}">40码{{name}}</span>
</div>
<p class="size-p">内长&nbsp;25.5com</p>
</dt>
</dl>
<dl>
<dd>选件数:</dd>
<dt>
<div class="amount_wrapper">
<input type="text" id="num" class="num" value="1" readonly="readonly">
<a class="amount cut"><i class="iconfont">&#xe6c0;</i></a>
<a class="amount add"><i class="iconfont">&#xe6c1;</i></a>
</div>
</dt>
</dl>
</div>
<div class="submit">
<button class="btn-red"><i class="addCart iconfont">&#xe600;</i>添加到购物车</button>
<button class="btn-favCount"><i class="favCount iconfont">&#xe68f;</i>收藏商品</button>
</div>
</div>
<div class="detail-size">
<h3>尺码信息(单位:厘米)</h3>
<table>
<thead>
<tr>
<th width="{{width}}">吊牌吃吗</th>
<th width="{{width}}">吊牌吃吗
</td>
<th width="{{width}}">吊牌吃吗
</td>
<th width="{{width}}">吊牌吃吗
</td>
<th width="{{width}}">吊牌吃吗
</td>
<th width="{{width}}">吊牌吃吗
</td>
</tr>
</thead>
<tbody>
<tr>
<td>6666{{.}}</td>
</tr>
<tr>
<td>4444{{.}}</td>
</tr>
</tbody>
</table>
<div class="size-info">
※ 以上尺寸为实物实际测量,因测量方式不同会有略微误差,相关数据仅作参考,以收到实物为准。
</div>
</div>
</div>
</div>
</div>
</div>
... ... @@ -114,7 +114,7 @@
</dt>
</dl>
<dl>
<dd class="showNumBox">选件数:</dd>
<dd>选件数:</dd>
<dt>
<div class="amount_wrapper">
<input type="text" id="num" class="num" value="1" readonly="readonly">
... ... @@ -135,11 +135,16 @@
<thead>
<tr>
<th width="{{width}}">吊牌吃吗</th>
<th width="{{width}}">吊牌吃吗</th>
<th width="{{width}}">吊牌吃吗</th>
<th width="{{width}}">吊牌吃吗</th>
<th width="{{width}}">吊牌吃吗</th>
<th width="{{width}}">吊牌吃吗</th>
<th width="{{width}}">吊牌吃吗
</td>
<th width="{{width}}">吊牌吃吗
</td>
<th width="{{width}}">吊牌吃吗
</td>
<th width="{{width}}">吊牌吃吗
</td>
<th width="{{width}}">吊牌吃吗
</td>
</tr>
</thead>
<tbody>
... ...
... ... @@ -3,7 +3,7 @@
<p class="prompt">\{{title}}、电话为选填项,其他均为必填项</p>
<ul class="info-wrap">
<li>
<span class="left-rd"><i class="red">*</i>收人:</span>
<span class="left-rd"><i class="red">*</i>收<i class="mg">货</i>人:</span>
<input type="text" name="consignee" value="\{{info.consignee}}" placeholder="请输入您的姓名">
<p class="caveat-tip"></p>
</li>
... ... @@ -12,7 +12,7 @@
<div class="area-box">
<span>请选择省市区</span>
<span class="area-text">\{{info.areaText}}</span>
<div class="area-select">
<div class="area-select{{#if thirdLevelArea}} third-level-area{{/if}}">
<ul class="clearfix">
<li class="area-sel-tab tab-on">
省份
... ... @@ -26,6 +26,10 @@
区县
<div class="area-list opt-list"></div>
</li>
<li class="area-sel-tab">
乡镇/街道
<div class="town-list opt-list"></div>
</li>
</ul>
</div>
</div>
... ... @@ -59,9 +63,7 @@
\{{consignee}}
<span class="right">\{{mobile}}</span>
</p>
<p class="area">
<span>\{{area}}</span>
</p>
<p class="area">\{{areaShow}}</p>
<p class="street">\{{address}}</p>
<p class="option">
<label class="set-default">设为默认</label>
... ... @@ -120,7 +122,7 @@
{{/each}}
</div>
</li>
<li class="receiver invoice-row">
<li class="receiver invoice-row" data-full="{{receiverMobile}}" data-hide="{{hideReceiverMobile}}">
<span class="row-title">
<em>*</em>
手机号码:
... ... @@ -171,7 +173,7 @@
<div class="outer-view">
<p class="coin-err-tip">\{{coinErrorTip}}</p>
<p>有货币满<span class="red">\{{yoho_coin_pay_rule.num_limit}}</span>个即可使用,每次使用有货币为<span class="red">\{{yoho_coin_pay_rule.num_limit}}</span>的整数倍</p>
<i class="iconfont help-icon">&#xe628;</i>
<i class="help-icon"></i>
<div class="coin-tip-help">
<p>有货币使用提示:</p>
<p>
... ... @@ -184,8 +186,8 @@
</div>
<div class="coin-main-view">
<p>本次使用有货币<span class="red">\{{canUseCoinNum}}</span>个,抵扣 <span class="red">¥\{{yoho_coin}}</span></p>
<p class="grey">您当前共有有货币 <span class="red">\{{total_yoho_coin_num}}</span> 个,可用 <span class="red">\{{canUseCoinNum}}</span> 个</p>
<label class="coin-cancel-btn">取消使用</label>
<p class="grey fw300">您当前共有有货币 <span class="red">\{{total_yoho_coin_num}}</span> 个,可用 <span class="red">\{{canUseCoinNum}}</span> 个</p>
<label class="coin-cancel-btn fw300">取消使用</label>
<label class="coin-use-btn">确定</label>
</div>
</script>
... ...
<li class="good img-item">
<span class="hide goods-id">{{goods_id}}</span>
<a href="{{href}}" target="_blank">
<img class="lazy" data-original="{{img}}"/>
</a>
<a class="name" href="{{href}}" target="_blank">哈哈哈哈哈哈哈哈哈哈{{name}}</a>
<p class="price">
<span class="sale-price">8888{{salePrice}}</span>
</p>
<a class="btn-add-cart" data-together-id=" ">加入购物车</a>
</li>
<li class="good img-item">
<span class="hide goods-id">{{goods_id}}</span>
<a href="{{href}}" target="_blank">
<img class="lazy" data-original="{{img}}"/>
</a>
<a class="name" href="{{href}}" target="_blank">哈哈哈哈哈哈哈哈哈哈{{name}}</a>
<p class="price">
<span class="sale-price">8888{{salePrice}}</span>
</p>
<a class="btn-add-cart" data-together-id=" ">加入购物车</a>
</li>
<li class="good img-item">
<span class="hide goods-id">{{goods_id}}</span>
<a href="{{href}}" target="_blank">
<img class="lazy" data-original="{{img}}"/>
</a>
<a class="name" href="{{href}}" target="_blank">哈哈哈哈哈哈哈哈哈哈{{name}}</a>
<p class="price">
<span class="sale-price sale-price-new">8888{{salePrice}}</span>
<span class="market-price">7777{{marketPrice}}</span>
</p>
<a class="btn-add-cart" data-together-id=" ">加入购物车</a>
</li>
<li class="good img-item">
<span class="hide goods-id">{{goods_id}}</span>
<a href="{{href}}" target="_blank">
<img class="lazy" data-original="{{img}}"/>
</a>
<a class="name" href="{{href}}" target="_blank">哈哈哈哈哈哈哈哈哈哈{{name}}</a>
<p class="price">
<span class="sale-price">8888{{salePrice}}</span>
</p>
<a class="btn-add-cart" data-together-id=" ">加入购物车</a>
</li>
<li class="good img-item">
<span class="hide goods-id">{{goods_id}}</span>
<a href="{{href}}" target="_blank">
<img class="lazy" data-original="{{img}}"/>
</a>
<a class="name" href="{{href}}" target="_blank">哈哈哈哈哈哈哈哈哈哈{{name}}</a>
<p class="price">
<span class="sale-price">8888{{salePrice}}</span>
</p>
<a class="btn-add-cart" data-together-id=" ">加入购物车</a>
</li>
<li class="good img-item">
<span class="hide goods-id">{{goods_id}}</span>
<a href="{{href}}" target="_blank">
<img class="lazy" data-original="{{img}}"/>
</a>
<a class="name" href="{{href}}" target="_blank">哈哈哈哈哈哈哈哈哈哈{{name}}</a>
<p class="price">
<span class="sale-price">8888{{salePrice}}</span>
</p>
<a class="btn-add-cart" data-together-id=" ">加入购物车</a>
</li>
... ... @@ -7,15 +7,11 @@
const mRoot = '../models';
const addressService = require(`${mRoot}/address-service`); // user model
const helpers = global.yoho.helpers;
/**
* 地址管理列表
*/
exports.index = (req, res, next) => {
if (!req.user.uid) {
res.redirect(helpers.urlFormat('/signin.html'));
}
let uid = req.user.uid;
let responseData = {
... ... @@ -35,11 +31,12 @@ exports.index = (req, res, next) => {
* 编辑修改地址
*/
exports.editAddress = (req, res, next) => {
if (!req.user.uid) {
res.redirect(helpers.urlFormat('/signin.html'));
}
let uid = req.user.uid;
if (!req.query.id) {
return {code: 400};
}
// 真实数据输出
addressService.editAddress(req.query, uid).then(result => {
res.json(result);
... ... @@ -50,9 +47,6 @@ exports.editAddress = (req, res, next) => {
* 添加保存地址
*/
exports.saveAddress = (req, res, next) => {
if (!req.user.uid) {
res.redirect(helpers.urlFormat('/signin.html'));
}
let uid = req.user.uid;
// 真实数据输出
... ... @@ -65,11 +59,15 @@ exports.saveAddress = (req, res, next) => {
* 删除地址
*/
exports.delAddress = (req, res, next) => {
if (!req.user.uid) {
res.redirect(helpers.urlFormat('/signin.html'));
}
let uid = req.user.uid;
if (!req.query.id) {
return {
code: 400,
message: '缺失必填项'
};
}
// 真实数据输出
addressService.delAddress(req.query, uid).then(result => {
res.json(result);
... ... @@ -80,11 +78,15 @@ exports.delAddress = (req, res, next) => {
* 设置默认地址
*/
exports.defaultAddress = (req, res, next) => {
if (!req.user.uid) {
res.redirect(helpers.urlFormat('/signin.html'));
}
let uid = req.user.uid;
if (!req.query.id) {
return {
code: 400,
message: '缺失必填项'
};
}
// 真实数据输出
addressService.defaultAddress(req.query, uid).then(result => {
res.json(result);
... ...
... ... @@ -4,7 +4,7 @@
const Promise = require('bluebird');
const co = Promise.coroutine;
let CouponsModel = require('../models/CouponsModel');
let CouponsModel = require('../models/coupons-model');
const helpers = global.yoho.helpers;
... ...
... ... @@ -8,7 +8,7 @@
const Promise = require('bluebird');
const co = Promise.coroutine;
const CurrencyModel = require('../models/CurrencyModel');
const CurrencyModel = require('../models/currency-model');
const moment = require('moment');
const convertUnitTime = (src) => {
... ...
... ... @@ -8,8 +8,8 @@
const Promise = require('bluebird');
const co = Promise.coroutine;
const OrderData = require('../models/OrderData');
const IndexModel = require('../models/IndexModel');
const OrderData = require('../models/order-data');
const IndexModel = require('../models/index-model');
const index = (req, res, next)=>{
... ...
'use strict';
const Promise = require('bluebird');
const co = Promise.coroutine;
const RedenvelopesModel = require('../models/RedenvelopesModel');
const RedenvelopesModel = require('../models/redenvelopes-model');
const index = (req, res, next)=>{
let $uid = '8041246';// req.user.uid;
... ...
... ... @@ -2,7 +2,7 @@
const Promise = require('bluebird');
const co = Promise.coroutine;
const UserData = require('../models/UserData');
const UserData = require('../models/user-data');
const moment = require('moment');
const helpers = global.yoho.helpers;
... ...
... ... @@ -67,6 +67,9 @@
},
{
key: 'areaCode'
},
{
key: 'streets'
}
]
}, {
... ... @@ -106,12 +109,9 @@
*/
exports.editAddress = (params, uid) => {
return co(function*() {
let id = params.id || null,
respData = {code: 400};
let id = params.id,
respData = {};
if (id === null) {
return respData;
}
let data = yield addressApi.addressData(uid);
respData.code = data.code;
... ... @@ -143,7 +143,7 @@
let query = {
uid: uid,
address: _.trim(params.address || ''),
area_code: _.trim(params.areaCode || ''),
area_code: _.trim(params.streets || ''),
consignee: _.trim(params.addressName || ''),
email: _.trim(params.email || ''),
id: params.addrId === '0' ? null : params.addrId,
... ... @@ -153,7 +153,7 @@
};
if (query.uid === '' || query.address === '' ||
query.area_code === '' || query.consignee === '' ||
query.area_code.length < 6 || query.consignee === '' ||
query.email === '' || query.zip_code === '') {
return {
... ... @@ -172,15 +172,8 @@
*/
exports.delAddress = (params, uid) => {
return co(function*() {
let id = params.id || null,
respData = {code: 400};
let respData = yield addressApi.deleteAddress(uid, params.id);
if (id === null) {
respData.message = '缺失必填项';
return respData;
}
respData = yield addressApi.deleteAddress(uid, id);
return respData;
})();
};
... ... @@ -190,15 +183,8 @@
*/
exports.defaultAddress = (params, uid) => {
return co(function*() {
let id = params.id || null,
respData = {code: 400};
if (id === null) {
respData.message = '缺失必填项';
return respData;
}
let respData = yield addressApi.setDefaultAddress(uid, params.id);
respData = yield addressApi.setDefaultAddress(uid, id);
return respData;
})();
};
... ...
... ... @@ -4,7 +4,7 @@
const Promise = require('bluebird');
const co = Promise.coroutine;
const UserData = require('./UserData');
const UserData = require('./user-data');
const helpers = global.yoho.helpers;
... ...
... ... @@ -11,7 +11,7 @@ const helpers = global.yoho.helpers;
const api = global.yoho.API;
const _ = require('lodash');
const Image = require('../../../utils/images');
const CurrencyData = require('./CurrencyData');
const CurrencyData = require('./currency-data');
const SearchData = require('./SearchData');
// 使用 product中的分页逻辑
... ...
... ... @@ -5,14 +5,14 @@
const Promise = require('bluebird');
const co = Promise.coroutine;
const OrderData = require('./OrderData');
const OrderModel = require('./OrderModel');
const OrderData = require('./order-data');
const OrderModel = require('./order-model');
const helpers = global.yoho.helpers;
const api = global.yoho.API;
const searchApi = global.yoho.SearchAPI;
const BrandData = require('./BrandData');
const IndexData = require('./IndexData');
const IndexData = require('./index-data');
const SearchData = require('./SearchData');
const HelperHome = require('./HelperHome');
... ...
... ... @@ -5,7 +5,7 @@
const Promise = require('bluebird');
const co = Promise.coroutine;
const OrderData = require('./OrderData');
const OrderData = require('./order-data');
const ChannelConfig = require('./ChannelConfig');
const helpers = global.yoho.helpers;
const api = global.yoho.API;
... ...
'use strict';
const Promise = require('bluebird');
const co = Promise.coroutine;
const RedenvelopesData = require('./RedenvelopesData.js');
const RedenvelopesData = require('./redenvelopes-data.js');
const redenvelopesList = uid=>{
return co(function*() {
... ...
... ... @@ -22,13 +22,13 @@ const commentController = require(`${cRoot}/comment`);
const messageController = require(`${cRoot}/message`);
// const returnsController = require(`${cRoot}/returns`);
// const IndexController = require(`${cRoot}/Index`);
// const CurrencyController = require(`${cRoot}/Currency`);
// const IndexController = require(`${cRoot}/index`);
// const CurrencyController = require(`${cRoot}/currency`);
const personalController = require(`${cRoot}/qrcode`);
// const RedenvelopesController = require(`${cRoot}/Redenvelopes`);
// const RedenvelopesController = require(`${cRoot}/redenvelopes`);
// const VipController = require(`${cRoot}/vip`);
// const FavoriteController = require(`${cRoot}/Favorite`);
// const FavoriteController = require(`${cRoot}/favorite`);
// const CouponsController = require(`${cRoot}/coupons`);
const UserController = require(`${cRoot}/user`);
... ... @@ -36,7 +36,8 @@ const bindController = require(`${cRoot}/3party-bind`);
const AccountController = require(`${cRoot}/account`);
// const AddressController = require(`${cRoot}/address`);
const AddressController = require(`${cRoot}/address`);
// const GiftController = require(`${cRoot}/gift`);
const homeNav = (req) => {
... ... @@ -211,11 +212,6 @@ router.get('/message/pickCoupon', messageController.pickCoupon);
// router.get('/exchange/detail', returnsController.refundDetail);
// router.get('/returns/success', returnsController.index);
// // 地址管理
// router.get('address', addressController.index);
// router.get('address/area', addressController.area);
// router.get('/index', [getCommonHeader, getHomeNav], IndexController.index);
// router.get('/currency', CurrencyController.index);
... ... @@ -273,22 +269,7 @@ router.get('/bind/renren/callback', bindController.renren.callback);
router.post('/cancelbind/:type', bindController.cancelBind);
//
// router.get('/address/area', UserController.getProviceList);
//
// router.get('/account', [getCommonHeader, getHomeNav], AccountController.index);
//
// router.get('/account/userpwd', [getCommonHeader, getHomeNav], AccountController.userPwd);
//
// router.get('/account/email', [getCommonHeader, getHomeNav], AccountController.userEmail);
//
// router.get('/account/mobile', [getCommonHeader, getHomeNav], AccountController.userMobile);
//
// router.post('/account/checkverifycode', [getCommonHeader, getHomeNav], AccountController.checkVerifyCode);
//
// router.post('/account/checkpassword', [getCommonHeader, getHomeNav], AccountController.checkPassword);
//
// 账号安全
router.get('/account', [getCommonHeader, getHomeNav], AccountController.index);
router.get('/account/userpwd', [getCommonHeader, getHomeNav], AccountController.userPwd);
... ... @@ -323,16 +304,20 @@ router.post('/account/sendmobilemsg', AccountController.sendMobileMsg);
router.post('/account/modifymobile', AccountController.modifyMobile);
//
// router.get('/address', [getCommonHeader, getHomeNav], AddressController.index);
//
// router.get('/address/editAddress', AddressController.editAddress);
//
// router.post('/address/saveAddress', AddressController.saveAddress);
//
// router.get('/address/delAddress', AddressController.delAddress);
//
// router.get('/address/defaultAddress', AddressController.defaultAddress);
// 地址管理
router.get('/address', [getCommonHeader, getHomeNav], AddressController.index);
router.get('/address/area', UserController.getProviceList);
router.get('/address/editAddress', AddressController.editAddress);
router.post('/address/saveAddress', AddressController.saveAddress);
router.get('/address/delAddress', AddressController.delAddress);
router.get('/address/defaultAddress', AddressController.defaultAddress);
//
// router.get('/gift', [getCommonHeader, getHomeNav], GiftController.index);
//
... ...
{{> layout/header}}
<div class="user-me-page me-page yoho-page clearfix">
{{> path}}
{{> navigation}}
{{# address}}
{{> path}}
{{> navigation}}
<div class="me-main">
<div class="address block">
<div class="title">
... ... @@ -66,9 +66,9 @@
<span class="form-prompt form-info" id="{{key}}-tip">
{{tips}}
{{#isSelect}}
<a href="{{tipsUrl}}" class="a-underline" target="_blank">
查看货到付款地区
</a>
<!--<a href="{{tipsUrl}}" class="a-underline" target="_blank">-->
<!--查看货到付款地区-->
<!--</a>-->
{{/isSelect}}
</span>
</div>
... ... @@ -85,7 +85,4 @@
</div>
</div>
{{/ address}}
{{> help-us}}
</div>
{{> layout/footer}}
... ...
... ... @@ -22,9 +22,9 @@ module.exports = {
service: 'http://service-test3.yohops.com:9999/',
// prod
singleApi: 'http://single.yoho.cn/',
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
// singleApi: 'http://single.yoho.cn/',
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
// gray
// singleApi: 'http://single.gray.yohops.com/',
... ...
... ... @@ -3,12 +3,14 @@
{{#inValid}}tr-disabled {{#unless sku}}tr-disabled-none{{/unless}}{{/inValid}}
{{#isSamebrandWithNext}} tr-group {{/isSamebrandWithNext}}"
data-role="pitem"
{{#if isOffShelve}}data-isoffshelve="true"{{/if}}
{{#if pid}}data-pid="{{pid}}"{{/if}}
{{#if id}}data-id="{{id}}"{{/if}}
{{#if skn}}data-skn="{{skn}}"{{/if}}
{{#if sku}}data-sku="{{sku}}"{{/if}}
{{#if productNum}}data-productnum="{{productNum}}"{{/if}}
{{#if storageNum}}data-storagenum="{{storageNum}}"{{/if}}
{{#if minBuyNumber}}data-minbuynum="{{minBuyNumber}}"{{/if}}
{{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}
data-promotionid="{{promotionId}}"
data-color="{{productColor}}"
... ... @@ -27,15 +29,26 @@
{{#if isChecked}}checked{{/if}}></i>
{{/if}}
{{/unless}}
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<a class="pay-pro-icon"
data-role="item-img"
{{#unless isOffShelve}}href="{{link}}" target="_blank"{{/unless}}>
<img src="{{imgCover}}">
{{#if isAdvance}}<span class="incentive">预售</span>{{/if}}
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">{{#if tag}}<code class="good-mark">{{tag}}</code>{{/if}}{{productTitle}}</a>
<em class="pay-pro-detail"><span><b title="{{productColor}}">颜色:{{productColor}}</b> 尺码:{{productSize}}<i class="iconfont">&#xe6c7;</i></span></em>
<a {{#unless isOffShelve}}href="{{link}}" target="_blank"{{/unless}}
data-role="item-title">
{{#if tag}}<code class="good-mark">{{tag}}</code>{{/if}}{{productTitle}}
</a>
<em class="{{#unless isOffShelve}}pay-pro-detail{{/unless}}">
<span>
<b title="{{productColor}}">颜色:{{productColor}}</b>
尺码:{{productSize}}<i class="iconfont">&#xe6c7;</i>
</span>
</em>
{{#and isAdvance preSellDate}}
<span class="presell">上市期{{preSellDate}}</span>
<span class="presell">上市期:{{preSellDate}}</span>
{{/and}}
</p>
</div>
... ... @@ -51,10 +64,10 @@
<span class="sale-info-title">促销信息<i></i></span>
<ul class="none">
{{#promotionInfos}}
<li>{{promotionTitle}}
{{>cart-promotion-btn}}
<li>{{{promotionTitle}}}
{{>mix/cart/cart-promotion-btn}}
{{#if isNotReach}}
<a class="btn-clear blue order-pay-link" target="_blank" href="{{promotionPageUrl}}">去凑单&nbsp;></a>
<a class="btn-clear blue order-pay-link" target="_blank" href="{{promotionPageUrl}}">&nbsp;&nbsp;去凑单&nbsp;</a>
{{/if}}
</li>
{{/promotionInfos}}
... ... @@ -67,7 +80,10 @@
<div>{{productNum}}</div>
{{^}}
<div class="cart-num-cont">
<span class="minus cart-num-btn {{#le productNum 1}}disabled{{/le}}"><i class="iconfont icon-minus"></i></span>
<span class="minus cart-num-btn
{{#or (le productNum 1) (and minBuyNumber (le productNum minBuyNumber))}}disabled{{/or}}">
<i class="iconfont icon-minus"></i>
</span>
<input type="text" value="{{productNum}}" readonly="readonly"/>
<span class="plus cart-num-btn {{#or isTipNoStore (ge productNum storageNum)}}disabled{{/or}}"><i class="iconfont icon-plus"></i></span>
</div>
... ... @@ -81,7 +97,7 @@
<p class="tip-message tip-message-coin"><i class="yoho-coin"></i>{{yohoIcon}}有货币</p>
{{/if}}
</div>
<div style="width:100px;" class="cart-operation td">
<div style="width:100px;" class="cart-operation td">
<span class="cart-del-btn" data-role="cart-del-btn">删除</span>
<span class="cart-col-btn" data-role="cart-mov2fav-btn">移入收藏</span>
</div>
... ...
{{#if isEmpty}}
<div class="pay-wapper">
<div class="shop-cart-empty">
<i class="iconfont"></i>
<p>购物车空空的哦,去看看心仪的商品吧~</p>
<a href="{{listUrl}}">去购物</a>
</div>
</div>
<div class="dev-revocation {{#unless deleteShop}}none{{/unless}}">
<table>
{{# deleteShop}}
<tr data-productnum="{{productNum}}" data-productsku="{{productSku}}">
<td style="width:35%; text-align: left;">成功删除<a class="title" href="{{link}}"
target="_blank">{{productTitle}}</a>
</td>
<td style="width:14%;"><span class="productPrice">{{productPrice}}</span></td>
<td style="width:15%;">{{productNum}}</td>
<td style="width:16%;"></td>
<td style="width:11.8%; border-right: none; text-align: right;">
<a href="javascript:void(0);"><span class="goBack">撤销本次删除</span></a>
</td>
</tr>
{{/ deleteShop}}
</table>
</div>
{{^}}
<!-- 购物车商品列表 -->
<div class="pay-wapper">
<div class="cart-title">
<p class="left" style="width:6%;">
<i class="cart-item-check-title cart-item-check iconfont"></i>&nbsp;&nbsp;全选
</p>
<p style="width:35%">商品信息</p>
<p style="width:14%">单价</p>
<p style="width:15%;">数量</p>
<p style="width:16%;">小计</p>
<p class="right" style="width:11.8%;">操作</p>
</div>
{{#advanceCart}}
<div class="mb40" data-role="advance">
<!-- 预售商品 -->
<div class="pre-sell">
<code>预售商品</code>预售商品不参加活动,不可使用优惠券,不同上市期的商品我们将为您先到先发。
</div>
{{#pools}}
{{#if goodsList}}
<div class="cart-table">
<ul class="table">
{{#goodsList}}
{{> mix/cart/cart-item}}
{{/goodsList}}
</ul>
</div>
{{/if}}
{{/pools}}
{{#if offShelves}}
<div class="cart-table">
<ul class="table table-group">
{{#each offShelves}}
{{> mix/cart/cart-item}}
{{/each}}
</ul>
</div>
{{/if}}
{{#if soldOuts}}
<div class="cart-table">
<ul class="table table-group">
{{#each soldOuts}}
{{> mix/cart/cart-item}}
{{/each}}
</ul>
</div>
{{/if}}
{{!--{{#if promotionInfos}}
<!--<div class="gift-sell">-->
<!--{{#promotionInfos}}-->
<!--<p class="gift-sell-info"><code class="order-pay-mark">{{tag}}</code>{{promotionTitle}}-->
<!--&lt;!&ndash;<a class="btn-clear blue" data-together-id="6">去凑单&nbsp;&gt;</a>&ndash;&gt;-->
<!--</p>-->
<!--{{/promotionInfos}}-->
<!--</div>-->
{{/if}}--}}
</div>
{{/advanceCart}}
{{#ordinaryCart}}
<div data-role="ordinary">
{{#pools}}
<div class="promotion-pool {{#unless @first}}mt20{{/unless}}" data-role="promotion-pool">
{{#if promotionInfos}}
<div class="gift-sell mt20">
{{#promotionInfos}}
{{>mix/cart/cart-promotion-info}}
{{/promotionInfos}}
</div>
{{/if}}
{{#if subs}}
<div class="cart-table">
{{#each subs}}
<ul class="table {{#isBrandGroup}}table-group{{/isBrandGroup}}">
{{#each goodsList}}
{{> mix/cart/cart-item}}
{{/each}}
</ul>
{{/each}}
</div>
{{/if}}
{{#if goodsList}}
<div class="cart-table">
<ul class="table {{#isBrandGroup}}table-group{{/isBrandGroup}}">
{{#goodsList}}
{{> mix/cart/cart-item}}
{{/goodsList}}
</ul>
</div>
{{/if}}
</div>
{{/pools}}
<!-- 全场已选择的 加价购+赠品 -->
{{#if goodsList}}
<div class="cart-table mt20">
<ul class="table">
{{#each goodsList}}
{{> mix/cart/cart-item}}
{{/each}}
</ul>
</div>
{{/if}}
{{#if offShelves}}
<div class="mt20">
<div class="cart-table">
<ul class="table">
{{#offShelves}}
{{> mix/cart/cart-item}}
{{/offShelves}}
</ul>
</div>
</div>
{{/if}}
<!-- -->
{{#if soldOuts}}
<div class="mt20">
<div class="cart-table">
<ul class="table">
{{#soldOuts}}
{{> mix/cart/cart-item}}
{{/soldOuts}}
</ul>
</div>
</div>
{{/if}}
<!--可选的加价购商品 -->
<!--priceGifts-->
<!--可选择的赠品-->
<!--gifts-->
{{#if hasGlobalBlock}}
<div class="gift-sell mt20">
{{#giftsPromotionInfos}}
{{>mix/cart/cart-promotion-info}}
{{/giftsPromotionInfos}}
{{#priceGiftsPromotionInfos}}
{{>mix/cart/cart-promotion-info}}
{{/priceGiftsPromotionInfos}}
{{#promotionInfos}}
{{#and (eq promotionId 0) tag}}
<p class="gift-sell-info">{{#if tag}}<code class="order-pay-mark">{{tag}}</code>{{/if}}
{{promotionTitle}}
<!--<a class="btn-clear blue" data-together-id="6">去凑单&nbsp;&gt;</a>-->
</p>
{{/and}}
{{/promotionInfos}}
</div>
{{/if}}
</div>
{{/ordinaryCart}}
{{#stat}}
<!-- 总价计算 -->
<div class="cartnew-sum">
{{#unless ../isEmpty}}
<div class="left">
<a href="javascript:void(0);" class="btn_h"
style="display:none;"><span>清空商品</span></a>
<i class="cart-item-check iconfont" id="cbSelAllGoods"></i>
<span class="check-all-sum">全选</span>
<a class="delAll delete-all-sel" href="javascript:void(0);">删除选中商品</a>
<a class="removeAll remove-all-2fav" href="javascript:void(0);">移入收藏夹</a>
<a class="emptyDisabled clean-all-disable"
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;¥&nbsp;{{discountAmount}}</b></p>{{/if}}
<!--<p>优惠码/优惠券:<b>¥&nbsp;8888.00</b></p>-->
<p class="sum">
应付金额(不含邮费):<strong><kbd>¥&nbsp;</kbd>{{lastOrderAmount}}</strong></p>
</div>
</div>
<div class="cartnew-submit" id="pay-sum">
<!--<span>添加礼品袋</span>-->
<a href="javascript:void(0);"
id="Y_SubmitBtn"
class="btn-account"
{{#if mix}}data-mix="true"{{/if}}
{{#if ensureUrl}}data-ensureurl="{{ensureUrl}}"{{/if}}
{{#if noSelectGiftTip}}data-noSelectGiftTip="true"{{/if}}>去结算</a>
</div>
{{/stat}}
{{#if deleteShop}}
<div class="cart-del-goods">
<div class="cart-del-goods-title">已删除商品,您可以重新购买或移入收藏:</div>
<ul id="Y_delReselWrap">
{{#each deleteShop}}
<li data-sku="{{productSku}}"
data-promotionid="{{promotionId}}"
data-num="{{productNum}}">
<span class="good-name" style="width: 392px;">
<a href="{{link}}" target="_blank" title="{{productTitle}}">{{productTitle}}</a>
</span>
<span class="good-price" style="width: 148px;">{{productPrice}}</span>
<span class="good-num" style="width: 128px;">{{productNum}}</span>
<span class="good-operate" style="width: 260px;">
<a href="javascript:void(0);" data-role="readd2cart">重新购买</a>
<a href="javascript:void(0);" data-role="reFav">移入收藏</a>
</span>
</li>
{{/each}}
</ul>
</div>
{{/if}}
{{> mix/cart/cart-pre-sell-tpl }}
</div>
{{/if}}
... ...
... ... @@ -2,13 +2,13 @@
<div class="body-modal-black"></div>
<div class="mmodal-dialog cart-preSell-dialog" style="top:50px;margin-left: -267px;">
<div class="close" data-role="mdialog-close">
<i class="iconfont">&#xe60d;</i>
<i class="iconfont">&#xe6ee;</i>
</div>
<div class="content">
<div class="detail-body">
{{#advanceCart}}
<div class="slide-img">
<p class="sell-class-title">预售商品<strong>{{stat.selectedGoodsCount}}</strong>&nbsp;&nbsp;&nbsp;总金额<strong>&nbsp;{{stat.lastOrderAmount}}</strong></p>
<p class="sell-class-title">预售商品<strong>{{stat.selectedGoodsCount}}</strong>&nbsp;&nbsp;&nbsp;总金额<strong>¥&nbsp;{{stat.lastOrderAmount}}</strong></p>
<div class="side-img-dd">
<div class="side-img-container">
<ul class="img-list">
... ... @@ -35,7 +35,7 @@
</div>
</div>
</div>
<a class="btn-account" href="{{ensureUrl}}">去结算</a>
<a class="btn-account" data-url="{{ensureUrl}}" data-type="A">去结算</a>
{{/advanceCart}}
{{#ordinaryCart}}
<div class="slide-img">
... ... @@ -81,27 +81,10 @@
</div>
</div>
</div>
<a class="btn-account" href="{{ensureUrl}}">去结算</a>
<a class="btn-account" data-url="{{ensureUrl}}" data-type="O">去结算</a>
{{/ordinaryCart}}
<p class="pre-sell-tip">温馨提示:您需要分开结算【预售商品】和【普通商品】</p>
</div>
</div>
</div>
</div>
<!--
<div class="yoho-dialog cart-preSell-dialog"
data-role="cart-pre-sell"
style="margin-top:-200px;margin-left: -350px; display:none;">
<span class="close">
<i class="iconfont">&#xe60d;</i>
</span>
<div class="content">
<div class="detail-body">
</div>
</div>
</div>
-->
... ...
{{#if isGift}}
{{#if isNotReach}}
<a class="order-pay-link" href="javascript:void(0);"
data-role="gift-view-btn">查看赠品</a>{{/if}}
{{#if isSelected}}
<a class="order-pay-link" href="javascript:void(0);"
data-role="gift-resel-btn">重选赠品</a>
{{else}}
{{#if isReach}}
{{#if isEmpty}}
<a class="order-pay-link" href="javascript:void(0);">已抢光</a>
{{else}}
{{#if isGift}}
{{#if isNotReach}}
<a class="order-pay-link" href="javascript:void(0);"
data-role="gift-sel-btn">领赠品</a>{{/if}}
data-role="gift-view-btn">查看赠品</a>{{/if}}
{{#if isSelected}}
<a class="order-pay-link" href="javascript:void(0);"
data-role="gift-resel-btn">重选赠品</a>
{{else}}
{{#if isReach}}
<a class="order-pay-link" href="javascript:void(0);"
data-role="gift-sel-btn">领赠品</a>{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{#if isPriceGift}}
{{#if isSelected}}
<a href="javascript:void(0);"
class="order-pay-link"
data-role="pg-resel-btn">重新换购</a>
{{else}}
{{#if isReach}}
{{#if isPriceGift}}
{{#if isSelected}}
<a href="javascript:void(0);"
class="order-pay-link"
data-role="pg-sel-btn">去换购</a>
class="order-pay-link"
data-role="pg-resel-btn">重新换购</a>
{{else}}
{{#if isReach}}
<a href="javascript:void(0);"
class="order-pay-link"
data-role="pg-sel-btn">去换购</a>
{{/if}}
{{/if}}
{{/if}}
{{/if}}
... ...
<div class="gift-sell-info"
data-role="promotion-wrap"
data-promotionid="{{promotionId}}">
<code class="order-pay-mark {{#unless isReach}}order-pay-mark-white{{/unless}}">
{{tag}}
</code>{{{promotionTitle}}}
{{> mix/cart/cart-promotion-btn}}
{{#if isNotReach}}
<a class="btn-clear blue order-pay-link" target="_blank" href="{{promotionPageUrl}}">去凑单&nbsp;<i class="iconfont">&#xe6ef;</i></a>
{{/if}}
</div>
... ...
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 Tue Jan 24 14:14:23 2017
Created by FontForge 20120731 at Thu Feb 16 19:45:08 2017
By admin
</metadata>
<defs>
... ... @@ -276,7 +276,8 @@ d="M958 589q0 15 -10.5 25.5t-25.5 10.5t-26 -10l-384 -384l-384 384q-11 10 -26 10t
d="M512 -62q-91 0 -173.5 35.5t-142 95t-95 142t-35.5 173.5t35.5 173.5t95 142t142 95t173.5 35.5t173.5 -35.5t142 -95t95 -142t35.5 -173.5t-35.5 -173.5t-95 -142t-142 -95t-173.5 -35.5zM512 766q-104 0 -192 -51t-139 -139t-51 -192t51 -192t139 -139t192 -51t192 51
t139 139t51 192t-51 192t-139 139t-192 51zM464 592q0 -20 14 -34t34 -14t34 14t14 34t-14 34t-34 14t-34 -14t-14 -34zM512 128q-13 0 -22.5 9.5t-9.5 22.5v288q0 13 9.5 22.5t22.5 9.5t22.5 -9.5t9.5 -22.5v-288q0 -13 -9.5 -22.5t-22.5 -9.5z" />
<glyph glyph-name="yuanxingweixuanzhong" unicode="&#xe6c3;"
d="M512 -64q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5t-131.5 -316.5t-316.5 -131.5zM512 768q-159 0 -271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5t-112.5 271.5t-271.5 112.5z" />
d="M512 -126q-104 0 -198 40.5t-162.5 109t-109 162.5t-40.5 198t40.5 198t109 162.5t162.5 109t198 40.5t198 -40.5t162.5 -109t109 -162.5t40.5 -198t-40.5 -198t-109 -162.5t-162.5 -109t-198 -40.5zM512 821q-89 0 -170 -34.5t-139.5 -93t-93 -139.5t-34.5 -170
t34.5 -170t93 -139.5t139.5 -93t170 -34.5t170 34.5t139.5 93t93 139.5t34.5 170t-34.5 170t-93 139.5t-139.5 93t-170 34.5z" />
<glyph glyph-name="Fill" unicode="&#xe6c9;"
d="M512 52q-34 0 -58.5 24.5t-24.5 59t24.5 58.5t58.5 24t58.5 -24t24.5 -58.5t-24.5 -59t-58.5 -24.5zM457 660q0 23 16 39.5t39 16.5t39 -16.5t16 -39.5v-304q0 -22 -16 -38.5t-39 -16.5t-39 16.5t-16 38.5v304zM512 896h-6q-104 0 -199 -40.5t-163.5 -109t-109 -163.5
t-40.5 -199t40.5 -199t109 -163.5t163.5 -109t199 -40.5h6h6q104 0 199 40.5t163.5 109t109 163.5t40.5 199t-40.5 199t-109 163.5t-163.5 109t-199 40.5h-6z" />
... ... @@ -329,5 +330,18 @@ t90.5 135t135 90.5t163 33.5zM237 64l595 595q102 -123 102 -275q0 -114 -55.5 -211t
<glyph glyph-name="shiliangzhinengduixiang1" unicode="&#xe6e2;"
d="M515 -128q60 0 105.5 40t52.5 98h-322q11 -58 57 -98t107 -40zM852 225q-15 31 -15 123v113q0 111 -56 200t-149 127q-7 47 -42 77.5t-81 30.5q-51 0 -87 -36q-26 -27 -35 -72q-93 -42 -149 -131t-56 -196v-113q0 -97 -16 -128q-30 -10 -46 -20q-20 -31 -20 -57
q0 -31 24 -53.5t58 -22.5h660q34 0 58 22.5t24 53.5q-4 31 -24.5 54.5t-47.5 27.5z" />
<glyph glyph-name="weibiaoti-" unicode="&#xe6ed;"
d="M512 896q-212 0 -362 -150t-150 -362t150 -362t362 -150t362 150t150 362t-150 362t-362 150zM512 -39q-114 0 -211.5 57t-154.5 154.5t-57 211.5t57 211.5t154.5 154.5t211.5 57t211.5 -57t154.5 -154.5t57 -211.5t-57 -211.5t-154.5 -154.5t-211.5 -57zM512 316
q18 0 31 13t13 31v246q0 18 -13 31t-31 13t-31 -13t-13 -31v-246q0 -18 13 -31t31 -13zM512 183zM444 182.5q0 -28.5 20 -48.5t48 -20t48 20t20 48.5t-20 48.5t-48 20t-48 -20t-20 -48.5z" />
<glyph glyph-name="weibiaoti-1" unicode="&#xe6ee;"
d="M922 883l-410 -409l-410 409l-89 -89l409 -410l-409 -410l89 -89l410 409l410 -409l89 89l-409 410l409 410z" />
<glyph glyph-name="weibiaoti-2" unicode="&#xe6ef;"
d="M230 759l367 -366l-367 -359l120 -119l367 358l119 120l-119 119l-367 367z" />
<glyph glyph-name="weibiaoti-3" unicode="&#xe6f0;"
d="M512 446l-196 -202l-39 39l196 202l39 39l39 -39l196 -202l-39 -39z" />
<glyph glyph-name="weibiaoti-4" unicode="&#xe6f1;"
d="M512 306l-196 201l-39 -45l235 -235l235 235l-39 45z" />
<glyph glyph-name="weibiaoti-5" unicode="&#xe6f2;"
d="M512 384zM32 384q0 -130 64.5 -240.5t175 -175t240.5 -64.5t240.5 64.5t175 175t64.5 240.5t-64.5 240.5t-175 175t-240.5 64.5t-240.5 -64.5t-175 -175t-64.5 -240.5z" />
</font>
</defs></svg>
... ...
No preview for this file type
No preview for this file type
... ... @@ -2,13 +2,6 @@
<p class="sell-class-title">
{{#if isGift}}选赠品:{{/if}}<!--选赠品:-->
{{#if isPriceGift}}{{promotionTitle}}{{/if}}
{{!--<em class="slide-img-title">
<span class="active">{{promotionTitle}}</span>
<!--<code class="spacing">|</code>
<span>59元加价购</span>
<code class="spacing">|</code>
<span>99元加价购</span>-->
</em>--}}
</p>
<div class="side-img-dd">
<ul class="img-list">
... ... @@ -21,7 +14,7 @@
{{#if isGift}}data-isgift="{{isGift}}"{{/if}}>
<span class="hide goods-id">{{goods_id}}</span>
<div class="good">
<a href="javascript:void(0)" target="_blank"> {{!--{{link}}--}}
<a href="javascript:void(0);"> {{!--{{link}}--}}
<img class="lazy" src="{{imgCover}}"/>
</a>
</div>
... ... @@ -38,7 +31,8 @@
<div class="product-detail-info"
data-promotionid="{{promotionId}}"
data-maxselectnum="{{maxSelectNumber}}"
{{#if isSwap}}data-isswap="{{isSwap}}"{{/if}}>
{{#if isSwap}}data-isswap="{{isSwap}}"{{/if}}
{{#if isView}}data-isview="{{isView}}"{{/if}}>
{{#productInfo}}
{{> cart-product-info-tpl}}
{{/productInfo}}
... ...
... ... @@ -30,14 +30,14 @@
<div class="price">
{{#if salePrice}}
<span class="oldprice">活动价:<del>{{marketPrice}}</del></span>
<span class="newprice">现价:<b class="promotion-price">{{salePrice}}</b></span>
<span class="newprice">&#12288;价:<b class="promotion-price">{{salePrice}}</b></span>
{{^}}
<span class="newprice {{#presalePrice}}none{{/presalePrice}}">原价:<b class="promotion-price">{{marketPrice}}</b></span>
<span class="newprice {{#presalePrice}}none{{/presalePrice}}">&#12288;价:<b class="promotion-price">{{marketPrice}}</b></span>
{{/if}}
{{#if presalePrice}}
<span class="newprice">预售价:<b class="promotion-price">{{presalePrice}}</b></span>
<span class="oldprice">原价:<del>{{marketPrice}}</del></span>
<span class="oldprice">&#12288;价:<del>{{marketPrice}}</del></span>
{{/if}}
{{#arrivalDate}}
<span class="arrivalDate">上市期:{{arrivalDate}}</span>
... ... @@ -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" style="display:none;"><i class="iconfont">&#xe6ed;</i>请选择尺码</p>
<!--<p class="size-p">内长&nbsp;25.5com</p>-->
</dt>
</dl>
... ... @@ -85,8 +85,8 @@
<dt>
<div class="amount_wrapper">
<input type="text" id="num" class="num" value="1" readonly="readonly">
<a class="amount cut"><i class="iconfont">&#xe6c1;</i></a>
<a class="amount add"><i class="iconfont">&#xe6c0;</i></a>
<a class="amount cut"><i class="iconfont">&#xe6f1;</i></a>
<a class="amount add"><i class="iconfont">&#xe6f0;</i></a>
</div>
</dt>
</dl>
... ...