diff --git a/flask-consul/views/login.py b/flask-consul/views/login.py index a54b968..843e4e2 100644 --- a/flask-consul/views/login.py +++ b/flask-consul/views/login.py @@ -18,6 +18,7 @@ parser = reqparse.RequestParser() parser.add_argument('username',type=str) parser.add_argument('password',type=str) parser.add_argument('title',type=str) +parser.add_argument('height',type=str) parser.add_argument('ldap',type=str) parser.add_argument('file',type=FileStorage, location="files", help="File is wrong.") @@ -25,6 +26,9 @@ class Logo(Resource): @token_auth.auth.login_required def post(self, logo_opt): if logo_opt == 'nologo': + height = parser.parse_args().get("height") + height = '450' if height == "" else height + consul_kv.put_kv('ConsulManager/img/logoheight',height) consul_kv.put_kv('ConsulManager/img/biglogo','R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7') consul_kv.put_kv('ConsulManager/img/isbig',True) return {"code": 20000, "data": "设置成功!"} @@ -75,7 +79,11 @@ class Logo(Resource): consul_kv_path = 'ConsulManager/img/smallogo' b64logo = consul_kv.get_value(consul_kv_path) if b64logo: - return {"code": 20000, "isbig": isbig, "data": 'data:image/png;base64,' + b64logo} + if b64logo == 'R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7': + logoheight = consul_kv.get_value('ConsulManager/img/logoheight') + return {"code": 20000, "isbig": isbig, "data": 'data:image/png;base64,' + b64logo, "logoheight": logoheight} + else: + return {"code": 20000, "isbig": isbig, "data": 'data:image/png;base64,' + b64logo} else: return {"code": 20000, "isbig": isbig, "data": 'default'} elif logo_opt == 'title': diff --git a/vue-consul/src/api/login.js b/vue-consul/src/api/login.js index 2278da4..382c499 100644 --- a/vue-consul/src/api/login.js +++ b/vue-consul/src/api/login.js @@ -7,10 +7,11 @@ export function logo() { }) } -export function postnologo() { +export function postnologo(height) { return request({ url: '/api/login/nologo', - method: 'post' + method: 'post', + data: { height } }) } diff --git a/vue-consul/src/views/dashboard/index.vue b/vue-consul/src/views/dashboard/index.vue index eba2f6f..6cd6d96 100644 --- a/vue-consul/src/views/dashboard/index.vue +++ b/vue-consul/src/views/dashboard/index.vue @@ -19,7 +19,7 @@

支持阿里/华为/腾讯云采集ECS外网IP功能

支持华为云ECS采集到期日指标

优化云ECS资源推送到JumpServer3.x资产管理

-

优化自建资源/站点监控查询分页

+

优化自建资源/站点监控查询分页

diff --git a/vue-consul/src/views/ldap/logo.vue b/vue-consul/src/views/ldap/logo.vue index 3fe4217..35e53b1 100644 --- a/vue-consul/src/views/ldap/logo.vue +++ b/vue-consul/src/views/ldap/logo.vue @@ -68,19 +68,39 @@
恢复默认LOGO风格
- + 展示名称 -    - - + + + +   登录页名称 + + + + + + + 设置名称     恢复默认名称 + 壁纸模式 -     进入壁纸模式 + + +   登录框位置 + + + + + + + + + 设置并进入壁纸模式 @@ -97,7 +117,7 @@ export default { imageUrl1: '', imageUrl2: '', imageUrl3: '', - formtitle: { title: '' } + formtitle: { title: '', height: '' } } }, methods: { @@ -123,7 +143,7 @@ export default { }, setnologo() { - postnologo().then(response => { + postnologo(this.formtitle.height).then(response => { this.$message.success(response.data) }) }, diff --git a/vue-consul/src/views/ldap/logo.vue.bak b/vue-consul/src/views/ldap/logo.vue.bak deleted file mode 100644 index 98fb8b9..0000000 --- a/vue-consul/src/views/ldap/logo.vue.bak +++ /dev/null @@ -1,152 +0,0 @@ - - - - - diff --git a/vue-consul/src/views/login/index.vue b/vue-consul/src/views/login/index.vue index d1a7560..a86d011 100644 --- a/vue-consul/src/views/login/index.vue +++ b/vue-consul/src/views/login/index.vue @@ -95,7 +95,7 @@ export default { loginbgimg: '', logintitle: 'T e n S u n S', isbig: true, - height: 330, + height: '330', redirect: undefined } }, @@ -125,7 +125,7 @@ export default { } } else { if (response.data === 'data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7') { - this.height = 450 + this.height = response.logoheight } this.loginlogo = response.data this.isbig = response.isbig