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
3a3ff1823bfdc0f6a0c3bcb1b27acbfa17bf6b7d
1 parent
66e9a71a
处理个人中心优惠券返回的数据
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
library/LibModels/Wap/Home/UserData.php
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/models/Index/User.php
library/LibModels/Wap/Home/UserData.php
View file @
3a3ff18
...
...
@@ -161,7 +161,7 @@ class UserData
public
static
function
couponData
(
$uid
,
$status
,
$page
=
1
,
$limit
=
10
)
{
$param
=
Yohobuy
::
param
();
$param
[
'method'
]
=
'app.
yohocoin.lists
'
;
$param
[
'method'
]
=
'app.
coupons.li
'
;
$param
[
'uid'
]
=
$uid
;
$param
[
'status'
]
=
$status
;
$param
[
'page'
]
=
$page
;
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
3a3ff18
...
...
@@ -167,13 +167,14 @@ class HomeController extends AbstractAction
$this
->
setNavHeader
(
'优惠券'
,
true
,
SITE_MAIN
);
// $uid = $this->getUid();
$uid
=
8826435
;
$status
=
$this
->
get
(
'status'
,
0
);
$coupons
=
array
(
'couponsUrl'
=>
\Index\UserModel
::
getCouponData
(
$uid
,
$status
),
'couponsUrl'
=>
array
(
\Index\UserModel
::
getCouponData
(
$uid
,
0
),
\Index\UserModel
::
getCouponData
(
$uid
,
1
),
),
'couponsPage'
=>
true
);
print_r
(
$coupons
);
$this
->
_view
->
display
(
'coupons'
,
$coupons
);
}
...
...
yohobuy/m.yohobuy.com/application/models/Index/User.php
View file @
3a3ff18
...
...
@@ -218,7 +218,7 @@ class UserModel
// 处理优惠券数据
if
(
isset
(
$coupons
[
'data'
])
&&
!
empty
(
$coupons
[
'data'
]))
{
$result
=
$coupons
[
'data'
];
$result
=
$coupons
[
'data'
]
[
'info'
]
;
}
return
$result
;
...
...
Please
register
or
login
to post a comment