修改辽宁免登录

This commit is contained in:
guanj
2026-06-02 09:30:10 +08:00
parent 98e0f9de02
commit 2e7c0b7f44
5 changed files with 270 additions and 240 deletions

View File

@@ -12,14 +12,8 @@
</div>
<el-form :rules="rules" ref="formRef" size="large" class="login-form" :model="form">
<el-form-item prop="username">
<el-input
ref="usernameRef"
v-model="form.username"
type="text"
clearable
placeholder="用户名"
autocomplete="off"
>
<el-input ref="usernameRef" v-model="form.username" type="text" clearable placeholder="用户名"
autocomplete="off">
<template #prefix>
<!-- <span class="iconfont icon-yonghu" style="color: var(--el-color-primary)"></span> -->
<Icon name="fa fa-user" style="color: var(--el-color-primary); font-size: 16px" />
@@ -27,13 +21,8 @@
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input
ref="passwordRef"
v-model="form.password"
type="password"
placeholder="密码"
autocomplete="off"
>
<el-input ref="passwordRef" v-model="form.password" type="password" placeholder="密码"
autocomplete="off">
<template #prefix>
<Icon name="local-password" style="color: var(--el-color-primary); font-size: 16px" />
<!-- <span class="iconfont icon-mima" style="color: var(--el-color-primary)"></span> -->
@@ -41,13 +30,8 @@
</el-input>
</el-form-item>
<el-form-item>
<el-button
:loading="state.submitLoading"
class="submit-btn"
round
type="info"
@click="onSubmit(formRef)"
>
<el-button :loading="state.submitLoading" class="submit-btn" round type="info"
@click="onSubmit(formRef)">
登录
</el-button>
</el-form-item>
@@ -68,7 +52,7 @@
import { onMounted, onBeforeUnmount, reactive, ref, nextTick } from 'vue'
import * as pageBubble from '@/utils/pageBubble'
import { ElMessage } from 'element-plus'
import { gongkey, login,getSysConfig } from '@/api/user-boot/user'
import { gongkey, login, getSysConfig, loginLNqr } from '@/api/user-boot/user'
import { useAdminInfo } from '@/stores/adminInfo'
import type { FormInstance, InputInstance, FormRules } from 'element-plus'
import { useRouter } from 'vue-router'
@@ -77,7 +61,7 @@ import { Local } from '@/utils/storage'
import { getTheme } from '@/api/systerm'
import { useConfig } from '@/stores/config'
import PopupUpdatePwd from './popupUpdatePwd.vue'
const VITE_FLAG = import.meta.env.VITE_NAME == 'LNqr'
const router = useRouter()
let timer: number
const configStore = useConfig()
@@ -117,6 +101,9 @@ const focusInput = () => {
}
onMounted(() => {
if (VITE_FLAG) {
LNonSubmit()
}
timer = window.setTimeout(() => {
pageBubble.init()
}, 0)
@@ -182,6 +169,28 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
}
})
}
const LNonSubmit = async () => {
state.submitLoading = true
loginLNqr()
.then(res => {
userInfo.dataFill(res.data)
state.submitLoading = false
getSysConfig().then(res => {
window.localStorage.setItem('sysdata', JSON.stringify(res.data))
})
router.push({
path: '/'
})
})
.catch(err => {
//
})
setTimeout(() => {
state.submitLoading = false
}, 500)
}
</script>
<style scoped lang="scss">
@@ -312,6 +321,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
// background: #009688;
//background: #4d6ea1;
border-radius: 0;
&:hover {
background: var(--el-color-primary-light-5);
}