Authored by htoooth

merge

... ... @@ -592,7 +592,10 @@ const formatCart = (cartDataRet, uid, shoppingKey, cartDelList) => {
promotionInfos: formatPromotionInfos(_.get(ordCartData, 'promotion_info'), goodsList),
stat: formatShoppingCartData(_.get(ordCartData, 'shopping_cart_data')),
ensureUrl: helpers.urlFormat('/cart/ensure')
ensureUrl: helpers.urlFormat('/cart/ensure'),
// 免运费提示
tips: _.get(ordCartData, 'shipping_cost_prompt.shipping_cost_tips', '')
};
let advStat = result.advanceCart.stat;
... ...
... ... @@ -36,7 +36,7 @@ const ORDER_OP_ALL = [
type: 'closeOrder',
name: '取消订单',
cancelOrder: true,
hrefFun: () => 'javascript:void(0)'
hrefFun: () => 'javascript:void(0)' // eslint-disable-line
},
{
type: 'buyNow',
... ... @@ -48,13 +48,13 @@ const ORDER_OP_ALL = [
type: 'getExpress',
name: '查看物流',
express: true,
hrefFun: () => 'javascript:void(0)'
hrefFun: () => 'javascript:void(0)' // eslint-disable-line
},
{
type: 'confirm',
name: '确认订单',
confirmReceived: true,
hrefFun: () => 'javascript:void(0)'
hrefFun: () => 'javascript:void(0)' // eslint-disable-line
},
{
type: 'delOrder',
... ... @@ -108,7 +108,7 @@ const ORDER_OP_ALL = [
type: 'refundApply',
name: '申请退款',
refund: true,
hrefFun: () => 'javascript:void(0)'
hrefFun: () => 'javascript:void(0)' // eslint-disable-line
},
{
type: 'deposit',
... ... @@ -600,10 +600,13 @@ const _getPackageInfo = (cartInfo) => {
return [];
}
return _.get(cartInfo, 'package_list', []).map((pack, i) => {
let newPack = {};
newPack.title = (pack.supplier_id === 0) ? `包裹${i}:总仓发货` : `包裹${i}:异地调拨`;
return _.get(cartInfo, 'package_list', []).map((pack) => {
let newPack = {
supplierId: pack.supplier_id,
fee: pack.shopping_cost === '0.00' ? '' : pack.shopping_cost,
orign: pack.shopping_orig_cost,
count: pack.shopping_cut_cost
};
newPack.goodlist = _.get(pack, 'goods_list', []).map((good) => {
let tagInfo = ChannelConfig.orderTagArr[good.goods_type] || '';
... ... @@ -616,10 +619,6 @@ const _getPackageInfo = (cartInfo) => {
};
});
newPack.fee = pack.shopping_cost === '0.00' ? '' : pack.shopping_cost;
newPack.orign = pack.shopping_orig_cost;
newPack.count = pack.shopping_cut_cost;
return newPack;
});
};
... ... @@ -757,7 +756,7 @@ const _getOrderDetail = co(function * (uid, orderId) {
orderDetail.is_cancel, orderDetail.payment_status, orderDetail.payment_type,
orderDetail.order_type, orderDetail.attribute, orderDetail.refund_status);
detail.package = _getPackageInfo(orderDetail);
detail.packages = _getPackageInfo(orderDetail);
// 判断是否可以修改地址
if (orderDetail.can_update_delivery_address === 'Y') {
... ...
... ... @@ -161,16 +161,13 @@
{{#if packages}}
<div id="differentOrder" class="differentOrder">
<p class="warn">
温馨提示:您购买的商品<span class="red">分属不同的仓库</span>,需要调拨,将被拆分为多个包裹送达
<span class="why">
</span>
温馨提示:您购买的商品<span class="red">分属不同仓库</span>,需要品牌商调货,<span class="red">预计3-5天内发货给您</span>
<span class="why"></span>
</p>
<div id="differentBag" class="differentBag">
{{#each packages}}
<div class="bag">
<h3>
{{title}}
</h3>
<h3>包裹{{math @index '+' 1}}:{{#isEqual supplierId '0'}}总仓发货{{^}}异地调拨 <em class="red">预计3-5天内发货给您</em>{{/isEqual}}</h3>
<p class="pre">
</p>
<div class="bagDetil">
... ...
... ... @@ -145,8 +145,8 @@ const searchHistory = (req, res) => {
});
ResData['data'] = data; //eslint-disable-line
res.type('text/plain');
res.send(JSON.stringify(ResData));
res.type('text/javascript');
res.send(req.query.callback + '(' + JSON.stringify(ResData) + ')');
};
... ...
... ... @@ -21,7 +21,7 @@
</div>
{{#advanceCart}}
<div class="mb40" data-role="advance">
<div class="mb20" data-role="advance">
<!-- 预售商品 -->
<div class="pre-sell">
<code>预售商品</code>预售商品不参加活动,不可使用优惠券,不同上市期的商品我们将为您先到先发。
... ... @@ -73,6 +73,11 @@
{{#ordinaryCart}}
<div data-role="ordinary">
<!-- 预售商品 -->
<div class="pre-sell ordinary-sell">
<code>普通商品</code> {{tips}}
</div>
{{#pools}}
<div class="promotion-pool {{#unless @first}}mt20{{/unless}}" data-role="promotion-pool">
{{#if promotionInfos}}
... ...
... ... @@ -909,9 +909,12 @@ function actionAddKeyWords() {
*/
function searchSuggestHistory() {
var param = {
return_type: 'jsonp',
query: encodeURIComponent($searchKey.val()) || ''
};
$.getJSON('//search.yohobuy.com/product/search/history?query=' +
encodeURIComponent($searchKey.val()), function(jsonData) {
$.getJSON('//search.yohobuy.com/product/search/history?callback=?', param, function(jsonData) {
if ($searchKey.val() === '') {
... ... @@ -941,7 +944,7 @@ function searchSuggestHistory() {
* @return {[type]} [description]
*/
$searchKey.mouseenter(function() {
$searchKey.focus(function() {
var val = $.trim($(this).val());
... ...
... ... @@ -274,6 +274,9 @@
margin-right: 30px;
}
}
.ordinary-sell {
padding-top: 0px;
}
.gift-sell {
border: 1px solid #e0e0e0;
... ...
... ... @@ -185,16 +185,16 @@
position: relative;
width: 100%;
margin-top: 10px;
.red{
color:red;
}
.warn{
text-align: center;
background: #FEFBD5;
font: initial;
height: 40px;
line-height: 40px;
font-size: 16px;
.red{
color:red;
}
font-size: 14px;
.why{
background: url(/order/why.png) no-repeat;
width: 26px;
... ... @@ -211,11 +211,11 @@
position: absolute;
width: 0;
height: 0;
border-bottom:10px solid #000000;
border-bottom: 10px solid #000000;
border-left: 10px solid transparent;
border-right:10px solid transparent;
top:-10px;
right:113px ;
border-right: 10px solid transparent;
top: -10px;
right: 136px;
}
.differentBag{
display: none;
... ... @@ -223,8 +223,8 @@
right: -10px;
top:40px;
width: 510px;
padding:0px 50px;
background:#FFFFFF ;
padding: 0px 50px;
background: #FFFFFF;
z-index: 1;
border: solid 1px #000000;
font-size: 14px;
... ...
location ~ / {
proxy_redirect off;
proxy_pass http://yohobuy-node;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
... ...