Authored by 陈峰

merge release/5.5

... ... @@ -29,6 +29,7 @@ const couponData = (params) => {
}
);
} else if (status1) {
delete elem.overState;
elem.employbg = true;
}
return elem;
... ...
... ... @@ -319,6 +319,29 @@ const getOrders = (params) => {
/* 是否是虚拟商品 */
let isTickets = order.virtual_type && parseInt(order.virtual_type, 10) === 3;
/* 修改地址按钮控制 */
let modifyAddress = {
modifyAddress: false,
modifyAddressUrl: ''
};
if (_.find(value.links, o => {
return o === 'modifyAddress';
})) {
modifyAddress.modifyAddress = true;
modifyAddress.modifyAddressUrl = helpers.urlFormat('/home/orders/addressModify', {
orderCode: value.order_code,
areaCode: _.get(value, 'delivery_address.area_code', '')
});
// 如果不允许修改省
if (value.is_support_change_province !== 'Y' &&
!_.get(value, 'delivery_address.province_area_code', false)) {
modifyAddress.modifyAddressUrl += '&provinceAreaCode=' +
_.get(value, 'delivery_address.province_area_code', '');
}
}
Object.assign(perOrder, {
orderNum: value.order_code,
orderStatus: value.status_str,
... ... @@ -327,7 +350,8 @@ const getOrders = (params) => {
detailUrl: helpers.urlFormat('/home/orderdetail', {order_code: value.order_code}),
count: value.buy_total,
isVirtual: isTickets,
isDepositAdvance: value.attribute * 1 === 9// 定金预售
isDepositAdvance: value.attribute * 1 === 9, // 定金预售
modifyAddress: modifyAddress
});
/* 如果运费大于0,会显示运费 */
... ...
... ... @@ -260,9 +260,15 @@ const orderDetailData = (uid, orderCode) => {
}
// 判断是否可以修改地址
if (orderDetail.canUpdateDeliveryAddress === 'Y') {
if (orderDetail.canUpdateDeliveryAddress === 'Y' && orderDetail.isSupportChangeProvince === 'Y') {
orderDetail = _.assign(orderDetail, {
changeable: true
changeable: true,
addressModify: true
});
} else if (orderDetail.canUpdateDeliveryAddress === 'Y' && orderDetail.isSupportChangeProvince !== 'Y') {
orderDetail = _.assign(orderDetail, {
changeable: false,
addressModify: true
});
}
... ... @@ -286,13 +292,19 @@ const orderDetailData = (uid, orderCode) => {
orderDetail = _.assign(orderDetail, {
goodsAmount: orderDetail.paymentAmount,
url: '/home/orders/addressModify?orderCode=' + orderCode +
'&areaCode=' + orderDetail.areaCode
newUrl: helpers.urlFormat('/home/orders/addressModify', {
orderCode: orderCode,
areaCode: orderDetail.areaCode
}),
url: helpers.urlFormat('/home/addressModify', {
orderCode: orderCode,
areaCode: orderDetail.areaCode
})
});
// 如果允许修改省
if (orderDetail.isSupportChangeProvince === 'Y' && orderDetail.provinceAreaCode) {
orderDetail.url = orderDetail.url + '&provinceAreaCode=' + orderDetail.provinceAreaCode;
// 如果不允许修改省
if (orderDetail.isSupportChangeProvince !== 'Y' && orderDetail.provinceAreaCode) {
orderDetail.newUrl = orderDetail.newUrl + '&provinceAreaCode=' + orderDetail.provinceAreaCode;
}
// 为支付的拆单配送信息
... ...
... ... @@ -47,8 +47,7 @@
{{#if sortNameLimits}}
<p>限品类:{{sortNameLimits}}</p>
{{/if}}
<p>特例商品(秒杀、限定、境外、预售{{#if isDiscount}}、3折以下{{/if}}{{#if isDiscount}}、限量{{/if}}等)暂不支持使用优惠券。</p>
<p>特例商品(秒杀、限定、境外、预售{{#if isDiscount}}、3折以下{{/if}}{{#if isLimited}}、限量{{/if}}等)暂不支持使用优惠券。</p>
{{#if explains}}<p>说明:{{explains}}</p>{{/if}}
</div>
</div>
... ...
... ... @@ -22,7 +22,7 @@
{{addressAll}}
</p>
<div class="rest">其他地址<span class="iconfont iconAddress">&#xe614;</span></div>
<div class="rest">其他地址<span class="iconfont icon-address">&#xe614;</span></div>
</div>
</section>
... ... @@ -108,7 +108,24 @@
</ul>
{{/invoice}}
{{#if unpaid}}
<div class="clock">
<ul class="count-down hide">
<li>
<span class="iconfont count-down-icon">&#xe64a;</span>
</li>
<li>
<span class="hours">{{leftTime}}</span>
</li>
</ul>
</div>
{{/if}}
<div class="opt block">
{{!-- 修改地址 --}}
{{#if addressModify}}
<a href="{{newUrl}}" class="btn">修改地址</a>
{{/if}}
{{#if isDepositAdvance}}
<div class="order-opt">
<span class="order-opt-info">请到App完成订单相关操作</span>
... ... @@ -126,19 +143,9 @@
{{/unless}}
{{#if unpaid}}
<ul class="count-down hide">
<li>
<span class="iconfont count-down-icon">&#xe64a;</span>
</li>
<li>
<span class="hours">{{leftTime}}</span>
</li>
</ul>
<span class="btn btn-cancel">取消订单</span>
{{#if payUrl}}
<a href="{{payUrl}}">
<span class="btn btn-pay">立即付款</span>
</a>
<a class="btn btn-pay" href="{{payUrl}}">立即付款</a>
{{/if}}
{{/if}}
... ...
... ... @@ -14,6 +14,12 @@ const domains = {
service: 'http://service-test3.yohops.com:9999/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/',
// api: 'http://api.yoho.yohoops.org/',
// service: 'http://service.yoho.yohoops.org/',
// liveApi: 'http://api.live.yoho.cn/',
// singleApi: 'http://single.yoho.cn/',
imSocket: 'wss://imsocket.yohobuy.com:443',
imCs: 'https://imhttp.yohobuy.com/api',
imServer: 'https://imhttp.yohobuy.com/server'
... ...
... ... @@ -42,6 +42,12 @@
{{#if refundApply}}
<span class="btn refund">申请退款</span>
{{/if}}
{{!-- 修改地址 --}}
{{#if modifyAddress.modifyAddress}}
<a class="btn" href="{{modifyAddress.modifyAddressUrl}}">
<span>修改地址</span>
</a>
{{/if}}
</div>
{{/unless}}
{{/unless}}
... ...
{{#each list}}
<div class="coupon-group" data-coupon-id={{couponId}}>
<div class="coupon-header">{{couponDetailInfomation}}</div>
<div class="coupon-content">
<div class="coupon-content-group1">
<p class="coupon-money">{{couponValue}}</p>
<p>{{rule4ShortName}}</p>
</div>
<div class="coupon-content-group2">
<div class="coupon-content-group2-table">
<div>
{{couponValidity}}
{{#if overState}}<span class="coupon-soon-expire">{{overState}}</span>{{/if}}
</div>
<div>
<div class="left down info-btn">详细信息<i class="iconfont"></i></div>
<div class="right">
{{#if employbg}}
<span class="employ"></span>
{{else if bestowLink}}
<a href="javascript:void(0);" data-link="{{bestowLink}}" class="btn">立即使用</a>
{{/if}}
<div class="coupon-group" data-coupon-id={{couponId}}>
<div class="coupon-header">{{couponDetailInfomation}}</div>
<div class="coupon-content">
<div class="coupon-content-group1">
<p class="coupon-money">{{couponValue}}</p>
<p>{{rule4ShortName}}</p>
</div>
<div class="coupon-content-group2">
<div class="coupon-content-group2-table">
<div>
{{couponValidity}}
{{#if overState}}<span class="coupon-soon-expire">{{overState}}</span>{{/if}}
</div>
<div>
<div class="left down info-btn">详细信息<i class="iconfont"></i></div>
<div class="right">
{{#if employbg}}
<span class="employ"></span>
{{else if bestowLink}}
<a href="javascript:void(0);" data-link="{{bestowLink}}" class="btn">立即使用</a>
{{/if}}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="coupon-footer hide">
{{#if isNoLimit}}
<p>全场通用</p>
{{/if}}
<div class="coupon-footer hide">
{{#if isNoLimit}}
<p>全场通用</p>
{{/if}}
{{#if brandNameLimits}}
<p>限品牌:{{brandNameLimits}}</p>
{{/if}}
{{#if brandNameLimits}}
<p>限品牌:{{brandNameLimits}}</p>
{{/if}}
{{#if sortNameLimits}}
<p>限品类:{{sortNameLimits}}</p>
{{/if}}
{{#if sortNameLimits}}
<p>限品类:{{sortNameLimits}}</p>
{{/if}}
<p>特例商品(秒杀、限定、境外、预售{{#if isDiscount}}、3折以下{{/if}}{{#if isDiscount}}、限量{{/if}}等)暂不支持使用优惠券。</p>
{{#if explains}}<p>说明:{{explains}}</p>{{/if}}
<p>特例商品(秒杀、限定、境外、预售{{#if isDiscount}}、3折以下{{/if}}{{#if isLimited}}、限量{{/if}}等)暂不支持使用优惠券。</p>
{{#if explains}}<p>说明:{{explains}}</p>{{/if}}
</div>
</div>
</div>
{{/each}}
... ...
... ... @@ -109,7 +109,7 @@
color: #f00;
font-size: 24px;
.iconAddress {
.icon-address {
position: static;
font-size: 24px;
}
... ... @@ -201,33 +201,36 @@
font-size: 24px;
}
.count-down {
list-style: none;
padding: 0;
display: inline-block;
text-align: right;
font-size: 24px;
color: #b0b0b0;
float: left;
margin-left: 30px;
margin-top: 20px;
.clock {
width: 100%;
height: 52px;
background-color: #787878;
text-align: center;
.count-down-icon {
margin-top: -8px;
font-size: 30px;
}
.count-down {
list-style: none;
line-height: 56px;
display: inline-block;
font-size: 24px;
color: #fff;
&.hide {
display: none;
}
.count-down-icon {
margin-top: -8px;
font-size: 30px;
}
li {
display: inline-block;
}
&.hide {
display: none;
}
li span {
font-size: 24px;
line-height: 24px;
li {
display: inline-block;
}
li span {
font-size: 24px;
line-height: 24px;
}
}
}
... ...
... ... @@ -45,7 +45,7 @@
.coupon-content {
border-radius: 0 0 10px 10px;
height: 140px;
border-top: 1px dashed #e53333;
border-top: 2px dashed #e53333;
display: table;
padding: 15px 0;
background-color: #f06a6b;
... ... @@ -129,7 +129,7 @@
display: block;
z-index: 2;
right: 37px;
margin-top: -90px;
margin-top: -95px;
background-image: resolve("home/employ.png");
background-size: cover;
}
... ... @@ -139,7 +139,7 @@
.coupon-footer {
background-color: #f06a6b;
padding: 20px;
font-size: 20px;
font-size: 18px;
border-radius: 10px;
color: #fff;
border-top: 1px dashed #fff;
... ...