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
d195d6a23b929a6b9fdfeebdd8f7781d471b98ba
1 parent
4b4065ba
修复优惠券使用的bug
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
template/m.yohobuy.com/actions/index/home/coupon_list.phtml
yohobuy/m.yohobuy.com/application/models/Index/User.php
template/m.yohobuy.com/actions/index/home/coupon_list.phtml
View file @
d195d6a
...
...
@@ -7,10 +7,10 @@
</div>
{
{/coupons
}
}
{
{#if
noRecord
}
}
<div
class=
"no-record"
>
<div
class=
"icon"
></div>
<span>暂无优惠券</span>
<a
class=
"walk-way"
href=
"{{walkwayUrl}}"
>随便逛逛</a>
{
{#
noRecord
}
}
<div
class=
"null"
>
<i></i>
<p>您还没有优惠券!</p>
<a
href=
"{{topURL}}"
>随便逛逛</a>
</div>
{
{/if
}
}
\ No newline at end of file
{
{/
noRecord
}
}
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/application/models/Index/User.php
View file @
d195d6a
...
...
@@ -383,14 +383,17 @@ class UserModel
$result
[
'walkwayUrl'
]
=
'/product/new'
;
$result
[
'noRecord'
]
=
true
;
}
else
{
$result
[
'coupons'
]
=
$coupons
[
'data'
][
'info'
];
$couponArr
=
array
();
isset
(
$coupons
[
'data'
][
'info'
])
&&
$couponArr
=
$coupons
[
'data'
][
'info'
];
foreach
(
$
result
[
'coupons'
]
as
&
$val
)
{
foreach
(
$
couponArr
as
&
$val
)
{
// 处理已使用的优惠券
if
(
$status
==
1
)
{
$val
[
'used'
]
=
true
;
}
}
!
empty
(
$couponArr
)
&&
$result
[
'coupons'
]
=
$couponArr
;
}
}
...
...
Please
register
or
login
to post a comment