|
|
@ -223,29 +223,29 @@ export default { |
|
|
|
if (valid) { |
|
|
|
if (valid) { |
|
|
|
this.loading = true |
|
|
|
this.loading = true |
|
|
|
let thiss = this; |
|
|
|
let thiss = this; |
|
|
|
// axios.post('/api/mkdir', { |
|
|
|
axios.post('/api/mkdir', { |
|
|
|
// firstName: 'Fred', |
|
|
|
firstName: 'Fred', |
|
|
|
// lastName: 'Flintstone' |
|
|
|
lastName: 'Flintstone' |
|
|
|
// }) |
|
|
|
|
|
|
|
// .then(function (response) { |
|
|
|
|
|
|
|
// console.log(thiss.$router) |
|
|
|
|
|
|
|
// thiss.$router.push({ path: '/usermange'}) |
|
|
|
|
|
|
|
// console.log(response + 'ffef'); |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
// .catch(function (error) { |
|
|
|
|
|
|
|
// console.log(error); |
|
|
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
// this.$message({ |
|
|
|
|
|
|
|
// showClose: true, |
|
|
|
|
|
|
|
// message: '错了哦,这是一条错误消息', |
|
|
|
|
|
|
|
// type: 'error' |
|
|
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
this.$store.dispatch('user/login', this.loginForm).then(() => { |
|
|
|
|
|
|
|
this.$router.push({ path: this.redirect || '/' }) |
|
|
|
|
|
|
|
this.loading = false |
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
this.loading = false |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
.then(function (response) { |
|
|
|
|
|
|
|
console.log(thiss.$router) |
|
|
|
|
|
|
|
thiss.$router.push({ path: '/usermange'}) |
|
|
|
|
|
|
|
console.log(response + 'ffef'); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.catch(function (error) { |
|
|
|
|
|
|
|
console.log(error); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
showClose: true, |
|
|
|
|
|
|
|
message: '错了哦,这是一条错误消息', |
|
|
|
|
|
|
|
type: 'error' |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
// this.$store.dispatch('user/login', this.loginForm).then(() => { |
|
|
|
|
|
|
|
// this.$router.push({ path: this.redirect || '/' }) |
|
|
|
|
|
|
|
// this.loading = false |
|
|
|
|
|
|
|
// }).catch(() => { |
|
|
|
|
|
|
|
// this.loading = false |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
console.log('error submit!!') |
|
|
|
console.log('error submit!!') |
|
|
|