初始化

缺陷:主题配色需要优化整体的同风格
This commit is contained in:
2026-08-14 23:21:21 +08:00
parent 6e2769c528
commit bcf54c2727
152 changed files with 13521 additions and 141 deletions

View File

@@ -0,0 +1,53 @@
<?php
namespace App\Http\Controllers\Api;
use App\BaseApp\BaseController;
use App\Service\business\ImageService;
use Exception;
use Illuminate\Http\JsonResponse;
/**
* 商品相册
*/
class ImageController extends BaseController
{
public function __construct()
{
parent::__construct();
$this->service = ImageService::getInstance();
$this->insertField = ['catalogue_id', 'url', 'type'];
$this->updateField = ['id', 'url'];
$this->notRequest = ['catalogue_id', 'type', 'status'];
}
/**
* 渲染图列表(入参 catalogue_id
* @Method GET
*/
public function renderGraph(): JsonResponse
{
return jok($this->service->renderGraph((int) request()->get('catalogue_id', 0)), '列表获取成功');
}
/**
* 实物图列表(入参 catalogue_id
* @Method GET
*/
public function physicalDrawing(): JsonResponse
{
return jok($this->service->physicalDrawing((int) request()->get('catalogue_id', 0)), '列表获取成功');
}
/**
* 启用 / 禁用
* @Method POST
* @throws Exception
*/
public function status(): JsonResponse
{
$this->insertField = ['id', 'status'];
$params = $this->checkRequiredFields(request()->post());
return jok($this->service->status($params['id'], $params['status']), '操作成功');
}
}