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

1

... ... @@ -33,9 +33,8 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function index()
public function index($type)
{
$type = $this->request->get('type');
$list = $this->model->getList($this->user['id'], $type);
$this->success(__('成功'),compact('list'));
}
... ... @@ -54,10 +53,8 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function editAddress()
public function editAddress($order_id,$user_address_id)
{
$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());
}
... ... @@ -88,9 +85,8 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function detail()
public function detail($order_id)
{
$order_id = $this->request->get('order_id',0);
if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
$this->error($this->model->getError());
}
... ... @@ -110,9 +106,8 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function cancel()
public function cancel($order_id)
{
$order_id = $this->request->get('order_id',0);
if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
$this->error($this->model->getError());
}
... ... @@ -135,9 +130,8 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function pay()
public function pay($order_id)
{
$order_id = $this->request->get('order_id',0);
if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
$this->error($this->model->getError());
}
... ... @@ -173,9 +167,8 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function remind()
public function remind($order_id)
{
$order_id = $this->request->get('order_id',0);
if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
$this->error($this->model->getError());
}
... ... @@ -198,9 +191,8 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function receive()
public function receive($order_id)
{
$order_id = $this->request->get('order_id',0);
if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
$this->error($this->model->getError());
}
... ... @@ -223,17 +215,15 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function refundView()
public function refundView($order_id)
{
$order_id = $this->request->get('order_id',0);
if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
$this->error($this->model->getError());
}
halt($order);
$refund_reason = config('site.refundreason') ?: [];//退款理由
$refund_reason = str_replace("\r\n", "\n", $refund_reason);//防止不兼容
$refund_reason = explode("\n", $refund_reason);
$this->success(__('成功'),compact('order,refund_reason'));
$this->success(__('成功'),compact('order','refund_reason'));
}
/**
... ... @@ -277,9 +267,8 @@ class Order extends Api
'msg':'返回成功'
})
*/
public function returnGoodsView()
public function returnGoodsView($order_id)
{
$order_id = $this->request->get('order_id',0);
if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
$this->error($this->model->getError());
}
... ... @@ -291,7 +280,7 @@ class Order extends Api
$return_goods_reason = config('site.return_goods_reason') ?: [];
$return_goods_reason = str_replace("\r\n", "\n", $return_goods_reason);//防止不兼容
$return_goods_reason = explode("\n", $return_goods_reason);
$this->success(__('成功'),compact('order,refund_reason,return_goods_reason'));
$this->success(__('成功'),compact('order','refund_reason','return_goods_reason'));
}
/**
... ...