From 9926a79ba29f3d6dba91b39253c82ee7fa9e7c0d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 02 四月 2025 23:07:37 +0800 Subject: [PATCH] 2025-04-02 --- src/views/login/index.jsx | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx index 20043a7..850d770 100644 --- a/src/views/login/index.jsx +++ b/src/views/login/index.jsx @@ -599,6 +599,20 @@ if (!['shutter', 'linkage_navigation', 'linkage', 'menu_board', 'menu_board_navigation'].includes(res.menu_type)) { res.menu_type = 'shutter' } + + let loginOtop = '' + let loginOleft = '' + let windowWidth = window.innerWidth + let fix = null + res.login_screen_offset && res.login_screen_offset.forEach(item => { + if (!item.offset_x && !item.offset_y) return + + if (fix === null || Math.abs(windowWidth - item.resolution_width) < fix) { + fix = Math.abs(windowWidth - item.resolution_width) + loginOtop = item.offset_y + item.y_unit + loginOleft = item.offset_x + item.x_unit + } + }) let systemMsg = { favicon: res.titlelogo || '', @@ -617,8 +631,8 @@ app_version: res.app_version, Member_Level: 0, appname: res.appname || '', - loginOtop: res.loginOtop || '', - loginOleft: res.loginOleft || '' + loginOtop: loginOtop, + loginOleft: loginOleft } if ([10, 20, 30, 40, 50, 60, 70, 80, 90, 100].includes(res.member_level)) { -- Gitblit v1.8.0