diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue index b680a3f..ba9eac8 100644 --- a/src/views/user/Login.vue +++ b/src/views/user/Login.vue @@ -301,7 +301,7 @@ export default { }, loginSuccess(res) { if (res.code === 0) { - this.$router.push({ name: 'repairStatistics' }, () => { // 登录跳转 + this.$router.push({ name: 'index' }, () => { // 登录跳转 this.$notification.success({ message: '欢迎', description: `${timeFix()},欢迎回来` diff --git a/src/views/user/LoginCode.vue b/src/views/user/LoginCode.vue index 5371f36..7a37c91 100644 --- a/src/views/user/LoginCode.vue +++ b/src/views/user/LoginCode.vue @@ -1,9 +1,12 @@ @@ -15,7 +18,7 @@ import { loginByCode, qrCode } from '@/api/login' import storage from 'store' import { ACCESS_TOKEN } from '@/store/mutation-types' import { timeFix } from '@/utils/util' -import VueQr from "vue-qr" +import VueQr from 'vue-qr' export default { components: { @@ -37,6 +40,9 @@ export default { clearInterval(this.intervalId) }, methods: { + goIndex() { + window.open('/shoot-hand-html/') + }, getLoginUrl() { qrCode().then(res => { if (res.code === 0) { @@ -53,14 +59,15 @@ export default { if (res.code == 0) { // 扫码成功 clearInterval(this.intervalId) - console.log('登录成功!') + this.isLogin = true storage.set(ACCESS_TOKEN, res.token, 14 * 24 * 60 * 60 * 1000) // 14天过期 - this.$router.push({ name: 'index' }, () => { // 登录跳转 - this.$notification.success({ - message: '欢迎', - description: `${timeFix()},欢迎回来` - }) - }) + this.goIndex() + // this.$router.push({ name: 'index' }, () => { // 登录跳转 + // this.$notification.success({ + // message: '欢迎', + // description: `${timeFix()},欢迎回来` + // }) + // }) } }) }