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
郭成尧
9 years ago
Commit
d1f4530c964930e7cc57263907c168c42dc14d2c
1 parent
8f9929c9
'领券操作接口修改'
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
16 deletions
template/m.yohobuy.com/actions/index/coupon/index.phtml
template/m.yohobuy.com/actions/index/coupon/receive-coupon.phtml
yohobuy/m.yohobuy.com/application/controllers/Coupon.php
template/m.yohobuy.com/actions/index/coupon/index.phtml
View file @
d1f4530
...
...
@@ -46,7 +46,7 @@
data:
{
'couponIds':
'8024,
2564
,
3587'
}
,
dataType:
'
html
',
dataType:
'
json
',
success:
function
(data)
{
alert(data);
}
,
...
...
template/m.yohobuy.com/actions/index/coupon/receive-coupon.phtml
deleted
100644 → 0
View file @
8f9929c
<div>信息:{{message}}</div>
yohobuy/m.yohobuy.com/application/controllers/Coupon.php
View file @
d1f4530
...
...
@@ -72,31 +72,23 @@ class CouponController extends AbstractAction
$receiveData
=
filter_input_array
(
INPUT_GET
,
array
(
'couponIds'
=>
FILTER_DEFAULT
));
$returnData
=
array
()
;
$returnData
=
''
;
$couponIds
=
explode
(
','
,
str_replace
(
' '
,
''
,
$receiveData
[
'couponIds'
]));
switch
(
$this
->
getCoupon
(
$couponIds
)){
case
1
:
$returnData
=
[
'message'
=>
'领券成功!'
];
$returnData
=
'领券成功!'
;
break
;
case
2
:
$returnData
=
[
'message'
=>
'领券失败!'
];
$returnData
=
'领券失败!'
;
break
;
case
3
:
$returnData
=
[
'message'
=>
'券已经被领光了!'
];
$returnData
=
'券已经被领光了!'
;
break
;
default
:
$returnData
=
[
'message'
=>
'未知错误!'
];
$returnData
=
'未知错误!'
;
break
;
}
$this
->
_view
->
display
(
'receive-coupon'
,
$returnData
);
echo
json_encode
(
$returnData
);
}
/**
...
...
Please
register
or
login
to post a comment