
AI: 增加了AI前端绘制功能,可以根据描述生成客户端页面【授权用户专属】 自动化: 自动化模板采用了function模式,更加方便用户二次开发和自定义改动 自动化: 默认携带ID和CreatedAt排序 自动化: 所有自动化Select模板默认支持select搜索 优化:http交互报错信息增加防止多次弹出错误遮罩机制 ICON: 优化ICON逻辑,防止多次加载svg 布局:增加侧边分栏模式 布局: 顶栏模式样式优化和高亮逻辑调整 优化: 个人配置不再需要手动点击保存,会根据变化自动保存 BUG: 修复了菜单点击设为主页勾选被取消的bug 安全: 更新了jwt版本,修复CVE-2025-30204 导出: 默认支持软删除过滤 代码: 优化了部分代码逻辑 本次更新需要重新执行 npm i --------- Signed-off-by: joohwan <zhouhuan.chen@yunqutech.com > Co-authored-by: huiyifyj <jxfengyijie@gmail.com> Co-authored-by: piexlMax(奇淼 <qimiaojiangjizhao@gmail.com> Co-authored-by: okppop <okppop@protonmail.com> Co-authored-by: joohwan <zhouhuan.chen@yunqutech.com > Co-authored-by: xuedinge <781408517@qq.com>
128 lines
4.1 KiB
Smarty
128 lines
4.1 KiB
Smarty
import service from '@/utils/request'
|
|
{{- if not .OnlyTemplate}}
|
|
// @Tags {{.StructName}}
|
|
// @Summary 创建{{.Description}}
|
|
// @Security ApiKeyAuth
|
|
// @Accept application/json
|
|
// @Produce application/json
|
|
// @Param data body model.{{.StructName}} true "创建{{.Description}}"
|
|
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
|
|
// @Router /{{.Abbreviation}}/create{{.StructName}} [post]
|
|
export const create{{.StructName}} = (data) => {
|
|
return service({
|
|
url: '/{{.Abbreviation}}/create{{.StructName}}',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
|
|
// @Tags {{.StructName}}
|
|
// @Summary 删除{{.Description}}
|
|
// @Security ApiKeyAuth
|
|
// @Accept application/json
|
|
// @Produce application/json
|
|
// @Param data body model.{{.StructName}} true "删除{{.Description}}"
|
|
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
|
|
// @Router /{{.Abbreviation}}/delete{{.StructName}} [delete]
|
|
export const delete{{.StructName}} = (params) => {
|
|
return service({
|
|
url: '/{{.Abbreviation}}/delete{{.StructName}}',
|
|
method: 'delete',
|
|
params
|
|
})
|
|
}
|
|
|
|
// @Tags {{.StructName}}
|
|
// @Summary 批量删除{{.Description}}
|
|
// @Security ApiKeyAuth
|
|
// @Accept application/json
|
|
// @Produce application/json
|
|
// @Param data body request.IdsReq true "批量删除{{.Description}}"
|
|
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
|
|
// @Router /{{.Abbreviation}}/delete{{.StructName}} [delete]
|
|
export const delete{{.StructName}}ByIds = (params) => {
|
|
return service({
|
|
url: '/{{.Abbreviation}}/delete{{.StructName}}ByIds',
|
|
method: 'delete',
|
|
params
|
|
})
|
|
}
|
|
|
|
// @Tags {{.StructName}}
|
|
// @Summary 更新{{.Description}}
|
|
// @Security ApiKeyAuth
|
|
// @Accept application/json
|
|
// @Produce application/json
|
|
// @Param data body model.{{.StructName}} true "更新{{.Description}}"
|
|
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
|
|
// @Router /{{.Abbreviation}}/update{{.StructName}} [put]
|
|
export const update{{.StructName}} = (data) => {
|
|
return service({
|
|
url: '/{{.Abbreviation}}/update{{.StructName}}',
|
|
method: 'put',
|
|
data
|
|
})
|
|
}
|
|
|
|
// @Tags {{.StructName}}
|
|
// @Summary 用id查询{{.Description}}
|
|
// @Security ApiKeyAuth
|
|
// @Accept application/json
|
|
// @Produce application/json
|
|
// @Param data query model.{{.StructName}} true "用id查询{{.Description}}"
|
|
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
|
|
// @Router /{{.Abbreviation}}/find{{.StructName}} [get]
|
|
export const find{{.StructName}} = (params) => {
|
|
return service({
|
|
url: '/{{.Abbreviation}}/find{{.StructName}}',
|
|
method: 'get',
|
|
params
|
|
})
|
|
}
|
|
|
|
// @Tags {{.StructName}}
|
|
// @Summary 分页获取{{.Description}}列表
|
|
// @Security ApiKeyAuth
|
|
// @Accept application/json
|
|
// @Produce application/json
|
|
// @Param data query request.PageInfo true "分页获取{{.Description}}列表"
|
|
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|
// @Router /{{.Abbreviation}}/get{{.StructName}}List [get]
|
|
export const get{{.StructName}}List = (params) => {
|
|
return service({
|
|
url: '/{{.Abbreviation}}/get{{.StructName}}List',
|
|
method: 'get',
|
|
params
|
|
})
|
|
}
|
|
|
|
{{- if .HasDataSource}}
|
|
// @Tags {{.StructName}}
|
|
// @Summary 获取数据源
|
|
// @Security ApiKeyAuth
|
|
// @Accept application/json
|
|
// @Produce application/json
|
|
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
|
|
// @Router /{{.Abbreviation}}/find{{.StructName}}DataSource [get]
|
|
export const get{{.StructName}}DataSource = () => {
|
|
return service({
|
|
url: '/{{.Abbreviation}}/get{{.StructName}}DataSource',
|
|
method: 'get',
|
|
})
|
|
}
|
|
{{- end}}
|
|
{{- end}}
|
|
// @Tags {{.StructName}}
|
|
// @Summary 不需要鉴权的{{.Description}}接口
|
|
// @Accept application/json
|
|
// @Produce application/json
|
|
// @Param data query request.{{.StructName}}Search true "分页获取{{.Description}}列表"
|
|
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
|
|
// @Router /{{.Abbreviation}}/get{{.StructName}}Public [get]
|
|
export const get{{.StructName}}Public = () => {
|
|
return service({
|
|
url: '/{{.Abbreviation}}/get{{.StructName}}Public',
|
|
method: 'get',
|
|
})
|
|
}
|