更新若干功能
This commit is contained in:
38
app/Http/Controllers/Api/AfterSaleController.php
Normal file
38
app/Http/Controllers/Api/AfterSaleController.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?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 ? '已通过' : '已拒绝'
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user