| | |
| | | import { validUsername } from '@/utils/validate' |
| | | import { getCookie, removeCookie, setCookie } from '@/utils/auth' |
| | | import { ForcedOffline } from '@/api/user' |
| | | import { ButtonData } from '@/api/basicSettings' |
| | | import Vue from 'vue' |
| | | |
| | | export default { |
| | | name: 'Login', |
| | |
| | | if (valid) { |
| | | this.loading = true |
| | | this.$store.dispatch('user/login', this.loginForm).then(() => { |
| | | console.log(getCookie('code') === '302', 9999) |
| | | // console.log(getCookie('code') === '302', 9999) |
| | | if (getCookie('code') === '302') { |
| | | this.dialogVisible = true |
| | | } else { |
| | | this.$router.push({ path: this.redirect || '/' }) |
| | | ButtonData().then(res => { |
| | | sessionStorage.setItem('ButtonData', JSON.stringify(res.data)) |
| | | }) |
| | | } |
| | | this.loading = false |
| | | }).catch(() => { |