submitForm(formName) {
this.$refs[formName].validate((valid) => {
/*console.log(this.$refs[formName]);*/
/* debugger*/
if (valid) {
if (this.highLevelTalents == '是') this.user.highLevelTalents = true;
else this.user.highLevelTalents = false;
request({
url: '/user',
headers: {
isToken: true
},
method: 'post',
timeout: 20000,
data: this.user
}).then(()=> {
ElMessageBox.alert('修改已完成,需重新加载页面', '系统提示', {
confirmButtonText: '确定',
type: 'success'
})
.then(() => {
location.reload();
}).catch(()=> {});
});
} else {
console.log('error submit!!')
return false
}
/*console.log(this.user);*/
})
}
你查下服务端,你调服务端接口报错了