let app = new Vue({ el: '#app', data () { return { accounts:'', password:'', userList:[ {accounts:'123',password:'123'}, {accounts:'admin',password:'123456'} ] } }, created () { }, beforeDestroy () { }, mounted () { }, methods: { goIndex(){ let that = this for(let a = 0;a{ window.location.href = '../index.html' },1000) return } } } this.$message.error('用户名不存在或密码错误'); } }, })