| | |
| | | <script setup> |
| | | import { useStore } from 'vuex' |
| | | import { ElLoading } from 'element-plus' |
| | | import { logOutFun } from '@/utils/util' |
| | | |
| | | const store = useStore() |
| | | const router = useRouter() |
| | |
| | | let loading = ElLoading.service({ background: 'rgba(0, 0, 0, 0.3)', text: '加载中...' }) |
| | | const tagWel = computed(() => store.state.tags.tagWel) |
| | | const redirect = route.query.redirect |
| | | store |
| | | .dispatch('LoginByUsername', { |
| | | username: userName, |
| | | password: userName === 'admin' ? 'admin' :'jadk@2026', |
| | | tenantId: '000000', |
| | | type: 'account', |
| | | }) |
| | | .then(() => { |
| | | loading.close() |
| | | router.push(redirect || tagWel.value) |
| | | }) |
| | | .catch(err => { |
| | | loading.close() |
| | | // 返回上一个路由 |
| | | window.history.go(-1) |
| | | }) |
| | | |
| | | if (userName) { |
| | | store |
| | | .dispatch('LoginByUsername', { |
| | | username: userName, |
| | | password: userName === 'admin' ? 'admin' :'jadk@2026', |
| | | tenantId: '000000', |
| | | type: 'account', |
| | | }) |
| | | .then(() => { |
| | | loading.close() |
| | | router.push(redirect || tagWel.value) |
| | | }) |
| | | .catch(err => { |
| | | loading.close() |
| | | // 返回上一个路由 |
| | | window.history.go(-1) |
| | | }) |
| | | }else{ |
| | | loading.close() |
| | | logOutFun() |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"></style> |
| | |
| | | <template> |
| | | <div style="width: 100%; height: 100%; background: #FFFFFF"></div> |
| | | <div style="width: 100%; height: 100%; background: #ffffff"></div> |
| | | </template> |
| | | <script setup> |
| | | import { useStore } from 'vuex' |
| | | import { ElLoading } from 'element-plus' |
| | | import { logOutFun } from '@/utils/util' |
| | | |
| | | const store = useStore() |
| | | const router = useRouter() |
| | |
| | | let loading = ElLoading.service({ background: 'rgba(0, 0, 0, 0.3)', text: '加载中...' }) |
| | | const tagWel = computed(() => store.state.tags.tagWel) |
| | | const redirect = route.query.redirect |
| | | store |
| | | .dispatch('LoginByUsername', { |
| | | username: userName, |
| | | password: userName === 'admin' ? 'admin' :'jadk@2026', |
| | | tenantId: '000000', |
| | | type: 'account', |
| | | }) |
| | | .then(() => { |
| | | loading.close() |
| | | router.push(redirect || tagWel.value) |
| | | }) |
| | | .catch(err => { |
| | | loading.close() |
| | | // 返回上一个路由 |
| | | window.history.go(-1) |
| | | }) |
| | | |
| | | if (userName) { |
| | | store |
| | | .dispatch('LoginByUsername', { |
| | | username: userName, |
| | | password: userName === 'admin' ? 'admin' : 'jadk@2026', |
| | | tenantId: '000000', |
| | | type: 'account', |
| | | }) |
| | | .then(() => { |
| | | loading.close() |
| | | router.push(redirect || tagWel.value) |
| | | }) |
| | | .catch(err => { |
| | | loading.close() |
| | | // 返回上一个路由 |
| | | window.history.go(-1) |
| | | }) |
| | | } else { |
| | | loading.close() |
| | | logOutFun() |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"></style> |