正在显示
2 个修改的文件
包含
38 行增加
和
0 行删除
@@ -262,6 +262,44 @@ class Orders extends Api | @@ -262,6 +262,44 @@ class Orders extends Api | ||
262 | } | 262 | } |
263 | 263 | ||
264 | /** | 264 | /** |
265 | + * @ApiTitle (退款,退换货原因) | ||
266 | + * @ApiSummary (退款,退换货原因) | ||
267 | + * @ApiMethod (GET) | ||
268 | + * @ApiRoute (/api/orders/returnReason) | ||
269 | + * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") | ||
270 | + * | ||
271 | + * @ApiParams (name="order_id", type="inter", required=true, description="订单id") | ||
272 | + * | ||
273 | + * @ApiReturn({ | ||
274 | + "code": 1, | ||
275 | + "msg": "成功", | ||
276 | + "time": "1575511885", | ||
277 | + "data": { | ||
278 | + "id": 2, | ||
279 | + "status": 3,//订单状态(0: 待付款, 1: 已取消,2: 待发货, 3: 退款申请中,4: 已退款, 5: 待收货,6: 退换货申请中, 7: 已退换货,8: 已完成) | ||
280 | + "refund_reason": "",//退款原因 | ||
281 | + "return_reason": ""//退换货原因 | ||
282 | + } | ||
283 | + }) | ||
284 | + */ | ||
285 | + public function returnReason(){ | ||
286 | + if($this->request->isGet()){ | ||
287 | + $order_id = $this->request->get('order_id'); | ||
288 | + | ||
289 | + $rule = config('verify.order_detail'); | ||
290 | + $validate = new Validate($rule['rule'],$rule['msg']); | ||
291 | + if (!$validate->check(['order_id'=>$order_id])) { | ||
292 | + $this->error($validate->getError()); | ||
293 | + } | ||
294 | + | ||
295 | + $res = Common::findSoftWhereData('order',['id'=>$order_id,'uid'=>$this->uid],'id,status,refund_reason,return_reason'); | ||
296 | + $this->success('成功',$res); | ||
297 | + }else{ | ||
298 | + $this->error('请求方式错误'); | ||
299 | + } | ||
300 | + } | ||
301 | + | ||
302 | + /** | ||
265 | * @ApiTitle (取消订单) | 303 | * @ApiTitle (取消订单) |
266 | * @ApiSummary (取消订单) | 304 | * @ApiSummary (取消订单) |
267 | * @ApiMethod (GET) | 305 | * @ApiMethod (GET) |
此 diff 太大无法显示。
-
请 注册 或 登录 后发表评论