|
|
|
@ -68,6 +68,10 @@ class Recovery extends Controller |
|
|
|
|
$model = new RecoveryOrder(); |
|
|
|
|
$info = $model->getDetails($recoveryId); |
|
|
|
|
if ($info && !empty($info['images'])) { |
|
|
|
|
$info['is_cancel'] = 0; |
|
|
|
|
if ($info['order_status'] == RecoveryStatusEnum::ACCEPTED) { |
|
|
|
|
$info['is_cancel'] = 1; |
|
|
|
|
} |
|
|
|
|
$images_list = helper::getArrayColumn($info['images'], 'file'); |
|
|
|
|
$arr = []; |
|
|
|
|
foreach ($images_list as $image) { |
|
|
|
@ -79,6 +83,26 @@ class Recovery extends Controller |
|
|
|
|
return $this->renderSuccess(['detail' => $info]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @notes:取消订单 |
|
|
|
|
* @return Json |
|
|
|
|
* @throws BaseException |
|
|
|
|
* @author: wanghousheng |
|
|
|
|
*/ |
|
|
|
|
public function cancel(): Json |
|
|
|
|
{ |
|
|
|
|
$recoveryId = intval($this->request->post('recovery_id')); |
|
|
|
|
if (!$recoveryId) { |
|
|
|
|
return $this->renderError('缺少必要参数'); |
|
|
|
|
} |
|
|
|
|
$model = new RecoveryOrder(); |
|
|
|
|
if ($model->cancel($recoveryId)) { |
|
|
|
|
return $this->renderSuccess('操作成功'); |
|
|
|
|
} |
|
|
|
|
return $this->renderError('操作失败'); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @notes:新增记录 |
|
|
|
|
* @return Json |
|
|
|
|