This commit is contained in:
闫晓茹 2023-08-18 10:49:19 +08:00
parent 252e181057
commit ef1a85e88e

View File

@ -224,6 +224,11 @@
},
//
submitend() {
if(this.form.studentSex=='男'){
this.$set(this.form,'studentSex','MALE')
}else if(this.form.studentSex=='女'){
this.$set(this.form,'studentSex','FEMALE')
}
if (!this.form.kindergartenName) {
this.$refs.uToast.show({
message: "请选择所属幼儿园",
@ -236,43 +241,34 @@
type: 'error',
duration: '2000'
})
}
if(this.form.studentSex=='男'){
this.$set(this.form,'studentSex','MALE')
}else if(this.form.studentSex=='女'){
this.$set(this.form,'studentSex','FEMALE')
}
this.$refs.uForm.validate().then(res => {
// uni.$u.toast('')
updateStudent(this.form).then(res => {
if (res.code == 200) {
this.$refs.uToast.show({
message: "提交成功",
type: 'success',
duration: '2000'
})
setTimeout(e => {
uni.reLaunch({
url: '/pages/Personal/Personal'
}else{
this.$refs.uForm.validate().then(res => {
// uni.$u.toast('')
updateStudent(this.form).then(res => {
if (res.code == 200) {
this.$refs.uToast.show({
message: "提交成功",
type: 'success',
duration: '2000'
})
}, 1000)
} else if (res.code == 500) {
console.log('11111111')
this.$refs.uToast.show({
message: res.msg,
type: 'error',
duration: '2000'
})
}
setTimeout(e => {
uni.reLaunch({
url: '/pages/Personal/Personal'
})
}, 1000)
} else if (res.code == 500) {
this.$refs.uToast.show({
message: res.msg,
type: 'error',
duration: '2000'
})
}
})
}).catch(errors => {
})
}).catch(errors => {
this.$refs.uToast.show({
message: errors,
type: 'error',
duration: '2000'
})
})
}
},