From f31d4dd07323dc0a44fe3587136ebd857a642906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Thu, 30 Mar 2023 16:23:15 +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 --- .../ConsultationDetails.vue | 16 +++++-- pages/homepage/homepage.vue | 44 ++++++++++++++++--- 2 files changed, 50 insertions(+), 10 deletions(-) diff --git a/pages/ConsultationDetails/ConsultationDetails.vue b/pages/ConsultationDetails/ConsultationDetails.vue index 8202649..3c2d31e 100644 --- a/pages/ConsultationDetails/ConsultationDetails.vue +++ b/pages/ConsultationDetails/ConsultationDetails.vue @@ -12,17 +12,27 @@ return { imageurl: null, imageurls: null, + goto: '', }; }, onShow() { this.imageurl = baseurl + '/profile/appletPicture/healthyOne.png' this.imageurls = baseurl + '/profile/appletPicture/healthyDetails.png' }, + onLoad(options) { + this.goto = options.goto + }, methods: { godetal() { - uni.navigateBack({ - delta: 1 - }) + if (this.goto == 'homepage') { + uni.navigateTo({ + url: '/pages/medicine/medicine' + }) + } else { + uni.navigateBack({ + delta: 1 + }) + } } } } diff --git a/pages/homepage/homepage.vue b/pages/homepage/homepage.vue index 65614a6..525441a 100644 --- a/pages/homepage/homepage.vue +++ b/pages/homepage/homepage.vue @@ -133,14 +133,44 @@ this.swiperImglink.forEach(e => { e.image = baseurl + e.posterPictureUrl if (e.image == item) { - if (e.jumpLink == '/pages/homepage/homepage' || e.jumpLink == '/pages/Personal/Personal') { - uni.switchTab({ - url: e.jumpLink - }) + if (e.dictLabel == '专病管理') { + const phone = uni.getStorageSync('phone'); + if (phone) { + uni.navigateToMiniProgram({ + appId: 'wxa690d053c34ceebd', + path: '/pages/index/index', + extraData: { + 'from': 'qy', + 'phone': phone + }, + success(res) {} + }) + } else { + this.$refs.uToast.show({ + title: '您未登录,请先登录', + type: 'error', + duration: '1000', + url: '/pages/login/login' + }) + } + } else if (e.dictLabel == '新医象') { + this.goycjc(); } else { - uni.navigateTo({ - url: e.jumpLink - }) + if (e.jumpLink == '/pages/ConsultationDetails/ConsultationDetails') { + const url = `/pages/ConsultationDetails/ConsultationDetails?goto=${'homepage'}` + uni.navigateTo({ + url: url + }) + } else if (e.jumpLink == '/pages/homepage/homepage' || e.jumpLink == + '/pages/Personal/Personal') { + uni.switchTab({ + url: e.jumpLink + }) + } else { + uni.navigateTo({ + url: e.jumpLink + }) + } } } })