初始化
缺陷:主题配色需要优化整体的同风格
This commit is contained in:
39
app/Http/Controllers/Wx/HomeController.php
Normal file
39
app/Http/Controllers/Wx/HomeController.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Wx;
|
||||
|
||||
use App\BaseApp\BaseController;
|
||||
use App\Service\wx\WxHomeService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
/**
|
||||
* 小程序首页(免鉴权)
|
||||
*/
|
||||
class HomeController extends BaseController
|
||||
{
|
||||
protected array $exceptRoute = ['list', 'option', 'detail', 'create', 'update', 'delete'];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->service = WxHomeService::getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页轮播
|
||||
* @Method GET
|
||||
*/
|
||||
public function carousel(): JsonResponse
|
||||
{
|
||||
return jok($this->service->carousel());
|
||||
}
|
||||
|
||||
/**
|
||||
* 一级分类
|
||||
* @Method GET
|
||||
*/
|
||||
public function categoryList(): JsonResponse
|
||||
{
|
||||
return jok($this->service->categoryList((int) request()->get('pid', 0)));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user