Authored by yangyang

修改了一些代码写法问题

@@ -45,14 +45,14 @@ class OrderData @@ -45,14 +45,14 @@ class OrderData
45 * and open the template in the editor. 45 * and open the template in the editor.
46 */ 46 */
47 47
48 - static function cancelOrderData($order_code, $uid, $gender, $yh_channel, $method) { 48 + static function cancelOrderData($order_code, $uid, $gender, $yh_channel) {
49 //构建必传参数 49 //构建必传参数
50 $param = Yohobuy::param(); 50 $param = Yohobuy::param();
51 $param['order_code'] = $order_code; 51 $param['order_code'] = $order_code;
52 $param['uid'] = $uid; 52 $param['uid'] = $uid;
53 $param['gender'] = $gender; 53 $param['gender'] = $gender;
54 $param['yh_channel'] = $yh_channel; 54 $param['yh_channel'] = $yh_channel;
55 - $param['method'] = $method; 55 + $param['method'] = 'app.SpaceOrders.close';;
56 $param['client_secret'] = Sign::getSign($param); 56 $param['client_secret'] = Sign::getSign($param);
57 //调用接口获得数据 57 //调用接口获得数据
58 return Yohobuy::get(Yohobuy::API_URL, $param); 58 return Yohobuy::get(Yohobuy::API_URL, $param);
@@ -64,14 +64,14 @@ class OrderData @@ -64,14 +64,14 @@ class OrderData
64 * and open the template in the editor. 64 * and open the template in the editor.
65 */ 65 */
66 66
67 - static function deleteOrderData($order_code, $uid, $gender, $yh_channel, $method) { 67 + static function deleteOrderData($order_code, $uid, $gender, $yh_channel) {
68 //构建必传参数 68 //构建必传参数
69 $param = Yohobuy::param(); 69 $param = Yohobuy::param();
70 $param['order_code'] = $order_code; 70 $param['order_code'] = $order_code;
71 $param['uid'] = $uid; 71 $param['uid'] = $uid;
72 $param['gender'] = $gender; 72 $param['gender'] = $gender;
73 $param['yh_channel'] = $yh_channel; 73 $param['yh_channel'] = $yh_channel;
74 - $param['method'] = $method; 74 + $param['method'] = 'app.SpaceOrders.delOrderByCode';
75 $param['client_secret'] = Sign::getSign($param); 75 $param['client_secret'] = Sign::getSign($param);
76 //调用接口删除订单 76 //调用接口删除订单
77 return Yohobuy::get(Yohobuy::API_URL, $param); 77 return Yohobuy::get(Yohobuy::API_URL, $param);
1 <?php 1 <?php
2 2
3 use Action\AbstractAction; 3 use Action\AbstractAction;
4 -use home\GradeModel;  
5 -use home\OrderModel; 4 +use Home\GradeModel;
  5 +use Home\OrderModel;
6 use Plugin\Helpers; 6 use Plugin\Helpers;
7 use LibModels\Wap\Home\OrderData; 7 use LibModels\Wap\Home\OrderData;
8 8
@@ -477,6 +477,7 @@ class HomeController extends AbstractAction @@ -477,6 +477,7 @@ class HomeController extends AbstractAction
477 $gender = Helpers::getGenderByCookie(); 477 $gender = Helpers::getGenderByCookie();
478 $yh_channel = $this->get('yh_channel', 1); 478 $yh_channel = $this->get('yh_channel', 1);
479 $uid = $this->getUid(); 479 $uid = $this->getUid();
  480 + $uid = '10267443';
480 //调用模型层getOrder方法获得并处理数据 481 //调用模型层getOrder方法获得并处理数据
481 $data = OrderModel::getOrder($type, $page, $limit, $gender, $yh_channel, $uid); 482 $data = OrderModel::getOrder($type, $page, $limit, $gender, $yh_channel, $uid);
482 /* 如果取不到订单数据时,分两种情况: 483 /* 如果取不到订单数据时,分两种情况:
@@ -513,9 +514,8 @@ class HomeController extends AbstractAction @@ -513,9 +514,8 @@ class HomeController extends AbstractAction
513 $uid = $this->getUid(); 514 $uid = $this->getUid();
514 $gender = Helpers::getGenderByCookie(); 515 $gender = Helpers::getGenderByCookie();
515 $yh_channel = $this->get('yh_channel', 1); 516 $yh_channel = $this->get('yh_channel', 1);
516 - $method = 'app.SpaceOrders.close';  
517 //调用取消订单接口,返回订单取消状态 517 //调用取消订单接口,返回订单取消状态
518 - $data = OrderData::cancelOrderData($order_code, $uid, $gender, $yh_channel, $method); 518 + $data = OrderData::cancelOrderData($order_code, $uid, $gender, $yh_channel);
519 //将取消状态返回至浏览器 519 //将取消状态返回至浏览器
520 $this->echoJson($data); 520 $this->echoJson($data);
521 } 521 }
@@ -535,9 +535,8 @@ class HomeController extends AbstractAction @@ -535,9 +535,8 @@ class HomeController extends AbstractAction
535 $uid = $this->getUid(); 535 $uid = $this->getUid();
536 $gender = Helpers::getGenderByCookie(); 536 $gender = Helpers::getGenderByCookie();
537 $yh_channel = $this->get('yh_channel', 1); 537 $yh_channel = $this->get('yh_channel', 1);
538 - $method = 'app.SpaceOrders.delOrderByCode';  
539 //调用接口删除订单,并返回订单删除状态 538 //调用接口删除订单,并返回订单删除状态
540 - $data = OrderData::deleteOrderData($order_code, $uid, $gender, $yh_channel, $method); 539 + $data = OrderData::deleteOrderData($order_code, $uid, $gender, $yh_channel);
541 //将订单删除状态返回至浏览器 540 //将订单删除状态返回至浏览器
542 $this->echoJson($data); 541 $this->echoJson($data);
543 } 542 }
1 <?php 1 <?php
2 2
3 -namespace home; 3 +namespace Home;
4 4
5 use LibModels\Wap\Home\OrderData; 5 use LibModels\Wap\Home\OrderData;
6 use Plugin\Helpers; 6 use Plugin\Helpers;