chore: 初始化视频号基本信息控制

This commit is contained in:
2026-01-10 08:37:53 +08:00
parent ad9aec21c5
commit b6e77071f1
14 changed files with 1455 additions and 6 deletions

View File

@@ -24,4 +24,35 @@ create table if not exists lucky_diy_view_util
constraint name
unique (name)
)
```
```
## 页面设计及组件展示
- src\app\model\web\DiyView.php
- src\app\shop\view\diy\edit.html
- src\public\static\ext\diyview\js\components.js
## 如何添加新组件
### 1. 添加组件到数据表中
```sql
insert into lucky_diy_view_util (name, title, type, value, addon_name, sort, support_diy_view, max_count, is_delete, icon, icon_type)
values ('test', '测试', 'SYSTEM', '{"test": "test"}', '', 0, '', 0, 0, '', 0);
```
### 2. 建立组件的控制器
`src\app\component\controller` 目录下创建对应的控制器文件,处理组件的业务逻辑。
例如:创建 `src\app\component\controller\TestController.php` 文件,用于处理测试组件的业务逻辑。
### 3. 建立组件的视图
在 src\app\component\view 目录下创建对应的视图文件,处理组件的前端展示。
例如:创建 `src\app\component\view\test.php` 文件,用于展示测试组件。
### 4. 在前端页面中使用组件
在前端页面中使用组件,需要在页面中添加对应的组件标签。