Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
Commits
Go to a project
GitLab
Go to group
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
9 years ago
Commit
0c1b090e1a636cc650407cf8c83f71a5ad15bfe7
1 parent
39c50e85
order with opt
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
8 deletions
docs/data-structure.md
static/sass/me/_order.scss
template/m.yohobuy.com/actions/index/home/order.phtml
template/m.yohobuy.com/partials/me/order/order.phtml
yohobuy/m.yohobuy.com/application/controllers/Home.php
docs/data-structure.md
View file @
0c1b090
...
...
@@ -899,7 +899,7 @@
### 我的订单
{
order: {
allO
rders:
[
o
rders:
[
...
]
}
...
...
@@ -925,5 +925,10 @@
...
],
count: 1,
sumCost: '199.00'
sumCost: '199.00',
//status
completed: true, //已完成
unpaid: true, //or 未支付
unshipped: true, //or 未发货
unreceived: '', //or 未收货,查看物流URL
}
\ No newline at end of file
...
...
static/sass/me/_order.scss
View file @
0c1b090
...
...
@@ -30,6 +30,33 @@
.sum-cost
{
color
:
#e01
;
}
.order-opt
{
padding
:
30rem
/
$pxConvertRem
0
;
padding-right
:
30rem
/
$pxConvertRem
;
border-top
:
1px
solid
#e0e0e0
;
text-align
:
right
;
>
.btn
{
display
:
inline-block
;
box-sizing
:
border-box
;
height
:
60rem
/
$pxConvertRem
;
line-height
:
60rem
/
$pxConvertRem
;
width
:
140rem
/
$pxConvertRem
;
font-size
:
24rem
/
$pxConvertRem
;
text-align
:
center
;
}
.cancel
{
border
:
1px
solid
#000
;
}
.pay
{
background
:
#d0021b
;
color
:
#fff
;
margin-left
:
20rem
/
$pxConvertRem
;
}
}
}
}
...
...
template/m.yohobuy.com/actions/index/home/order.phtml
View file @
0c1b090
...
...
@@ -18,11 +18,11 @@
<div
id=
"order-container"
class=
"order-container"
>
<div
class=
"all orders"
>
{
{#
allO
rders
}
}
{
{#
each
o
rders
}
}
{
{>
me/order/order
}
}
{
{/
allOrders
}
}
{
{/
each
}
}
</div>
<div
class=
"
obligation
orders hide"
></div>
<div
class=
"
unpaid
orders hide"
></div>
<div
class=
"unshipped orders hide"
></div>
<div
class=
"unreceived orders hide"
></div>
</div>
...
...
template/m.yohobuy.com/partials/me/order/order.phtml
View file @
0c1b090
<div class="order">
<div class="order"
data-id="{{orderNum}}"
>
<header class="header">
订单编号:{{orderNum}}
<span class="trading-status">{{tradingStatus}}</span>
...
...
@@ -11,4 +11,17 @@
<footer class="footer">
共{{count}}件商品 实付<span class="sum-cost">¥{{sumCost}}</span>
</footer>
{{#if unpaid}}
<div class="order-opt">
<span class="btn cancel">取消订单</span>
<span class="btn pay">立即付款</span>
</div>
{{/if}}
{{#with unreceived}}
<div class="order-opt">
<a class="check-logistics" href="{{.}}">查看物流</a>
</div>
{{/with}}
</div>
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
0c1b090
...
...
@@ -45,7 +45,7 @@ class HomeController extends AbstractAction
// $orders = \Index\UserModel::getUserOrderData(967016, $type);
$order
=
array
(
'
allO
rders'
=>
array
(
'
o
rders'
=>
array
(
array
(
'orderNum'
=>
'408539077'
,
'tradingStatus'
=>
'交易成功'
,
...
...
@@ -71,7 +71,8 @@ class HomeController extends AbstractAction
)
),
'count'
=>
2
,
'sumCost'
=>
'699.00'
'sumCost'
=>
'699.00'
,
'unpaid'
=>
true
,
)
)
);
...
...
Please
register
or
login
to post a comment