diff --git a/src/assets/imgs/screen/qrsx.png b/src/assets/imgs/screen/qrsx.png new file mode 100644 index 0000000..19daeaf Binary files /dev/null and b/src/assets/imgs/screen/qrsx.png differ diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue index 9a0b1b5..dc29426 100644 --- a/src/views/Login/Login.vue +++ b/src/views/Login/Login.vue @@ -18,7 +18,7 @@ class="relative flex-1 bg-#fff bg-opacity-90 p-30px dark:bg-[var(--login-bg-color)] lt-sm:p-10px overflow-x-hidden overflow-y-auto" > -
@@ -27,16 +27,18 @@
- + -->
+ + + + + - - -
@@ -55,7 +57,17 @@ import { LocaleDropdown } from '@/layout/components/LocaleDropdown' import { LoginForm, MobileForm, QrCodeForm, RegisterForm, SSOLoginVue, ForgetPasswordForm } from './components' defineOptions({ name: 'Login' }) - +const isIpAccess = ref(false) +onMounted(() => { + // const hostname = window.location.hostname + // if(hostname == 'localhost'){ + // isIpAccess.value = true; + // } + // else{ + // isIpAccess.value = /^(\d{1,3}\.){3}\d{1,3}$/.test(hostname) + // } + // 判断是否为IP地址访问 +}) const { t } = useI18n() const appStore = useAppStore() const { getPrefixCls } = useDesign() diff --git a/src/views/Login/Login.vue.rej b/src/views/Login/Login.vue.rej new file mode 100644 index 0000000..8e64cad --- /dev/null +++ b/src/views/Login/Login.vue.rej @@ -0,0 +1,15 @@ +diff a/src/views/Login/Login.vue b/src/views/Login/Login.vue (rejected hunks) +@@ -34,9 +34,10 @@ + class="m-auto h-[calc(100%-60px)] w-[100%] flex items-center at-2xl:max-w-500px at-lg:max-w-500px at-md:max-w-500px at-xl:max-w-500px" + > + +- +- +- ++ ++ ++ ++ + + + diff --git a/src/views/Login/components/QrCodeForm.vue b/src/views/Login/components/QrCodeForm.vue index 698488a..2df70af 100644 --- a/src/views/Login/components/QrCodeForm.vue +++ b/src/views/Login/components/QrCodeForm.vue @@ -1,14 +1,17 @@ @@ -23,6 +26,7 @@ defineOptions({ name: 'QrCodeForm' }) const imageUrl = ref(''); const uuuid =ref('') +const refreshQR = ref(false) const { t } = useI18n() const { handleBackLogin, getLoginState } = useLoginState() @@ -30,7 +34,9 @@ const getShow = computed(() => true) // 存储定时器 ID,用于后续清除定时器 let intervalId = ref(); - +const handleRefresh = () => { + window.location.reload() +} const getimg =async ()=>{ const array = new Uint32Array(4); @@ -65,9 +71,10 @@ const getimg =async ()=>{ // 记录定时器开始的时间 const startTime = Date.now(); // 10 分钟的毫秒数 -const tenMinutes = 60 * 1000; +const tenMinutes = 10 *60 * 10000 ; //定时刷新 判断是否扫码允许 const refaulst = ()=>{ + refreshQR.value = false; // 先清除之前的定时器,避免重复调用 if (intervalId) { clearInterval(intervalId.value); @@ -80,6 +87,8 @@ const refaulst = ()=>{ if (Date.now() - startTime >= tenMinutes) { clearInterval(intervalId.value); console.log('定时器已停止,已过去 10 分钟。'); + refreshQR.value = true; + return; } @@ -101,3 +110,18 @@ onMounted(() => { getimg() }) + \ No newline at end of file diff --git a/src/views/enterprises/update.vue b/src/views/enterprises/update.vue index 636f76f..5a07097 100644 --- a/src/views/enterprises/update.vue +++ b/src/views/enterprises/update.vue @@ -41,7 +41,7 @@ - +