From 63905fba4146aa02db8eee138b21dfae1a27a0a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=89?= <814457906@qq.com> Date: Thu, 9 Nov 2023 16:15:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/register/register.vue | 107 ++++++++---------- .../consultationplatform.vue | 8 -- pagesB/healthybeans/healthybeans.vue | 25 ++-- 3 files changed, 63 insertions(+), 77 deletions(-) diff --git a/pages/register/register.vue b/pages/register/register.vue index 9aa283a..6b8e447 100644 --- a/pages/register/register.vue +++ b/pages/register/register.vue @@ -248,7 +248,7 @@ }, { value: '3', label: '高血脂' - },], + }, ], arealist: [], //区街道list list: [{ id: "", @@ -362,10 +362,7 @@ console.log(e, '打印e') }, submit() { - var that = this - // console.log(that.query) - // console.log(that.query.diseaseList.length,'000') that.query.openid = uni.getStorageSync('openid'); that.query.cityCode = uni.getStorageSync('region'); if (that.query.sexname == '男') { @@ -373,59 +370,54 @@ } else if (that.query.sexname == '女') { that.query.sex = 'FEMALE'; } + if (that.selected == 1) { + that.$refs.uToast.show({ + title: '请审核并同意用户协议', + type: 'error' + }) + return + } else if (that.query.sex == "") { + that.$refs.uToast.show({ + title: '请选择性别', + type: 'error' + }) + return + } else if (!that.query.locationName) { + that.$refs.uToast.show({ + title: '请选择所在位置', + type: 'error' + }) + return + } else if (!that.query.birthDate) { + that.$refs.uToast.show({ + title: '请选择出生日期', + type: 'error' + }) + return + } that.$refs.uForm.validate(valid => { if (valid) { - - if (that.selected == 1) { - that.$refs.uToast.show({ - title: '请审核并同意用户协议', - type: 'error' - }) - } else if (that.query.sex == "") { - that.$refs.uToast.show({ - title: '请选择性别', - type: 'error' - }) - } else if (!that.query.locationName) { - that.$refs.uToast.show({ - title: '请选择所在位置', - type: 'error' - }) - } else if (!that.query.birthDate) { - that.$refs.uToast.show({ - title: '请选择出生日期', - type: 'error' - }) - } - // else if (that.query.diseaseList.length == 0) { - // that.$refs.uToast.show({ - // title: '请选择基础疾病', - // type: 'error' - // }) - // } - else { - registerdata(that.query).then(res => { - if (res.code == 200) { - getCurrentUser(that.query.openid, that.query.cityCode).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', - duration: '1000', - back: 1, - }) - }) - } else { + registerdata(that.query).then(res => { + if (res.code == 200) { + getCurrentUser(that.query.openid, that.query.cityCode).then(res => { + uni.setStorageSync('patientId', res.data.id); + uni.setStorageSync('patientName', res.data.patientName); + uni.setStorageSync("userinfo", res.data) that.$refs.uToast.show({ - title: res.msg, - type: 'error', + title: '注册成功', + type: 'success', + duration: '1000', + back: 1, }) - } - }) - } - } else {} + }) + } else { + that.$refs.uToast.show({ + title: res.msg, + type: 'error', + }) + } + }) + } }); }, //切换 @@ -574,9 +566,10 @@ justify-content: center; align-items: center; background: #fff; - ::v-deep .select-modal .select-dialog{ - height: 370rpx !important; - + + ::v-deep .select-modal .select-dialog { + height: 370rpx !important; + } .Agreement { @@ -909,4 +902,4 @@ /deep/ .u-form-item__message { padding-left: 0 !important; } - + \ No newline at end of file diff --git a/pagesB/consultationplatform/consultationplatform.vue b/pagesB/consultationplatform/consultationplatform.vue index ae637d4..4639d13 100644 --- a/pagesB/consultationplatform/consultationplatform.vue +++ b/pagesB/consultationplatform/consultationplatform.vue @@ -77,20 +77,12 @@ methods: { info() { this.region = uni.getStorageSync('region') - console.log(this.region, '859') if (this.region == 3) { this.$refs.uToast.show({ title: '当前地区不支持,请重新选择区域', type: 'error', duration: '2000', - // url:'/pages/homepage/homepage' }) - uni.navigateTo({ - '/pages/homepage/homepage' - }) - // uni.navigateBack({ - // delta: 1 - // }) } }, //人员 diff --git a/pagesB/healthybeans/healthybeans.vue b/pagesB/healthybeans/healthybeans.vue index 54e24aa..b8b9f83 100644 --- a/pagesB/healthybeans/healthybeans.vue +++ b/pagesB/healthybeans/healthybeans.vue @@ -77,7 +77,7 @@ 已签到 -