初始化

缺陷:主题配色需要优化整体的同风格
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,46 @@
<?php
namespace App\Http\Controllers\Api;
use App\BaseApp\BaseController;
use App\Service\WxAppConfigService;
use Illuminate\Http\JsonResponse;
/**
* 小程序应用配置
*/
class WxAppController extends BaseController
{
public function __construct()
{
parent::__construct();
$this->service = WxAppConfigService::getInstance();
$this->insertField = ['code', 'name', 'app_id'];
$this->updateField = ['id'];
$this->notRequest = [
'app_secret', 'mch_id', 'mch_key', 'mch_serial_no', 'mch_private_key',
'platform_public_key', 'notify_url', 'template_code', 'remark', 'name', 'app_id',
];
}
/**
* 启用/停用
* @Method POST
*/
public function status(): JsonResponse
{
return jok(
$this->service->status(request()->post('id'), request()->post('status')),
'操作成功'
);
}
/**
* .env 引导创建/更新一条应用壳子(不含 AppSecret
* @Method POST
*/
public function initFromEnv(): JsonResponse
{
return jok($this->service->initFromEnv(), '初始化成功');
}
}