This commit is contained in:
shidongli 2023-11-15 10:47:50 +08:00
parent 54af0a0bd0
commit 0154813391
2 changed files with 100 additions and 80 deletions

View File

@ -43,6 +43,7 @@
<script> <script>
import { import {
mapState,
mapActions mapActions
} from "vuex"; } from "vuex";
import { import {
@ -72,45 +73,48 @@
this.getHeathHousing(); this.getHeathHousing();
}, },
methods: { methods: {
//
...mapActions(["openPopup"]),
goAppointmentscreening() { goAppointmentscreening() {
this.openPopup(); //
setTimeout(e => {
// if (!this.userInfo) {
if (!this.userInfo) { uni.showModal({
uni.showModal({ title: "提示",
title: "提示", content: "您还未注册,是否去注册?",
content: "您还未注册,是否去注册?", confirmText: '是',
confirmText: '是', cancelText: '否',
cancelText: '否', success(res) {
success(res) { if (res.confirm) {
if (res.confirm) { uni.redirectTo({
uni.redirectTo({ url: "/pages/register/register"
url: "/pages/register/register" })
}) } else {
} else { wx.exitMiniProgram()
wx.exitMiniProgram()
}
},
})
} else {
getScreening(this.patientId).then(res => {
if (res.code == 200) {
let userinfo = JSON.stringify(this.userInfo)
if (!res.data || res.data == null) {
uni.navigateTo({
url: `/pagesB/screenorder/screenorder?userinfo=${userinfo}`
})
} else {
uni.navigateTo({
url: `/pagesB/orderlist/orderlist?userinfo=${userinfo}`
})
}
} }
}) },
} })
}, 0) }
else {
getScreening(this.patientId).then(res => {
if (res.code == 200) {
let userinfo = JSON.stringify(this.userInfo)
if (!res.data || res.data == null) {
uni.navigateTo({
url: `/pagesB/screenorder/screenorder?userinfo=${userinfo}`
})
} else {
uni.navigateTo({
url: `/pagesB/orderlist/orderlist?userinfo=${userinfo}`
})
}
}
})
}
// uni.navigateTo({
// url: '/pagesB/screenorder/screenorder'
// })
// uni.navigateTo({
// url: '/pagesB/orderlist/orderlist'
// })
}, },
//item //item
gohealthitem(item) { gohealthitem(item) {
@ -128,6 +132,7 @@
url: '/pages/login/login' url: '/pages/login/login'
}) })
} }
}, },
// //
getHeathHousing() { getHeathHousing() {
@ -141,6 +146,8 @@
}) })
}, },
// //
//
...mapActions(["openPopup"]),
gomaterialbenefits() { gomaterialbenefits() {
// //
// this.$store.dispatch("openPopup"); // this.$store.dispatch("openPopup");
@ -181,6 +188,7 @@
url: '/pages/login/login' url: '/pages/login/login'
}) })
} }
}, 0) }, 0)
}, },
// //
@ -199,29 +207,31 @@
url: '/pages/login/login' url: '/pages/login/login'
}) })
} }
}, },
// //
result() { result() {
this.openPopup(); const value = uni.getStorageSync('openid');
setTimeout(e => { const value2 = uni.getStorageSync('patientId');
const value = uni.getStorageSync('openid'); if (value && value2) {
const value2 = uni.getStorageSync('patientId'); uni.navigateTo({
if (value && value2) { url: '/pagesB/SelectItem/SelectItem'
uni.navigateTo({ })
url: '/pagesB/SelectItem/SelectItem' } else {
}) this.$refs.uToast.show({
} else { title: '您未登录,请先登录',
this.$refs.uToast.show({ type: 'error',
title: '您未登录,请先登录', duration: '1000',
type: 'error', url: '/pages/login/login'
duration: '1000', })
url: '/pages/login/login' }
})
}
}, 50)
}, },
// //
goshopping() { goshopping() {
// this.openPopup();
setTimeout(e => { setTimeout(e => {
const value = uni.getStorageSync('openid'); const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId'); const value2 = uni.getStorageSync('patientId');
@ -237,27 +247,34 @@
url: '/pages/login/login' url: '/pages/login/login'
}) })
} }
}, 0) }, 0)
}, },
// //
goconsultationplatform() { goconsultationplatform() {
this.openPopup(); const value = uni.getStorageSync('openid');
setTimeout(e => { const value2 = uni.getStorageSync('patientId');
const value = uni.getStorageSync('openid'); const value3 = uni.getStorageSync('region');
const value2 = uni.getStorageSync('patientId'); if (value && value2 &&value3!=3) {
if (value && value2) { uni.navigateTo({
uni.navigateTo({ url: '/pagesB/consultationplatform/consultationplatform',
url: '/pagesB/consultationplatform/consultationplatform', })
}) } else if(!value && !value2) {
} else { this.$refs.uToast.show({
this.$refs.uToast.show({ title: '您未登录,请先登录',
title: '您未登录,请先登录', type: 'error',
type: 'error', duration: '1000',
duration: '1000', url: '/pages/login/login'
url: '/pages/login/login' })
}) }else if(value3==3){
} this.$refs.uToast.show({
}, 0) title: '请重新选择区域',
type: 'error',
duration: '1000',
})
}
}, },
}, },
//1. //1.

View File

@ -71,20 +71,17 @@
}; };
}, },
onLoad() { onLoad() {
this.region = uni.getStorageSync('region')
this.baseurl = baseurl this.baseurl = baseurl
this.info()
this.selectDepartmentinfo(); this.selectDepartmentinfo();
}, },
methods: { methods: {
info() { info() {
this.region = uni.getStorageSync('region')
if (this.region == 3) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '当前地区不支持,请重新选择区域', title: '当前地区不支持,请重新选择区域',
type: 'error', type: 'error',
duration: '2000', duration: '2000',
}) })
}
}, },
// //
selectHospitalPersonInfo() { selectHospitalPersonInfo() {
@ -120,9 +117,15 @@
}, },
// //
goimagetextConsultation() { goimagetextConsultation() {
uni.navigateTo({ if(this.region != 3){
url: '/pagesB/imagetextConsultation/imagetextConsultation' uni.navigateTo({
}) url: '/pagesB/imagetextConsultation/imagetextConsultation'
})
}else{
this.info()
}
}, },
// //
// godoctordetails() { // godoctordetails() {