...
|
...
|
@@ -98,7 +98,7 @@ class OrdersController extends WebAction |
|
|
'userThumb' => UserModel::getUserHeadImg($uid),
|
|
|
'homeNav' => $leftNav
|
|
|
);
|
|
|
$packages=false;
|
|
|
$packages = false;
|
|
|
if ($detail) {
|
|
|
$data += array(
|
|
|
'orderNum' => $detail['orderNum'],
|
...
|
...
|
@@ -219,7 +219,7 @@ class OrdersController extends WebAction |
|
|
|
|
|
$this->echoJson($data);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 还原订单
|
|
|
*/
|
...
|
...
|
@@ -244,31 +244,40 @@ class OrdersController extends WebAction |
|
|
|
|
|
$this->echoJson($data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 删除订单
|
|
|
|
|
|
/*
|
|
|
* 我的订单-删除订单
|
|
|
*/
|
|
|
public function deleteOrderAction()
|
|
|
|
|
|
public function delOrderAction()
|
|
|
{
|
|
|
$data = array('code' => 400, 'message' => '', 'data' => '');
|
|
|
|
|
|
$result = 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'])) {
|
|
|
|
|
|
//传入orderCode删除订单
|
|
|
$orderCode = $this->get('id');
|
|
|
$gender = Helpers::getGenderByCookie();
|
|
|
$channel = Helpers::getChannelByCookie();
|
|
|
$uid = $this->getUid(true);
|
|
|
if (!$orderCode || !$uid) {
|
|
|
$result = array('code' => 400, 'message' => '缺失必填项', 'data' => '');
|
|
|
break;
|
|
|
}
|
|
|
//调用接口删除订单,并返回订单删除状态
|
|
|
$data = OrderData::deleteOrderData($orderCode, $uid, $gender, $channel);
|
|
|
if (!isset($result['code'])) {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
while (false);
|
|
|
|
|
|
$this->echoJson($data);
|
|
|
$this->echoJson($result);
|
|
|
}
|
|
|
|
|
|
|
|
|
} |
...
|
...
|
|