登陆界面移除默认登陆用户名和密码
This commit is contained in:
parent
9c25a47261
commit
078b82a541
|
@ -23,11 +23,11 @@ import { mapActions } from 'vuex'
|
|||
import { timeFix } from '@/utils/util'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
username: 'admin',
|
||||
password: 'daobang123'
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
rules: {
|
||||
username: [{ required: true, message: '请输入用户名' }],
|
||||
|
@ -38,7 +38,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
...mapActions(['Login', 'Logout']),
|
||||
handleSubmit () {
|
||||
handleSubmit() {
|
||||
if (this.loading) {
|
||||
return false
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
loginSuccess (res) {
|
||||
loginSuccess(res) {
|
||||
this.loading = false
|
||||
this.$router.push({ path: '/' })
|
||||
// 延迟 1 秒显示欢迎信息
|
||||
|
@ -68,7 +68,7 @@ export default {
|
|||
})
|
||||
}, 1000)
|
||||
},
|
||||
requestFailed () {
|
||||
requestFailed() {
|
||||
this.loading = false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue