点击登陆后不会转入后台,但是提示登陆成功
zengjinlong opened this issue · 1 comments
zengjinlong commented
export default{ layout:'login', name: 'Login', data () { return { username: '', password: '', loginTip: '' } }, methods: { async login () { if (this.username === '' || this.password === '') { this.loginTip = '请正确填写用户名和密码' return } await this.$store.dispatch('LOGIN', { username: this.username, password: this.password }) if (this.$store.state.status.code === 200) { // 登录成功, 存储token this.$store.commit('SET_USER', this.$store.state.status.token) this.$router.push('/publish') this.username = '' this.password = '' } this.loginTip = this.$store.state.status.message } } }
wmui commented
新版本已经解决这些问题