Authored by yangyang

修改了一些代码写法问题

... ... @@ -45,14 +45,14 @@ class OrderData
* and open the template in the editor.
*/
static function cancelOrderData($order_code, $uid, $gender, $yh_channel, $method) {
static function cancelOrderData($order_code, $uid, $gender, $yh_channel) {
//构建必传参数
$param = Yohobuy::param();
$param['order_code'] = $order_code;
$param['uid'] = $uid;
$param['gender'] = $gender;
$param['yh_channel'] = $yh_channel;
$param['method'] = $method;
$param['method'] = 'app.SpaceOrders.close';;
$param['client_secret'] = Sign::getSign($param);
//调用接口获得数据
return Yohobuy::get(Yohobuy::API_URL, $param);
... ... @@ -64,14 +64,14 @@ class OrderData
* and open the template in the editor.
*/
static function deleteOrderData($order_code, $uid, $gender, $yh_channel, $method) {
static function deleteOrderData($order_code, $uid, $gender, $yh_channel) {
//构建必传参数
$param = Yohobuy::param();
$param['order_code'] = $order_code;
$param['uid'] = $uid;
$param['gender'] = $gender;
$param['yh_channel'] = $yh_channel;
$param['method'] = $method;
$param['method'] = 'app.SpaceOrders.delOrderByCode';
$param['client_secret'] = Sign::getSign($param);
//调用接口删除订单
return Yohobuy::get(Yohobuy::API_URL, $param);
... ...
<?php
use Action\AbstractAction;
use home\GradeModel;
use home\OrderModel;
use Home\GradeModel;
use Home\OrderModel;
use Plugin\Helpers;
use LibModels\Wap\Home\OrderData;
... ... @@ -477,6 +477,7 @@ class HomeController extends AbstractAction
$gender = Helpers::getGenderByCookie();
$yh_channel = $this->get('yh_channel', 1);
$uid = $this->getUid();
$uid = '10267443';
//调用模型层getOrder方法获得并处理数据
$data = OrderModel::getOrder($type, $page, $limit, $gender, $yh_channel, $uid);
/* 如果取不到订单数据时,分两种情况:
... ... @@ -513,9 +514,8 @@ class HomeController extends AbstractAction
$uid = $this->getUid();
$gender = Helpers::getGenderByCookie();
$yh_channel = $this->get('yh_channel', 1);
$method = 'app.SpaceOrders.close';
//调用取消订单接口,返回订单取消状态
$data = OrderData::cancelOrderData($order_code, $uid, $gender, $yh_channel, $method);
$data = OrderData::cancelOrderData($order_code, $uid, $gender, $yh_channel);
//将取消状态返回至浏览器
$this->echoJson($data);
}
... ... @@ -535,9 +535,8 @@ class HomeController extends AbstractAction
$uid = $this->getUid();
$gender = Helpers::getGenderByCookie();
$yh_channel = $this->get('yh_channel', 1);
$method = 'app.SpaceOrders.delOrderByCode';
//调用接口删除订单,并返回订单删除状态
$data = OrderData::deleteOrderData($order_code, $uid, $gender, $yh_channel, $method);
$data = OrderData::deleteOrderData($order_code, $uid, $gender, $yh_channel);
//将订单删除状态返回至浏览器
$this->echoJson($data);
}
... ...
<?php
namespace home;
namespace Home;
use LibModels\Wap\Home\OrderData;
use Plugin\Helpers;
... ...