|
@ -6,6 +6,7 @@ import password from 'assets/images/password_icon.svg' |
|
|
import user from 'assets/images/user_icon.svg' |
|
|
import user from 'assets/images/user_icon.svg' |
|
|
import SoftKeyboard from 'components/common/SoftKeyboard/index.vue' |
|
|
import SoftKeyboard from 'components/common/SoftKeyboard/index.vue' |
|
|
import { nanoid } from 'nanoid' |
|
|
import { nanoid } from 'nanoid' |
|
|
|
|
|
import { useDeviceStore } from 'stores/deviceStore' |
|
|
import { useSystemStore } from 'stores/systemStore' |
|
|
import { useSystemStore } from 'stores/systemStore' |
|
|
import { ref, watchEffect } from 'vue' |
|
|
import { ref, watchEffect } from 'vue' |
|
|
import { useRouter } from 'vue-router' |
|
|
import { useRouter } from 'vue-router' |
|
@ -15,6 +16,7 @@ import { setToken } from '@/libs/token' |
|
|
|
|
|
|
|
|
const router = useRouter() |
|
|
const router = useRouter() |
|
|
const sys = useSystemStore() |
|
|
const sys = useSystemStore() |
|
|
|
|
|
const deviceStore = useDeviceStore() |
|
|
const formRef = ref() |
|
|
const formRef = ref() |
|
|
const loading = ref(false) |
|
|
const loading = ref(false) |
|
|
const inputValue = ref('') |
|
|
const inputValue = ref('') |
|
@ -71,6 +73,7 @@ const loginHandle = async () => { |
|
|
syncSendCmd(params).then((res) => { |
|
|
syncSendCmd(params).then((res) => { |
|
|
if (res.ackcode === 0) { |
|
|
if (res.ackcode === 0) { |
|
|
localStorage.setItem('user', JSON.stringify(res.rely.loginUser)) |
|
|
localStorage.setItem('user', JSON.stringify(res.rely.loginUser)) |
|
|
|
|
|
deviceStore.setDeviceState(res.rely.loginUser) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
await router.push('/home') |
|
|
await router.push('/home') |
|
|