Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Rock Zhang
2016-01-28 15:33:05 +0800
Commit
8d3b3f7eeaea4547e12595fdf302420f04be2494
1 parent
7f3bcd66
修复订单详情页快递信息的显示(现在交易成功的订单也显示物流信息)
Code Review By Rock Zhang
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
144 additions
and
137 deletions
template/m.yohobuy.com/actions/index/home/order-detail.phtml
yohobuy/m.yohobuy.com/application/models/Home/Order.php
template/m.yohobuy.com/actions/index/home/order-detail.phtml
View file @
8d3b3f7
{
{>
layout/header
}
}
<div
class=
"order-detail-page yoho-page"
>
{
{#
orderDetail
}
}
<div
id=
"order-detail"
data-id=
"{{orderNum}}"
>
<section
class=
"owner-info block"
>
<span
class=
"iconfont"
>
631
;</span>
<div
class=
"beside-icon"
>
<p
class=
"name-phone"
>
{
{name
}
}
<span>
{
{phoneNum
}
}</span>
</p>
<p
class=
"address"
>
{
{address
}
}
</p>
</div>
</section>
<div
id=
"order-detail"
data-id=
"{{orderNum}}"
>
<section
class=
"owner-info block"
>
<span
class=
"iconfont"
>
631
;</span>
<section
class=
"order-status block"
>
<div
class=
"status sub"
>
<span
class=
"iconfont"
>
632
;</span>
<p
class=
"beside-icon sub-content"
>
<span
class=
"sub-title"
>
{
{orderStatus
}
}</span>
<span>订单编号:
{
{orderNum
}
}</span>
<span>下单时间:
{
{orderTime
}
}</span>
</p>
</div>
{
{#if
unreceived
}
}
{
{#if
logisticsUrl
}
}
<a
class=
"logistics sub"
href=
"{{logisticsUrl}}"
>
<span
class=
"iconfont"
>
630
;</span>
<p
class=
"beside-icon sub-content"
>
<span
class=
"sub-title"
>物流信息</span>
<span>物流公司:
{
{logisticsCompany
}
}</span>
<span>快递单号:
{
{logisticsNum
}
}</span>
</p>
<span
class=
"iconfont icon-right"
>
614
;</span>
</a>
{
{/if
}
}
{
{/if
}
}
</section>
<div
class=
"beside-icon"
>
<p
class=
"name-phone"
>
{
{name
}
}
<span>
{
{phoneNum
}
}</span>
</p>
<section
class=
"goods block"
>
{
{#
goods
}
}
{
{>
me/order/good
}
}
{
{/
goods
}
}
</section>
<p
class=
"address"
>
{
{address
}
}
</p>
</div>
</section>
<section
class=
"order-status block"
>
<div
class=
"status sub"
>
<span
class=
"iconfont"
>
632
;</span>
<ul
class=
"cost block"
>
<li>
商品总金额
<span>
{
{sumPrice
}
}</span>
</li>
{
{#if
salePrice
}
}
<li>
活动金额
<span>
{
{salePrice
}
}</span>
</li>
{
{/if
}
}
<li>
运费
<span>
{
{freight
}
}</span>
</li>
{
{#if
promo_code_amount
}
}
<li>
优惠码
<span>
{
{promo_code_amount
}
}</span>
</li>
{
{/if
}
}
{
{#if
coupon
}
}
<li>
优惠券
<span>
{
{coupon
}
}</span>
</li>
{
{/if
}
}
{
{#if
yohoCoin
}
}
<li>
YOHO币
<span>
{
{yohoCoin
}
}</span>
</li>
{
{/if
}
}
<li>
实付金额
<span>
{
{price
}
}</span>
</li>
</ul>
<p
class=
"beside-icon sub-content"
>
<span
class=
"sub-title"
>
{
{orderStatus
}
}</span>
<span>订单编号:
{
{orderNum
}
}</span>
<span>下单时间:
{
{orderTime
}
}</span>
</p>
</div>
{
{#if
logisticsUrl
}
}
<a
class=
"logistics sub"
href=
"{{logisticsUrl}}"
>
<span
class=
"iconfont"
>
630
;</span>
<div
class=
"opt block"
>
{
{#unless
unreceived
}
}
{
{#unless
unpaid
}
}
<span
class=
"btn btn-del"
>删除订单</span>
{
{/unless
}
}
{
{/unless
}
}
<p
class=
"beside-icon sub-content"
>
<span
class=
"sub-title"
>物流信息</span>
<span>物流公司:
{
{logisticsCompany
}
}</span>
<span>快递单号:
{
{logisticsNum
}
}</span>
</p>
<span
class=
"iconfont icon-right"
>
614
;</span>
</a>
{
{/if
}
}
</section>
{
{#if
unpaid
}
}
<span
class=
"btn btn-cancel"
>取消订单</span>
{
{#if
payUrl
}
}
<a
href=
"{{payUrl}}"
>
<span
class=
"btn btn-pay"
>立即付款</span>
</a>
{
{/if
}
}
{
{/if
}
}
<section
class=
"goods block"
>
{
{#
goods
}
}
{
{>
me/order/good
}
}
{
{/
goods
}
}
</section>
{
{#if
logisticsUrl
}
}
<a
href=
"{{logisticsUrl}}"
>
<span
class=
"btn btn-check-logistics"
>查看物流</span>
</a>
{
{/if
}
}
</div>
<ul
class=
"cost block"
>
<li>
商品总金额
<span>
{
{sumPrice
}
}</span>
</li>
{
{#if
salePrice
}
}
<li>
活动金额
<span>
{
{salePrice
}
}</span>
</li>
{
{/if
}
}
<li>
运费
<span>
{
{freight
}
}</span>
</li>
{
{#if
promo_code_amount
}
}
<li>
优惠码
<span>
{
{promo_code_amount
}
}</span>
</li>
{
{/if
}
}
{
{#if
coupon
}
}
<li>
优惠券
<span>
{
{coupon
}
}</span>
</li>
{
{/if
}
}
{
{#if
yohoCoin
}
}
<li>
YOHO币
<span>
{
{yohoCoin
}
}</span>
</li>
{
{/if
}
}
<li>
实付金额
<span>
{
{price
}
}</span>
</li>
</ul>
<div
class=
"opt block"
>
{
{#unless
unreceived
}
}
{
{#unless
unpaid
}
}
<span
class=
"btn btn-del"
>删除订单</span>
{
{/unless
}
}
{
{/unless
}
}
{
{#if
unpaid
}
}
<span
class=
"btn btn-cancel"
>取消订单</span>
{
{#if
payUrl
}
}
<a
href=
"{{payUrl}}"
>
<span
class=
"btn btn-pay"
>立即付款</span>
</a>
{
{/if
}
}
{
{/if
}
}
{
{#if
logisticsUrl
}
}
<a
href=
"{{logisticsUrl}}"
>
<span
class=
"btn btn-check-logistics"
>查看物流</span>
</a>
{
{/if
}
}
</div>
</div>
{
{/
orderDetail
}
}
</div>
<script>_ozprm=
"orderid={{orderCode}}&ordertotal={{orderTotal}}"
;</script>
<script
type=
"text/javascript"
src
=
"http://static.yohobuy.com/m/v1/js/AG_Tracking.js"
></script>
<script>_ozprm
=
"orderid={{orderCode}}&ordertotal={{orderTotal}}"
;</script>
<script
type=
"text/javascript"
src=
"http://static.yohobuy.com/m/v1/js/AG_Tracking.js"
></script>
<script
type=
"text/javascript"
>
var
_agq
=
_agq
||
[]
;
_agq.push(
[
'_cid'
,
'
415
'
]
);
//生成value
_agq.push(
[
'_eid'
,
'
102
'
]
);
//生成value
_agq.push(
[
'_orderSum'
,
"{{orderTotal}}"
]
);//订单金额,客户在页面填写
_agq.push(
[
'_orderNo'
,
"{{orderCode}}"
]
);//订单号,客户在页面填写
_agq.push(
[
'_orderNew'
,
"{{isOldUser}}"
]
);//是否新客单,客户标记是为true否为
false
_agq.push(
[
'_orderCount'
,
"{{orderCount}}"
]
);//订单货品数目,客户填写
ag_send(_agq);
var
_agq
=
_agq
||
[]
;
_agq.push(
[
'_cid'
,
'
415
'
]
);
//生成value
_agq.push(
[
'_eid'
,
'
102
'
]
);
//生成value
_agq.push(
[
'_orderSum'
,
"{{orderTotal}}"
]
);//订单金额,客户在页面填写
_agq.push(
[
'_orderNo'
,
"{{orderCode}}"
]
);//订单号,客户在页面填写
_agq.push(
[
'_orderNew'
,
"{{isOldUser}}"
]
);//是否新客单,客户标记是为true否为
false
_agq.push(
[
'_orderCount'
,
"{{orderCount}}"
]
);//订单货品数目,客户填写
ag_send(_agq);
var
__order_code
=
"{{orderCode}}"
;
var
__order_amount
=
"{{orderTotal}}"
;
var
__order_user
=
"{{isOldUser}}"
;
var
__order_goods_num
=
{
{orderCount
}
};
var
__order_uid
=
'
{
{uid
}
}';
var
__order_code
=
"{{orderCode}}"
;
var
__order_amount
=
"{{orderTotal}}"
;
var
__order_user
=
"{{isOldUser}}"
;
var
__order_goods_num
=
{
{orderCount
}
};
var
__order_uid
=
'
{
{uid
}
}';
var
_fxcmd=_fxcmd||
[]
;
_fxcmd.push(
[
'trackOrder'
,
{
oid:
"{{orderCode}}"
,
otp
:
"{{orderTotalFormat}}"
,
unid
:
"{{uid}}"
}]
);
var
_fxcmd
=
_fxcmd
||
[]
;
_fxcmd.push(
[
'trackOrder'
,
{
oid:
"{{orderCode}}"
,
otp
:
"{{orderTotalFormat}}"
,
unid
:
"{{uid}}"
}]
);
</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
:
[
21397
]
}
,
{
event:
"setHashedEmail"
,
email
:
""
}
,
{
event:
"setSiteType"
,
type
:
"m"
}
,
{
event:
"trackTransaction"
,
id
:
"{{orderCode}}"
,
currency
:
"CNY"
,
item
:
""
}
);
window.criteo_q
=
window.criteo_q
||
[]
;
window.criteo_q.push(
{
event:
"setAccount"
,
account
:
[
21397
]}
,
{
event:
"setHashedEmail"
,
email
:
""
}
,
{
event:
"setSiteType"
,
type
:
"m"
}
,
{
event:
"trackTransaction"
,
id
:
"{{orderCode}}"
,
currency
:
"CNY"
,
item
:
""
}
);
</script>
{
{>
layout/footer
}
}
...
...
yohobuy/m.yohobuy.com/application/models/Home/Order.php
View file @
8d3b3f7
...
...
@@ -284,14 +284,12 @@ class OrderModel
case
5
:
//已发货状态,给查看物流URL
$result
[
'unreceived'
]
=
true
;
$result
[
'logisticsUrl'
]
=
Helpers
::
url
(
'/home/logistic'
,
array
(
'order_code'
=>
$order
[
'order_code'
]));
if
(
$showLogistics
&&
isset
(
$order
[
'caption'
]))
{
$result
[
'logisticsCompany'
]
=
$order
[
'caption'
];
$result
[
'logisticsNum'
]
=
$order
[
'express_number'
];
}
self
::
assignExpressInfo
(
$showLogistics
,
$order
,
$result
);
break
;
case
6
:
$result
[
'completed'
]
=
true
;
// 已成功订单,给查看物流URL
self
::
assignExpressInfo
(
$showLogistics
,
$order
,
$result
);
break
;
default
:
break
;
...
...
@@ -314,14 +312,11 @@ class OrderModel
case
5
:
//待收货状态,给查看物流url
$result
[
'unreceived'
]
=
true
;
$result
[
'logisticsUrl'
]
=
Helpers
::
url
(
'/home/logistic'
,
array
(
'order_code'
=>
$order
[
'order_code'
]));
if
(
$showLogistics
&&
isset
(
$order
[
'caption'
]))
{
$result
[
'logisticsCompany'
]
=
$order
[
'caption'
];
$result
[
'logisticsNum'
]
=
$order
[
'express_number'
];
}
self
::
assignExpressInfo
(
$showLogistics
,
$order
,
$result
);
break
;
case
6
:
$result
[
'completed'
]
=
true
;
self
::
assignExpressInfo
(
$showLogistics
,
$order
,
$result
);
break
;
default
:
break
;
...
...
@@ -331,6 +326,16 @@ class OrderModel
return
$result
;
}
private
static
function
assignExpressInfo
(
$showLogistics
,
$order
,
&
$result
)
{
$result
[
'logisticsUrl'
]
=
Helpers
::
url
(
'/home/logistic'
,
array
(
'order_code'
=>
$order
[
'order_code'
]));
if
(
$showLogistics
&&
isset
(
$order
[
'express_company'
][
'caption'
]))
{
$result
[
'logisticsCompany'
]
=
$order
[
'express_company'
][
'caption'
];
$result
[
'logisticsNum'
]
=
$order
[
'express_number'
];
}
}
/**
* 过滤掉为0的价格数据
*
...
...
Please
register
or
login
to post a comment