39 lines
852 B
PHP
39 lines
852 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Controllers\Api;
|
||
|
|
|
||
|
|
use App\BaseApp\BaseController;
|
||
|
|
use App\Service\business\AfterSaleService;
|
||
|
|
use Illuminate\Http\JsonResponse;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 后台售后
|
||
|
|
*/
|
||
|
|
class AfterSaleController extends BaseController
|
||
|
|
{
|
||
|
|
protected array $exceptRoute = ['option', 'create'];
|
||
|
|
|
||
|
|
public function __construct()
|
||
|
|
{
|
||
|
|
parent::__construct();
|
||
|
|
$this->service = AfterSaleService::getInstance();
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 审核售后
|
||
|
|
* @Method POST
|
||
|
|
*/
|
||
|
|
public function audit(): JsonResponse
|
||
|
|
{
|
||
|
|
$pass = (int) request()->post('status', 1) === 1;
|
||
|
|
return jok(
|
||
|
|
$this->service->audit(
|
||
|
|
(int) request()->post('id', 0),
|
||
|
|
$pass,
|
||
|
|
(string) request()->post('admin_remark', '')
|
||
|
|
),
|
||
|
|
$pass ? '已通过' : '已拒绝'
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|