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
xuqi
2015-11-16 13:51:58 +0800
Commit
c8ac53afb27e3ece4eb15dea19cf00cbb62f9d03
1 parent
e6204cf0
order detail
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
110 additions
and
77 deletions
docs/data-structure.md
static/js/me/entry.js
static/js/me/order-detail.js
static/sass/me/_order-detail.scss
template/m.yohobuy.com/actions/index/home/order-detail.phtml
template/m.yohobuy.com/partials/layout/use.phtml
yohobuy/m.yohobuy.com/application/controllers/Home.php
docs/data-structure.md
View file @
c8ac53a
...
...
@@ -1010,7 +1010,9 @@
freight: ''
coupon: ''
yohoCoin: ''
price: ''
price: '',
assessUrl: '' //对于已经完成的订单 传评价url
}
}
...
...
static/js/me/entry.js
View file @
c8ac53a
...
...
@@ -5,6 +5,7 @@
*/
require
(
'./order'
);
require
(
'./order-detail'
);
require
(
'./fav'
);
require
(
'./index'
);
require
(
'./coupons'
);
\ No newline at end of file
...
...
static/js/me/order-detail.js
0 → 100644
View file @
c8ac53a
/**
* 订单详情页
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/11/16
*/
var
$
=
require
(
'jquery'
),
lazyLoad
=
require
(
'yoho.lazyload'
),
Hammer
=
require
(
'yoho.hammer'
);
var
orderId
=
$
(
'#order-detail'
).
data
(
'id'
);
var
delHammer
;
lazyLoad
();
//订单删除
delHammer
=
new
Hammer
(
document
.
getElementsByClassName
(
'btn-del'
)[
0
]);
delHammer
.
on
(
'tap'
,
function
()
{
if
(
confirm
(
'确定删除订单吗?'
))
{
$
.
ajax
({
type
:
'GET'
,
url
:
'/home/delOrder'
,
data
:
{
id
:
orderId
}
});
}
});
\ No newline at end of file
...
...
static/sass/me/_order-detail.scss
View file @
c8ac53a
...
...
@@ -96,14 +96,6 @@
@include
border-radius
(
5px
);
font-size
:
26rem
/
$pxConvertRem
;
text-align
:
center
;
}
.btn-del
{
border
:
1px
solid
#000
;
}
.btn-service
{
color
:
#f00
;
border-color
:
#f00
;
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/index/home/order-detail.phtml
View file @
c8ac53a
{
{>
layout/header
}
}
<div
class=
"order-detail-page yoho-page"
>
{
{#
orderDetail
}
}
<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=
"{{id}}"
>
<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>
<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>
{
{#unless
orderCancel
}
}
<a
class=
"logistics sub"
href=
"{{logisticsUrl}}"
>
<span
class=
"iconfont"
>
630
;</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"
>物流信息</span>
<span>物流公司:
{
{logisticsCompany
}
}</span>
<span>快递单号:
{
{logisticsNum
}
}</span>
<span
class=
"sub-title"
>
{
{orderStatus
}
}</span>
<span>订单编号:
{
{orderNum
}
}</span>
<span>下单时间:
{
{orderTime
}
}</span>
</p>
<span
class=
"iconfont"
>
614
;</span>
</a>
{
{/unless
}
}
</section>
</div>
{
{#unless
orderCancel
}
}
<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"
>
614
;</span>
</a>
{
{/unless
}
}
</section>
<section
class=
"goods block"
>
{
{#
goods
}
}
{
{>
me/order/good
}
}
{
{/
goods
}
}
</section>
<section
class=
"goods block"
>
{
{#
goods
}
}
{
{>
me/order/good
}
}
{
{/
goods
}
}
</section>
<ul
class=
"cost block"
>
<li>
商品总金额
<span>¥
{
{sumPrice
}
}</span>
</li>
<li>
活动金额
<span>-¥
{
{salePrice
}
}</span>
</li>
<li>
运费
<span>+¥
{
{freight
}
}</span>
</li>
<li>
优惠券
<span>-¥
{
{coupon
}
}</span>
</li>
<li>
YOHO币
<span>-¥
{
{yohoCoin
}
}</span>
</li>
<li>
实付金额
<span>¥
{
{price
}
}</span>
</li>
</ul>
<ul
class=
"cost block"
>
<li>
商品总金额
<span>¥
{
{sumPrice
}
}</span>
</li>
<li>
活动金额
<span>-¥
{
{salePrice
}
}</span>
</li>
<li>
运费
<span>+¥
{
{freight
}
}</span>
</li>
<li>
优惠券
<span>-¥
{
{coupon
}
}</span>
</li>
<li>
YOHO币
<span>-¥
{
{yohoCoin
}
}</span>
</li>
<li>
实付金额
<span>¥
{
{price
}
}</span>
</li>
</ul>
<div
class=
"opt block"
>
<span
class=
"btn btn-del"
>删除订单</span>
<div
class=
"opt block"
>
<span
class=
"btn btn-del"
>删除订单</span>
{
{#if
orderCompleted
}
}
<span
class=
"btn btn-service"
>申请售后</span>
{
{/if
}
}
{
{#if
orderCompleted
}
}
<a
href=
"{{assessUrl}}"
>
<span
class=
"btn btn-assess"
>评价商品</span>
</a>
{
{/if
}
}
</div>
</div>
{
{/
orderDetail
}
}
</div>
...
...
template/m.yohobuy.com/partials/layout/use.phtml
View file @
c8ac53a
...
...
@@ -212,6 +212,11 @@
seajs.use('js/me/order');
</script>
{{/if}}
{{#if orderDetailPage}}
<script>
seajs.use('js/me/order-detail');
</script>
{{/if}}
{{!-- 个人中心: 商品收藏&品牌收藏 --}}
{{#if favPage}}
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
c8ac53a
...
...
@@ -430,6 +430,6 @@ class HomeController extends AbstractAction
'yohoCoin'
=>
5
,
'price'
=>
719
);
$this
->
_view
->
display
(
'order-detail'
,
array
(
'orderDetail'
=>
$data
));
$this
->
_view
->
display
(
'order-detail'
,
array
(
'orderDetail'
=>
$data
,
'orderDetailPage'
=>
true
));
}
}
...
...
Please
register
or
login
to post a comment