diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue index 9a0b1b5..3910ff5 100644 --- a/src/views/Login/Login.vue +++ b/src/views/Login/Login.vue @@ -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" > - - - + + + + @@ -55,7 +56,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()