修改
This commit is contained in:
parent
252e181057
commit
ef1a85e88e
@ -224,6 +224,11 @@
|
|||||||
},
|
},
|
||||||
//提交
|
//提交
|
||||||
submitend() {
|
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) {
|
if (!this.form.kindergartenName) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
message: "请选择所属幼儿园",
|
message: "请选择所属幼儿园",
|
||||||
@ -236,43 +241,34 @@
|
|||||||
type: 'error',
|
type: 'error',
|
||||||
duration: '2000'
|
duration: '2000'
|
||||||
})
|
})
|
||||||
}
|
}else{
|
||||||
if(this.form.studentSex=='男'){
|
this.$refs.uForm.validate().then(res => {
|
||||||
this.$set(this.form,'studentSex','MALE')
|
// uni.$u.toast('校验通过')
|
||||||
}else if(this.form.studentSex=='女'){
|
updateStudent(this.form).then(res => {
|
||||||
this.$set(this.form,'studentSex','FEMALE')
|
if (res.code == 200) {
|
||||||
}
|
this.$refs.uToast.show({
|
||||||
this.$refs.uForm.validate().then(res => {
|
message: "提交成功",
|
||||||
// uni.$u.toast('校验通过')
|
type: 'success',
|
||||||
updateStudent(this.form).then(res => {
|
duration: '2000'
|
||||||
if (res.code == 200) {
|
|
||||||
this.$refs.uToast.show({
|
|
||||||
message: "提交成功",
|
|
||||||
type: 'success',
|
|
||||||
duration: '2000'
|
|
||||||
})
|
|
||||||
setTimeout(e => {
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/Personal/Personal'
|
|
||||||
})
|
})
|
||||||
}, 1000)
|
setTimeout(e => {
|
||||||
|
uni.reLaunch({
|
||||||
} else if (res.code == 500) {
|
url: '/pages/Personal/Personal'
|
||||||
console.log('11111111')
|
})
|
||||||
this.$refs.uToast.show({
|
}, 1000)
|
||||||
message: res.msg,
|
|
||||||
type: 'error',
|
} else if (res.code == 500) {
|
||||||
duration: '2000'
|
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'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user