...
|
...
|
@@ -262,6 +262,44 @@ class Orders extends Api |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (退款,退换货原因)
|
|
|
* @ApiSummary (退款,退换货原因)
|
|
|
* @ApiMethod (GET)
|
|
|
* @ApiRoute (/api/orders/returnReason)
|
|
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
|
|
*
|
|
|
* @ApiParams (name="order_id", type="inter", required=true, description="订单id")
|
|
|
*
|
|
|
* @ApiReturn({
|
|
|
"code": 1,
|
|
|
"msg": "成功",
|
|
|
"time": "1575511885",
|
|
|
"data": {
|
|
|
"id": 2,
|
|
|
"status": 3,//订单状态(0: 待付款, 1: 已取消,2: 待发货, 3: 退款申请中,4: 已退款, 5: 待收货,6: 退换货申请中, 7: 已退换货,8: 已完成)
|
|
|
"refund_reason": "",//退款原因
|
|
|
"return_reason": ""//退换货原因
|
|
|
}
|
|
|
})
|
|
|
*/
|
|
|
public function returnReason(){
|
|
|
if($this->request->isGet()){
|
|
|
$order_id = $this->request->get('order_id');
|
|
|
|
|
|
$rule = config('verify.order_detail');
|
|
|
$validate = new Validate($rule['rule'],$rule['msg']);
|
|
|
if (!$validate->check(['order_id'=>$order_id])) {
|
|
|
$this->error($validate->getError());
|
|
|
}
|
|
|
|
|
|
$res = Common::findSoftWhereData('order',['id'=>$order_id,'uid'=>$this->uid],'id,status,refund_reason,return_reason');
|
|
|
$this->success('成功',$res);
|
|
|
}else{
|
|
|
$this->error('请求方式错误');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (取消订单)
|
|
|
* @ApiSummary (取消订单)
|
|
|
* @ApiMethod (GET)
|
...
|
...
|
|