Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
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
毕凯
9 years ago
Commit
332fccfc2ad3ee5a9202aefe130d584c9b6a2f38
1 parent
5a4fc25d
修复优惠券为空时的 bug
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
static/js/cart/select-coupon.js
template/m.yohobuy.com/actions/cart/index/select-coupon.phtml
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
static/js/cart/select-coupon.js
View file @
332fccf
...
...
@@ -92,7 +92,7 @@ function getCouponHandle(coupons) {
// 第一页张数为 0 ,显示优惠券为空
if
(
!
coupons
.
length
&&
page
===
2
)
{
$
(
'.
select-coupon-page
'
).
html
(
$
(
'#tmpl-no-coupon'
).
html
());
$
(
'.
coupin-wrap
'
).
html
(
$
(
'#tmpl-no-coupon'
).
html
());
return
;
}
...
...
template/m.yohobuy.com/actions/cart/index/select-coupon.phtml
View file @
332fccf
...
...
@@ -4,9 +4,11 @@
<input
type=
"text"
name=
"couponCode"
value=
""
placeholder=
"输入优惠券码"
>
<button
type=
"submit"
class=
"submit"
>确定</button>
</form>
<div
id=
"coupon-list"
class=
"coupon-list"
></div>
<div
class=
"not-avaliable-coupon-line hide"
>不可使用的优惠券</div>
<div
id=
"coupon-list-not"
class=
"coupon-list"
></div>
<div
class=
"coupin-wrap"
>
<div
id=
"coupon-list"
class=
"coupon-list"
></div>
<div
class=
"not-avaliable-coupon-line hide"
>不可使用的优惠券</div>
<div
id=
"coupon-list-not"
class=
"coupon-list"
></div>
</div>
</div>
<script
id=
"tmpl-coupon"
type=
"text/tmpl"
>
\
{
{#coupons
}
}
...
...
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
View file @
332fccf
...
...
@@ -49,7 +49,7 @@ class IndexController extends AbstractAction
// 渲染模板
$this
->
_view
->
display
(
'index'
,
$data
);
}
/*
* 异步获取购物车数据
*/
...
...
@@ -359,7 +359,7 @@ class IndexController extends AbstractAction
}
if
(
empty
(
$result
))
{
echo
'
'
;
echo
'
[]
'
;
}
else
{
$this
->
echoJson
(
$result
);
}
...
...
Please
register
or
login
to post a comment