chore: 完善并规范 Bell 上游源码导入 (#62)
This commit is contained in:
@@ -12,6 +12,7 @@ Bell 的后端与管理端是从冻结 GoAdmin 完整应用源码派生的独立
|
|||||||
|
|
||||||
- 三个上游仓库的 `.git/`:避免嵌套仓库;来源由上表完整 commit 固定。
|
- 三个上游仓库的 `.git/`:避免嵌套仓库;来源由上表完整 commit 固定。
|
||||||
- `go-admin/go-admin-db.db`:上游跟踪的本地演示 SQLite 数据库,不属于产品源码,且 Bell 正式数据库为 PostgreSQL。
|
- `go-admin/go-admin-db.db`:上游跟踪的本地演示 SQLite 数据库,不属于产品源码,且 Bell 正式数据库为 PostgreSQL。
|
||||||
|
- `go-admin/static/uploadfile/`:上游跟踪的运行期演示上传图片与日志,不属于产品源码,也不得作为 Bell 运行数据导入。
|
||||||
- `go-admin-ui/node_modules/`:本机生成依赖目录,不属于上游跟踪源码;依赖由 `pnpm-lock.yaml` 重建。
|
- `go-admin-ui/node_modules/`:本机生成依赖目录,不属于上游跟踪源码;依赖由 `pnpm-lock.yaml` 重建。
|
||||||
- 日志、构建产物和本机未跟踪文件未导入。
|
- 日志、构建产物和本机未跟踪文件未导入。
|
||||||
|
|
||||||
@@ -19,6 +20,7 @@ Bell 的后端与管理端是从冻结 GoAdmin 完整应用源码派生的独立
|
|||||||
|
|
||||||
## Bell 相对上游的首轮差异
|
## Bell 相对上游的首轮差异
|
||||||
|
|
||||||
|
- 对冻结源码导入后由完整基线差异检查报告的尾随空白、文件末尾多余空行做机械规范化;该项仅改变空白,不改变程序逻辑、配置语义或许可证内容。
|
||||||
- 生产配置固定使用 Bell 独立 PostgreSQL、端口和命名空间;数据库 URL 与 JWT secret 必须从 `BELL_*` 进程环境提供。
|
- 生产配置固定使用 Bell 独立 PostgreSQL、端口和命名空间;数据库 URL 与 JWT secret 必须从 `BELL_*` 进程环境提供。
|
||||||
- 初始管理员必须在迁移时显式提供,仓库不保存默认账号、密码或可用 secret;登录页不预填凭据。
|
- 初始管理员必须在迁移时显式提供,仓库不保存默认账号、密码或可用 secret;登录页不预填凭据。
|
||||||
- JWT realm 与前端 token key 使用 Bell 独立名称,只接受 Authorization header,不复用 Sense Cookie/token。
|
- JWT realm 与前端 token key 使用 Bell 独立名称,只接受 Authorization header,不复用 Sense Cookie/token。
|
||||||
|
|||||||
@@ -16,4 +16,3 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
myweb:
|
myweb:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|
||||||
|
|||||||
@@ -44,4 +44,3 @@ export function del{{.ClassName}}(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,11 +42,11 @@ func (e {{.ClassName}}) GetPage(c *gin.Context) {
|
|||||||
Bind(&req).
|
Bind(&req).
|
||||||
MakeService(&s.Service).
|
MakeService(&s.Service).
|
||||||
Errors
|
Errors
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e.Logger.Error(err)
|
e.Logger.Error(err)
|
||||||
e.Error(500, err, err.Error())
|
e.Error(500, err, err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
p := actions.GetPermissionFromContext(c)
|
p := actions.GetPermissionFromContext(c)
|
||||||
list := make([]models.{{.ClassName}}, 0)
|
list := make([]models.{{.ClassName}}, 0)
|
||||||
|
|||||||
@@ -100,4 +100,3 @@ return
|
|||||||
success = true
|
success = true
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,4 +5,3 @@ ENV = 'staging'
|
|||||||
|
|
||||||
# base api
|
# base api
|
||||||
VUE_APP_BASE_API = ''
|
VUE_APP_BASE_API = ''
|
||||||
|
|
||||||
|
|||||||
@@ -87,4 +87,3 @@ npm run dev
|
|||||||
- [Sass Legacy JS API](https://sass-lang.com/d/legacy-js-api)
|
- [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 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)
|
- [sass-loader v13 文档](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
|
||||||
|
|
||||||
|
|||||||
@@ -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}`)
|
||||||
|
}
|
||||||
@@ -9,4 +9,3 @@ export default {
|
|||||||
name: 'App'
|
name: 'App'
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -43,4 +43,3 @@ export function delSysApi(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,4 +25,3 @@ export function delSysLoginlog(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,4 +25,3 @@ export function delSysOperlog(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,4 +43,3 @@ export function delPost(postId) {
|
|||||||
data: postId
|
data: postId
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -132,4 +132,3 @@ export function getUserProfile() {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,4 +59,3 @@ export function startJob(jobId) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,4 +33,3 @@ export function getInfo() {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,4 +88,3 @@ vueSticky.install = Vue => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default vueSticky
|
export default vueSticky
|
||||||
|
|
||||||
|
|||||||
@@ -34,4 +34,3 @@ export default {
|
|||||||
mutations,
|
mutations,
|
||||||
actions
|
actions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -365,4 +365,3 @@ export function formatJson(filterVal, jsonData) {
|
|||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,4 +22,3 @@ export default function openWindow(url, title, w, h) {
|
|||||||
newWindow.focus()
|
newWindow.focus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -311,4 +311,3 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</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>
|
||||||
Reference in New Issue
Block a user