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
梁志锋
9 years ago
Commit
06a315a533406cc8a1cd17aaf8f08a269bc3067f
1 parent
c7d35229
升级4.7.3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
yohobuy/www.yohobuy.com/application/modules/Home/controllers/Orders.php
yohobuy/www.yohobuy.com/application/modules/Home/controllers/Orders.php
View file @
06a315a
...
...
@@ -362,4 +362,38 @@ class OrdersController extends WebAction
$this
->
echoJson
(
$result
);
}
/**
* 我的订单——再次购买
*/
public
function
reAddAction
()
{
$result
=
array
(
'code'
=>
401
,
'message'
=>
'商品加入购物车失败'
,
'data'
=>
''
);
do
{
/* 判断是不是AJAX请求 */
if
(
!
$this
->
isAjax
())
{
break
;
}
//获取相关参数
$uid
=
$this
->
getUid
(
true
);
$orderCode
=
$this
->
post
(
'orderCode'
,
''
);
if
(
!
$uid
||
!
$orderCode
)
{
$result
=
array
(
'code'
=>
400
,
'message'
=>
'缺失参数'
,
'data'
=>
''
);
break
;
}
$reAddData
=
OrderData
::
reAddData
(
$uid
,
$orderCode
);
if
(
!
isset
(
$reAddData
[
'code'
])
||
$reAddData
[
'code'
]
!=
200
){
break
;
}
$result
=
array
(
'code'
=>
200
,
'message'
=>
'商品已重新加入购物车'
,
'data'
=>
$reAddData
[
'data'
]);
if
(
!
isset
(
$result
[
'code'
]))
{
break
;
}
}
while
(
false
);
$this
->
echoJson
(
$result
);
}
}
...
...
Please
register
or
login
to post a comment