chore: 完善并规范 Bell 上游源码导入 (#62)

This commit is contained in:
QiuSW
2026-08-27 18:26:56 +08:00
parent f5a3dd796b
commit 91befd63a7
36 changed files with 127 additions and 72 deletions
+2
View File
@@ -12,6 +12,7 @@ Bell 的后端与管理端是从冻结 GoAdmin 完整应用源码派生的独立
- 三个上游仓库的 `.git/`:避免嵌套仓库;来源由上表完整 commit 固定。
- `go-admin/go-admin-db.db`:上游跟踪的本地演示 SQLite 数据库,不属于产品源码,且 Bell 正式数据库为 PostgreSQL。
- `go-admin/static/uploadfile/`:上游跟踪的运行期演示上传图片与日志,不属于产品源码,也不得作为 Bell 运行数据导入。
- `go-admin-ui/node_modules/`:本机生成依赖目录,不属于上游跟踪源码;依赖由 `pnpm-lock.yaml` 重建。
- 日志、构建产物和本机未跟踪文件未导入。
@@ -19,6 +20,7 @@ Bell 的后端与管理端是从冻结 GoAdmin 完整应用源码派生的独立
## Bell 相对上游的首轮差异
- 对冻结源码导入后由完整基线差异检查报告的尾随空白、文件末尾多余空行做机械规范化;该项仅改变空白,不改变程序逻辑、配置语义或许可证内容。
- 生产配置固定使用 Bell 独立 PostgreSQL、端口和命名空间;数据库 URL 与 JWT secret 必须从 `BELL_*` 进程环境提供。
- 初始管理员必须在迁移时显式提供,仓库不保存默认账号、密码或可用 secret;登录页不预填凭据。
- JWT realm 与前端 token key 使用 Bell 独立名称,只接受 Authorization header,不复用 Sense Cookie/token。
-1
View File
@@ -16,4 +16,3 @@ services:
networks:
myweb:
driver: bridge
-1
View File
@@ -44,4 +44,3 @@ export function del{{.ClassName}}(data) {
data: data
})
}
@@ -42,11 +42,11 @@ func (e {{.ClassName}}) GetPage(c *gin.Context) {
Bind(&req).
MakeService(&s.Service).
Errors
if err != nil {
e.Logger.Error(err)
e.Error(500, err, err.Error())
return
}
if err != nil {
e.Logger.Error(err)
e.Error(500, err, err.Error())
return
}
p := actions.GetPermissionFromContext(c)
list := make([]models.{{.ClassName}}, 0)
-1
View File
@@ -100,4 +100,3 @@ return
success = true
return
}
-1
View File
@@ -5,4 +5,3 @@ ENV = 'staging'
# base api
VUE_APP_BASE_API = ''
-1
View File
@@ -87,4 +87,3 @@ npm run dev
- [Sass Legacy JS API](https://sass-lang.com/d/legacy-js-api)
- [Sass Silencing Deprecations](https://sass-lang.com/documentation/cli/dart-sass/#silencedeprecations)
- [sass-loader v13 文档](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
+35
View File
@@ -0,0 +1,35 @@
const { run } = require('runjs')
const chalk = require('chalk')
const config = require('../vue.config.js')
const rawArgv = process.argv.slice(2)
const args = rawArgv.join(' ')
if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
const report = rawArgv.includes('--report')
run(`vue-cli-service build ${args}`)
const port = 9526
const publicPath = config.publicPath
var connect = require('connect')
var serveStatic = require('serve-static')
const app = connect()
app.use(
publicPath,
serveStatic('./dist', {
index: ['index.html', '/']
})
)
app.listen(port, function () {
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
if (report) {
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
}
})
} else {
run(`vue-cli-service build ${args}`)
}
-1
View File
@@ -9,4 +9,3 @@ export default {
name: 'App'
}
</script>
-1
View File
@@ -43,4 +43,3 @@ export function delSysApi(data) {
data: data
})
}
-1
View File
@@ -25,4 +25,3 @@ export function delSysLoginlog(data) {
data: data
})
}
-1
View File
@@ -25,4 +25,3 @@ export function delSysOperlog(data) {
data: data
})
}
-1
View File
@@ -43,4 +43,3 @@ export function delPost(postId) {
data: postId
})
}
-1
View File
@@ -132,4 +132,3 @@ export function getUserProfile() {
method: 'get'
})
}
-1
View File
@@ -59,4 +59,3 @@ export function startJob(jobId) {
method: 'get'
})
}
-1
View File
@@ -33,4 +33,3 @@ export function getInfo() {
method: 'get'
})
}
-1
View File
@@ -88,4 +88,3 @@ vueSticky.install = Vue => {
}
export default vueSticky
-1
View File
@@ -34,4 +34,3 @@ export default {
mutations,
actions
}
-1
View File
@@ -365,4 +365,3 @@ export function formatJson(filterVal, jsonData) {
}
}))
}
-1
View File
@@ -22,4 +22,3 @@ export default function openWindow(url, title, w, h) {
newWindow.focus()
}
}
@@ -311,4 +311,3 @@ export default {
}
}
</script>
@@ -0,0 +1,36 @@
<template>
<BasicLayout>
<template #wrapper>
<el-card class="box-card">
<div v-loading="loading" :style="'height:'+ height">
<iframe :src="src" frameborder="no" style="width: 100%;height: 100%" scrolling="auto" />
</div>
</el-card>
</template>
</BasicLayout>
</template>
<script>
export default {
components: {
},
data() {
return {
src: process.env.VUE_APP_BASE_API + '/form-generator/index.html',
height: document.documentElement.clientHeight - 94.5 + 'px;',
loading: true
}
},
mounted: function() {
setTimeout(() => {
this.loading = false
}, 230)
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 94.5 + 'px;'
}
}
}
</script>