作者 何书鹏
1 个管道 的构建 通过 耗费 3 秒

11

... ... @@ -33,8 +33,9 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function index($type)
public function index()
{
$type = $this->request->get('type');
$list = $this->model->getList($this->user['id'], $type);
$this->success(__('成功'),compact('list'));
}
... ... @@ -53,8 +54,10 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function editAddress($order_id,$user_address_id)
public function editAddress()
{
$order_id = $this->request->get('order_id',0);
$user_address_id = $this->request->get('user_address_id',0);
if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
$this->error($this->model->getError());
}
... ... @@ -85,8 +88,9 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function detail($order_id)
public function detail()
{
$order_id = $this->request->get('order_id',0);
if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
$this->error($this->model->getError());
}
... ... @@ -106,8 +110,9 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function cancel($order_id)
public function cancel()
{
$order_id = $this->request->get('order_id',0);
if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
$this->error($this->model->getError());
}
... ... @@ -130,8 +135,9 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function pay($order_id)
public function pay()
{
$order_id = $this->request->get('order_id',0);
if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
$this->error($this->model->getError());
}
... ... @@ -167,8 +173,9 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function remind($order_id)
public function remind()
{
$order_id = $this->request->get('order_id',0);
if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
$this->error($this->model->getError());
}
... ... @@ -191,8 +198,9 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function receive($order_id)
public function receive()
{
$order_id = $this->request->get('order_id',0);
if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
$this->error($this->model->getError());
}
... ... @@ -215,8 +223,9 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function refundView($order_id)
public function refundView()
{
$order_id = $this->request->get('order_id',0);
if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
$this->error($this->model->getError());
}
... ... @@ -267,8 +276,9 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function returnGoodsView($order_id)
public function returnGoodsView()
{
$order_id = $this->request->get('order_id',0);
if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
$this->error($this->model->getError());
}
... ...