Authored by xuqi

order opt

@@ -112,7 +112,7 @@ orderHammer.on('tap', function(e) { @@ -112,7 +112,7 @@ orderHammer.on('tap', function(e) {
112 //Order delete 112 //Order delete
113 $.ajax({ 113 $.ajax({
114 type: 'GET', 114 type: 'GET',
115 - url: '/home/deleteOrder', 115 + url: '/home/delOrder',
116 data: { 116 data: {
117 id: id 117 id: id
118 }, 118 },
@@ -221,7 +221,6 @@ class HomeController extends AbstractAction @@ -221,7 +221,6 @@ class HomeController extends AbstractAction
221 'couponsUrl' => \Index\UserModel::getCouponData($uid, $status), 221 'couponsUrl' => \Index\UserModel::getCouponData($uid, $status),
222 'couponsPage' => true 222 'couponsPage' => true
223 ); 223 );
224 -  
225 $this->_view->display('coupons', $coupons); 224 $this->_view->display('coupons', $coupons);
226 } 225 }
227 226
@@ -522,19 +521,14 @@ class HomeController extends AbstractAction @@ -522,19 +521,14 @@ class HomeController extends AbstractAction
522 $this->error(); 521 $this->error();
523 } 522 }
524 //传入order_code和uid以取消订单 523 //传入order_code和uid以取消订单
525 - $order_code = $this->get('id'); 524 + $order_code = $this->get('orderCode');
526 $uid = $this->getUid(); 525 $uid = $this->getUid();
527 $uid = '10267443'; //测试用 526 $uid = '10267443'; //测试用
528 $gender = Helpers::getGenderByCookie(); 527 $gender = Helpers::getGenderByCookie();
529 $yh_channel = $this->get('yh_channel', 1); 528 $yh_channel = $this->get('yh_channel', 1);
530 $method = 'app.SpaceOrders.close'; 529 $method = 'app.SpaceOrders.close';
531 $data = OrderData::cancelOrderData($order_code, $uid, $gender, $yh_channel, $method); 530 $data = OrderData::cancelOrderData($order_code, $uid, $gender, $yh_channel, $method);
532 - if ($data['code'] == 200) {  
533 - $arr = array();  
534 - $arr['code'] = $data['code'];  
535 - $arr['message'] = $data['message'];  
536 - echo json_encode($arr);  
537 - } 531 + $this->echoJson($data);
538 } 532 }
539 533
540 /* 534 /*
@@ -554,27 +548,7 @@ class HomeController extends AbstractAction @@ -554,27 +548,7 @@ class HomeController extends AbstractAction
554 $yh_channel = $this->get('yh_channel', 1); 548 $yh_channel = $this->get('yh_channel', 1);
555 $method = 'app.SpaceOrders.delOrderByCode'; 549 $method = 'app.SpaceOrders.delOrderByCode';
556 $data = OrderData::deleteOrderData($order_code, $uid, $gender, $yh_channel, $method); 550 $data = OrderData::deleteOrderData($order_code, $uid, $gender, $yh_channel, $method);
557 - if ($data['code'] == 200) {  
558 - $arr = array();  
559 - $arr['code'] = $data['code'];  
560 - $arr['message'] = $data['message'];  
561 - echo json_encode($arr);  
562 - }  
563 - }  
564 -  
565 - /**  
566 - * 付款  
567 - */  
568 - public function getPaymentAction() {  
569 - $contentCode = $this->get('content_code');  
570 - $contentCode = '04cf5abaa7c20178325a07c4a833782c';  
571 - $gender = Helpers::getGenderByCookie();  
572 - $yh_channel = $this->get('yh_channel', 1);  
573 - $data = OrderData::getPaymentData($contentCode, $gender, $yh_channel);  
574 - //print_r($data);  
575 - if ($data['code'] == 200) {  
576 -  
577 - } 551 + $this->echoJson($data);
578 } 552 }
579 553
580 /** 554 /**