|
|
|
@ -223,29 +223,29 @@ export default {
@@ -223,29 +223,29 @@ export default {
|
|
|
|
|
if (valid) { |
|
|
|
|
this.loading = true |
|
|
|
|
let thiss = this; |
|
|
|
|
// axios.post('/api/mkdir', { |
|
|
|
|
// firstName: 'Fred', |
|
|
|
|
// 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 |
|
|
|
|
axios.post('/api/mkdir', { |
|
|
|
|
firstName: 'Fred', |
|
|
|
|
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 |
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
console.log('error submit!!') |
|
|
|
|