...
|
...
|
@@ -362,38 +362,4 @@ 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);
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|