|
@@ -53,7 +53,6 @@
|
|
|
<script setup>
|
|
|
import {systemTitle} from '@/config'
|
|
|
import {reactive} from 'vue'
|
|
|
-import {useRoute, useRouter} from 'vue-router'
|
|
|
import {ElInput, ElButton} from 'element-plus'
|
|
|
import {closeWebSocket} from '@/utils/websocket'
|
|
|
import {isDev, SYSTEM_CONFIG} from '@/utils/public'
|
|
@@ -64,9 +63,8 @@ import setDialogToJs from "@/components/js-dialog-comp/useDialogToJs";
|
|
|
import ForgotPassword from "@/views/system/forgot-password/ForgotPassword.vue";
|
|
|
import {loginApi} from "@/api/login";
|
|
|
import {useUserStore} from "@/pinia/user-store";
|
|
|
+import router from "@/router";
|
|
|
|
|
|
-const router = useRouter()
|
|
|
-const route = useRoute()
|
|
|
const showPwd = ref(false)
|
|
|
|
|
|
const form = reactive({
|
|
@@ -92,14 +90,13 @@ const submit = () => {
|
|
|
loginApi(params).then((res) => {
|
|
|
localStorage.clear()
|
|
|
userStore.setUserInfo(res)
|
|
|
- localStorage.removeItem('tabs')
|
|
|
if (!checkPasswordStrength(params.password) && !isDev) {
|
|
|
changePassword(false).then(newPassword => {
|
|
|
form.password = newPassword
|
|
|
submit()
|
|
|
})
|
|
|
} else {
|
|
|
- router.push(route.query.redirect || '/')
|
|
|
+ router.push('/dashboard')
|
|
|
}
|
|
|
})
|
|
|
}
|