Authored by 郭成尧

merge

... ... @@ -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,会显示运费 */
... ...
... ... @@ -286,13 +286,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;
}
// 为支付的拆单配送信息
... ...
... ... @@ -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 changeable}}
<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}}
... ...
... ... @@ -15,13 +15,11 @@ const domains = {
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,13 @@
{{#if refundApply}}
<span class="btn refund">申请退款</span>
{{/if}}
{{!-- 修改地址 --}}
{{#if modifyAddress.modifyAddress}}
<a class="btn" href="{{modifyAddress.modifyAddressUrl}}">
<span>修改地址</span>
</a>
{{/if}}
</div>
{{/unless}}
{{/unless}}
... ...
... ... @@ -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;
}
}
}
... ...