修复构建报错
This commit is contained in:
parent
a7bde8bb72
commit
ad8978617c
@ -41,6 +41,9 @@ export function editUser(userId, data) {
|
|||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 更新用户信息(别名)
|
||||||
|
export const updateUserInfo = editUser;
|
||||||
|
|
||||||
// 删除用户
|
// 删除用户
|
||||||
export function deleteUser(userId) {
|
export function deleteUser(userId) {
|
||||||
|
|||||||
@ -0,0 +1,13 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<router-view />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
// 分类编辑页面
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
|
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<router-view />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
// 标签编辑页面
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
|
|
||||||
@ -9,9 +9,12 @@ import (
|
|||||||
"github.com/beego/beego/v2/server/web/context"
|
"github.com/beego/beego/v2/server/web/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 项目版本号
|
||||||
|
const Version = "1.0.0"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// 初始化数据库
|
// 初始化数据库
|
||||||
models.Init()
|
models.Init(Version)
|
||||||
|
|
||||||
// CORS配置已移至router.go中统一管理
|
// CORS配置已移至router.go中统一管理
|
||||||
// 确保请求体被正确读取(包括 POST、PUT、PATCH)
|
// 确保请求体被正确读取(包括 POST、PUT、PATCH)
|
||||||
|
|||||||
@ -392,7 +392,7 @@ func DeleteUser(id int) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Init 初始化数据库
|
// Init 初始化数据库
|
||||||
func Init() {
|
func Init(version string) {
|
||||||
orm.RegisterModel(new(User))
|
orm.RegisterModel(new(User))
|
||||||
orm.RegisterModel(new(Menu))
|
orm.RegisterModel(new(Menu))
|
||||||
orm.RegisterModel(new(ProgramCategory))
|
orm.RegisterModel(new(ProgramCategory))
|
||||||
@ -430,5 +430,6 @@ func Init() {
|
|||||||
// 注意:Beego v2 中不需要显式调用 Using,默认使用 "default"
|
// 注意:Beego v2 中不需要显式调用 Using,默认使用 "default"
|
||||||
|
|
||||||
fmt.Println("数据库连接成功!")
|
fmt.Println("数据库连接成功!")
|
||||||
|
fmt.Printf("当前项目版本: %s\n", version)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user