...
|
...
|
@@ -328,64 +328,4 @@ class OrdersController extends WebAction |
|
|
$this->echoJson($result);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 还原订单
|
|
|
*/
|
|
|
public function restoreOrderAction()
|
|
|
{
|
|
|
$data = array('code' => 400, 'message' => '', 'data' => '');
|
|
|
|
|
|
do {
|
|
|
/* 判断是不是AJAX请求 */
|
|
|
if (!$this->isAjax()) {
|
|
|
break;
|
|
|
}
|
|
|
$uid = $this->auditJumpLogin();
|
|
|
$orderCode = trim($this->post('orderCode', ''));
|
|
|
// $data = OrderData::confirmUserOrder($uid, $orderCode);
|
|
|
$data = array('code' => 400, 'message' => '订单还原成功', 'data' => '');
|
|
|
if (!isset($data['code'])) {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
while (false);
|
|
|
|
|
|
$this->echoJson($data);
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
* 我的订单-删除订单
|
|
|
*/
|
|
|
|
|
|
public function delOrderAction()
|
|
|
{
|
|
|
|
|
|
$result = array('code' => 400, 'message' => '删除失败', 'data' => '');
|
|
|
|
|
|
do {
|
|
|
/* 判断是不是AJAX请求 */
|
|
|
if (!$this->isAjax()) {
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
//传入orderCode删除订单
|
|
|
$orderCode = $this->post('orderCode','');
|
|
|
$gender = Helpers::getGenderByCookie();
|
|
|
$channel = Helpers::getChannelByCookie();
|
|
|
$uid = $this->getUid(true);
|
|
|
if (!$orderCode || !$uid) {
|
|
|
$result = array('code' => 400, 'message' => '缺失必填项', 'data' => '');
|
|
|
break;
|
|
|
}
|
|
|
//调用接口删除订单,并返回订单删除状态
|
|
|
$result = OrderData::deleteOrderData($orderCode, $uid, $gender, $channel);
|
|
|
if (!isset($result['code'])) {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
while (false);
|
|
|
|
|
|
$this->echoJson($result);
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|