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
ad202e89413828923360131bb0b04f2cbcccc7d5
1 parent
c02ecd3f
优惠券支持分页
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 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 @
ad202e8
...
...
@@ -238,7 +238,7 @@ class HomeController extends AbstractAction
$uid
=
$this
->
getUid
();
$coupons
=
array
(
'couponsUrl'
=>
UserModel
::
getCouponData
(
$uid
),
'couponsUrl'
=>
UserModel
::
getCouponData
(
$uid
,
1
),
'couponsPage'
=>
true
);
$coupons
[
'pageFooter'
]
=
true
;
...
...
yohobuy/m.yohobuy.com/application/models/Index/User.php
View file @
ad202e8
...
...
@@ -304,14 +304,15 @@ class UserModel
* 处理优惠券数据
*
* @param int $uid 用户ID
* @param int $page 第几页
* @return array|mixed 处理之后的优惠券数据
*/
public
static
function
getCouponData
(
$uid
)
public
static
function
getCouponData
(
$uid
,
$page
)
{
$result
=
array
();
// 调用接口获取优惠券数据
$coupons
=
UserData
::
couponData
(
$uid
);
$coupons
=
UserData
::
couponData
(
$uid
,
$page
);
// 处理优惠券数据
if
(
!
empty
(
$coupons
[
'unused'
]))
{
...
...
Please
register
or
login
to post a comment