// 保存
saveData() {
teacher.save(this.teacher).then(response => {
return this.$message({
type: 'success',
message: '保存成功!'
})
}).then(resposne => {
// 路由跳转,添加完成后跳转到列表页面
this.$router.push({ path: '/edu/teacher' })
}).catch((response) => {
// console.log(response)
this.$message({
type: 'error',
message: '保存失败'
})
})
}
取自谷粒学院项目