|
@@ -98,7 +98,7 @@ class OrdersController extends WebAction |
|
@@ -98,7 +98,7 @@ class OrdersController extends WebAction |
98
|
'userThumb' => UserModel::getUserHeadImg($uid),
|
98
|
'userThumb' => UserModel::getUserHeadImg($uid),
|
99
|
'homeNav' => $leftNav
|
99
|
'homeNav' => $leftNav
|
100
|
);
|
100
|
);
|
101
|
- $packages=false;
|
101
|
+ $packages = false;
|
102
|
if ($detail) {
|
102
|
if ($detail) {
|
103
|
$data += array(
|
103
|
$data += array(
|
104
|
'orderNum' => $detail['orderNum'],
|
104
|
'orderNum' => $detail['orderNum'],
|
|
@@ -219,7 +219,7 @@ class OrdersController extends WebAction |
|
@@ -219,7 +219,7 @@ class OrdersController extends WebAction |
219
|
|
219
|
|
220
|
$this->echoJson($data);
|
220
|
$this->echoJson($data);
|
221
|
}
|
221
|
}
|
222
|
-
|
222
|
+
|
223
|
/**
|
223
|
/**
|
224
|
* 还原订单
|
224
|
* 还原订单
|
225
|
*/
|
225
|
*/
|
|
@@ -244,31 +244,40 @@ class OrdersController extends WebAction |
|
@@ -244,31 +244,40 @@ class OrdersController extends WebAction |
244
|
|
244
|
|
245
|
$this->echoJson($data);
|
245
|
$this->echoJson($data);
|
246
|
}
|
246
|
}
|
247
|
-
|
|
|
248
|
- /**
|
|
|
249
|
- * 删除订单
|
247
|
+
|
|
|
248
|
+ /*
|
|
|
249
|
+ * 我的订单-删除订单
|
250
|
*/
|
250
|
*/
|
251
|
- public function deleteOrderAction()
|
251
|
+
|
|
|
252
|
+ public function delOrderAction()
|
252
|
{
|
253
|
{
|
253
|
- $data = array('code' => 400, 'message' => '', 'data' => '');
|
254
|
+
|
|
|
255
|
+ $result = array('code' => 400, 'message' => '删除失败', 'data' => '');
|
254
|
|
256
|
|
255
|
do {
|
257
|
do {
|
256
|
/* 判断是不是AJAX请求 */
|
258
|
/* 判断是不是AJAX请求 */
|
257
|
if (!$this->isAjax()) {
|
259
|
if (!$this->isAjax()) {
|
258
|
break;
|
260
|
break;
|
259
|
}
|
261
|
}
|
260
|
- $uid = $this->auditJumpLogin();
|
|
|
261
|
- $orderCode = trim($this->post('orderCode', ''));
|
|
|
262
|
-// $data = OrderData::confirmUserOrder($uid, $orderCode);
|
|
|
263
|
- $data = array('code' => 400, 'message' => '订单删除成功', 'data' => '');
|
|
|
264
|
- if (!isset($data['code'])) {
|
262
|
+
|
|
|
263
|
+ //传入orderCode删除订单
|
|
|
264
|
+ $orderCode = $this->get('id');
|
|
|
265
|
+ $gender = Helpers::getGenderByCookie();
|
|
|
266
|
+ $channel = Helpers::getChannelByCookie();
|
|
|
267
|
+ $uid = $this->getUid(true);
|
|
|
268
|
+ if (!$orderCode || !$uid) {
|
|
|
269
|
+ $result = array('code' => 400, 'message' => '缺失必填项', 'data' => '');
|
|
|
270
|
+ break;
|
|
|
271
|
+ }
|
|
|
272
|
+ //调用接口删除订单,并返回订单删除状态
|
|
|
273
|
+ $data = OrderData::deleteOrderData($orderCode, $uid, $gender, $channel);
|
|
|
274
|
+ if (!isset($result['code'])) {
|
265
|
break;
|
275
|
break;
|
266
|
}
|
276
|
}
|
267
|
}
|
277
|
}
|
268
|
while (false);
|
278
|
while (false);
|
269
|
|
279
|
|
270
|
- $this->echoJson($data);
|
280
|
+ $this->echoJson($result);
|
271
|
}
|
281
|
}
|
272
|
-
|
|
|
273
|
|
282
|
|
274
|
} |
283
|
} |