goCheck('orderGoodsInfo'); $result = AfterSaleLogic::orderGoodsInfo($params); return $this->data($result); } /** * @notes 申请商品售后 * @return \think\response\Json * @author Tab * @date 2021/8/2 11:34 */ public function apply() { $params = (new AfterSaleValidate())->post()->goCheck('apply'); $params['user_id'] = $this->userId; $result = AfterSaleLogic::apply($params); if($result === false) { return $this->fail(AfterSaleLogic::getError()); } return $this->success('申请商品售后成功', $result); } /** * @notes 买家取消售后 * @return \think\response\Json * @author Tab * @date 2021/8/3 10:05 */ public function cancel() { $params = (new AfterSaleValidate())->post()->goCheck('cancel'); $params['user_id'] = $this->userId; $result = AfterSaleLogic::cancel($params); if($result) { return $this->success('买家取消售后成功'); } return $this->fail(AfterSaleLogic::getError()); } /** * @notes 买家确认退货 * @return \think\response\Json * @author Tab * @date 2021/8/3 11:25 */ public function returnGoods() { $params = (new AfterSaleValidate())->post()->goCheck('returnGoods'); $params['user_id'] = $this->userId; $result = AfterSaleLogic::returnGoods($params); if($result) { return $this->success('买家确认退货'); } return $this->fail(AfterSaleLogic::getError()); } /** * @notes 查看售后列表 * @return \think\response\Json * @author Tab * @date 2021/8/10 10:09 */ public function lists() { $params = (new AfterSaleValidate())->goCheck('lists'); $params['user_id'] = $this->userId; $params['page_no'] = $params['page_no'] ?? 1; $params['page_size'] = $params['page_size'] ?? 25; $result = AfterSaleLogic::lists($params); return $this->data($result); } /** * @notes 查看售后详情 * @return \think\response\Json * @author Tab * @date 2021/8/10 15:07 */ public function detail() { $params = (new AfterSaleValidate())->goCheck('detail'); $result = AfterSaleLogic::detail($params); return $this->data($result); } }