Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Rock Zhang
9 years ago
Commit
861a63b074494cbdbb361be2ad7da0b1a3c41e86
1 parent
66d76f1c
修复订单数据处理有关逻辑的bug
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
18 deletions
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/models/Index/User.php
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
861a63b
...
...
@@ -26,7 +26,7 @@ class HomeController extends AbstractAction
$this
->
setNavHeader
(
'个人中心'
,
true
,
SITE_MAIN
);
// $uid = $this->getUid();
$uid
=
967016
;
$uid
=
8826435
;
$data
=
\Index\UserModel
::
getUserProfileData
(
$uid
);
$data
+=
\Index\UserModel
::
getInfoNumData
(
$uid
);
...
...
@@ -46,10 +46,15 @@ class HomeController extends AbstractAction
*/
public
function
ordersAction
()
{
// $uid = $this->getUid();
// $type = $this->get('type', 1);
// 设置网站标题
$this
->
setTitle
(
'我的订单'
);
$this
->
setNavHeader
(
'我的订单'
,
true
,
SITE_MAIN
);
// $orders = \Index\UserModel::getUserOrderData(967016, $type);
$uid
=
$this
->
getUid
();
$uid
=
8826435
;
$type
=
$this
->
get
(
'type'
,
1
);
$order
=
\Index\UserModel
::
getUserOrderData
(
$uid
,
$type
);
$order
=
array
(
'orders'
=>
array
(
...
...
@@ -85,7 +90,6 @@ class HomeController extends AbstractAction
);
$this
->
_view
->
display
(
'order'
,
array
(
'order'
=>
$order
,
'orderPage'
=>
true
));
// print_r($orders);
}
/**
...
...
@@ -380,7 +384,7 @@ class HomeController extends AbstractAction
$this
->
setTitle
(
'会员等级'
);
//显示网站导航头部信息
$this
->
setNavHeader
(
'会员等级'
);
$gender
=
Helpers
::
getGenderByCookie
();
$channel
=
Helpers
::
getChannelByCookie
();
$uid
=
$this
->
getUid
();
...
...
yohobuy/m.yohobuy.com/application/models/Index/User.php
View file @
861a63b
...
...
@@ -103,8 +103,6 @@ class UserModel
// 处理用户订单数据
if
(
isset
(
$orderData
[
'data'
])
&&
!
empty
(
$orderData
[
'data'
]))
{
$result
=
$orderData
[
'data'
];
$oneOrder
=
array
();
foreach
(
$orderData
[
'data'
][
'order_list'
]
as
$val
)
{
$oneOrder
=
array
();
...
...
@@ -120,21 +118,18 @@ class UserModel
$oneGoods
=
array
();
$oneGoods
[
'id'
]
=
1
;
$oneGoods
[
'thumb'
]
=
Helpers
::
getImageUrl
(
$goods
[
'goods_image'
],
60
,
80
);
$oneGoods
[
'name'
]
=
$val
[
'product_name'
];
$oneGoods
[
'color'
]
=
$val
[
'color_name'
];
$oneGoods
[
'size'
]
=
$val
[
'size_name'
];
$oneGoods
[
'size_name'
]
=
$val
[
'size_name'
];
$oneGoods
[
'price'
]
=
$val
[
'goods_price'
];
$oneGoods
[
'count'
]
=
$val
[
'buy_number'
];
$result
[
'goods'
][]
=
$oneGoods
;
$oneGoods
[
'name'
]
=
$goods
[
'product_name'
];
$oneGoods
[
'color'
]
=
$goods
[
'color_name'
];
$oneGoods
[
'size'
]
=
$goods
[
'size_name'
];
$oneGoods
[
'price'
]
=
$goods
[
'goods_price'
];
$oneGoods
[
'count'
]
=
$goods
[
'buy_number'
];
$oneOrder
[]
=
$oneGoods
;
}
$result
[
'orders'
][]
=
$oneOrder
;
}
}
print_r
(
$result
);
return
$result
;
}
...
...
Please
register
or
login
to post a comment