管理家庭成员 添加

This commit is contained in:
shidongli 2023-11-14 17:25:43 +08:00
parent eef77f38ae
commit 65ea5f116b
3 changed files with 66 additions and 35 deletions

View File

@ -397,25 +397,38 @@
}
that.$refs.uForm.validate(valid => {
if (valid) {
registerdata(that.query).then(res => {
if (res.code == 200) {
getCurrentUser(that.query.openid).then(res => {
uni.setStorageSync('patientId', res.data.id);
uni.setStorageSync('patientName', res.data.patientName);
uni.setStorageSync("userinfo", res.data)
that.$refs.uToast.show({
title: '注册成功',
type: 'success',
back: 1,
})
})
} else {
that.$refs.uToast.show({
title: res.msg,
type: 'error',
if (that.addresslength) {
if (that.addresslength.length > 2) {
registerdata(that.query).then(res => {
if (res.code == 200) {
getCurrentUser(that.query.openid).then(res => {
uni.setStorageSync('patientId', res.data.id);
uni.setStorageSync('patientName', res.data.patientName);
uni.setStorageSync("userinfo", res.data)
that.$refs.uToast.show({
title: '注册成功',
type: 'success',
back: 1,
})
})
} else {
that.$refs.uToast.show({
title: res.msg,
type: 'error',
})
}
})
}
})
else {
that.$refs.uToast.show({
title: '所属区域应选择所在的区或街道,请重新选择!',
type: 'error'
})
}
}
}
});
},

View File

@ -458,28 +458,46 @@
type: 'error'
})
}
if (_this.form.areaCode == "") {
_this.$refs.uToast.show({
title: '请选择所属区域',
type: 'error'
})
}
_this.$refs.uForm.validate(valid => {
if (valid) {
registerdata(_this.form).then(res => {
if (res.code == 500) {
_this.$refs.uToast.show({
title: res.msg,
type: 'error'
})
} else {
_this.$refs.uToast.show({
title: '添加成功',
type: 'success'
})
uni.navigateBack({
delta: 1
})
// this.back()
if (_this.addresslength) {
if (_this.addresslength.length > 2) {
registerdata(_this.form).then(res => {
if (res.code == 500) {
_this.$refs.uToast.show({
title: res.msg,
type: 'error'
})
} else {
_this.$refs.uToast.show({
title: '添加成功',
type: 'success'
})
uni.navigateBack({
delta: 1
})
// this.back()
}
})
}
else {
_this.$refs.uToast.show({
title: '所属区域应选择所在的区或街道,请重新选择!',
type: 'error'
})
}
}
})
}

View File

@ -209,7 +209,7 @@
baseurl: '', //url
orderlist: [], //list
total: 0, //list
show: false, //
// show: false, //
img: '', //
orderStatus: '', //
getCodeText: null,