Authored by yangyang

修正删除,取消返回信息

... ... @@ -522,7 +522,7 @@ class HomeController extends AbstractAction
$this->error();
}
//传入order_code和uid以取消订单
$order_code = $this->get('orderCode');
$order_code = $this->get('id');
$uid = $this->getUid();
$uid = '10267443'; //测试用
$gender = Helpers::getGenderByCookie();
... ... @@ -530,7 +530,10 @@ class HomeController extends AbstractAction
$method = 'app.SpaceOrders.close';
$data = OrderData::cancelOrderData($order_code, $uid, $gender, $yh_channel, $method);
if ($data['code'] == 200) {
echo $data['message'];
$arr = array();
$arr['code'] = $data['code'];
$arr['message'] = $data['message'];
echo json_encode($arr);
}
}
... ... @@ -538,13 +541,13 @@ class HomeController extends AbstractAction
* 我的订单-删除订单
*/
public function deleteOrderAction() {
public function delOrderAction() {
//判断是不是ajax请求
if (!$this->isAjax()) {
$this->error();
}
//传入order_code和uid以删除订单
$order_code = $this->get('orderCode');
$order_code = $this->get('id');
$uid = $this->getUid();
$uid = '10267443'; //测试用
$gender = Helpers::getGenderByCookie();
... ... @@ -552,7 +555,10 @@ class HomeController extends AbstractAction
$method = 'app.SpaceOrders.delOrderByCode';
$data = OrderData::deleteOrderData($order_code, $uid, $gender, $yh_channel, $method);
if ($data['code'] == 200) {
echo $data['message'];
$arr = array();
$arr['code'] = $data['code'];
$arr['message'] = $data['message'];
echo json_encode($arr);
}
}
... ...