Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
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
Rock Zhang
9 years ago
Commit
693f8a66fc208f3b8a95dd1f05a0b7bef1d288af
1 parent
04569e45
修复优惠券有关的逻辑处理问题
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 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 @
693f8a6
...
...
@@ -171,12 +171,11 @@ class UserData
* 优惠券数据
*
* @param int $uid 用户ID
* @param int $status 优惠券状态,0表示未使用,1表示已使用
* @param int $page 第几页,默认1
* @param int $limit 限制读取的数目,默认10
* @return array 优惠券接口返回的数据
*/
public
static
function
couponData
(
$uid
,
$
status
,
$
page
=
1
,
$limit
=
10
)
public
static
function
couponData
(
$uid
,
$page
=
1
,
$limit
=
10
)
{
$urlList
=
array
();
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
693f8a6
...
...
@@ -162,9 +162,8 @@ 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'
=>
\Index\UserModel
::
getCouponData
(
$uid
),
'couponsPage'
=>
true
);
$this
->
_view
->
display
(
'coupons'
,
$coupons
);
...
...
yohobuy/m.yohobuy.com/application/models/Index/User.php
View file @
693f8a6
...
...
@@ -258,12 +258,12 @@ class UserModel
* @param int $uid 用户ID
* @return array|mixed 处理之后的优惠券数据
*/
public
static
function
getCouponData
(
$uid
,
$status
)
public
static
function
getCouponData
(
$uid
)
{
$result
=
array
();
// 调用接口获取优惠券数据
$coupons
=
UserData
::
couponData
(
$uid
,
$status
);
$coupons
=
UserData
::
couponData
(
$uid
);
// 处理优惠券数据
if
(
!
empty
(
$coupons
[
'unused'
]))
{
...
...
Please
register
or
login
to post a comment