修改
This commit is contained in:
parent
54af0a0bd0
commit
0154813391
@ -43,6 +43,7 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState,
|
||||
mapActions
|
||||
} from "vuex";
|
||||
import {
|
||||
@ -72,45 +73,48 @@
|
||||
this.getHeathHousing();
|
||||
},
|
||||
methods: {
|
||||
// 第一种 直接映射
|
||||
...mapActions(["openPopup"]),
|
||||
goAppointmentscreening() {
|
||||
this.openPopup();
|
||||
setTimeout(e => {
|
||||
// 筛查预约
|
||||
if (!this.userInfo) {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "您还未注册,是否去注册?",
|
||||
confirmText: '是',
|
||||
cancelText: '否',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: "/pages/register/register"
|
||||
})
|
||||
} else {
|
||||
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}`
|
||||
})
|
||||
}
|
||||
// 筛查预约
|
||||
|
||||
if (!this.userInfo) {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "您还未注册,是否去注册?",
|
||||
confirmText: '是',
|
||||
cancelText: '否',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: "/pages/register/register"
|
||||
})
|
||||
} else {
|
||||
wx.exitMiniProgram()
|
||||
}
|
||||
})
|
||||
}
|
||||
}, 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
|
||||
gohealthitem(item) {
|
||||
@ -128,6 +132,7 @@
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
// 健康常识
|
||||
getHeathHousing() {
|
||||
@ -141,6 +146,8 @@
|
||||
})
|
||||
},
|
||||
//新人福利
|
||||
// 第一种 直接映射
|
||||
...mapActions(["openPopup"]),
|
||||
gomaterialbenefits() {
|
||||
// 第二种引入
|
||||
// this.$store.dispatch("openPopup");
|
||||
@ -181,6 +188,7 @@
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
|
||||
}, 0)
|
||||
},
|
||||
//健康常识
|
||||
@ -199,29 +207,31 @@
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
// 筛查结果
|
||||
result() {
|
||||
this.openPopup();
|
||||
setTimeout(e => {
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value && value2) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesB/SelectItem/SelectItem'
|
||||
})
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: '您未登录,请先登录',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
}, 50)
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value && value2) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesB/SelectItem/SelectItem'
|
||||
})
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: '您未登录,请先登录',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
//跳转商城
|
||||
goshopping() {
|
||||
// this.openPopup();
|
||||
setTimeout(e => {
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
@ -237,27 +247,34 @@
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
|
||||
}, 0)
|
||||
},
|
||||
//问诊平台
|
||||
goconsultationplatform() {
|
||||
this.openPopup();
|
||||
setTimeout(e => {
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value && value2) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesB/consultationplatform/consultationplatform',
|
||||
})
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: '您未登录,请先登录',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
}, 0)
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
const value3 = uni.getStorageSync('region');
|
||||
if (value && value2 &&value3!=3) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesB/consultationplatform/consultationplatform',
|
||||
})
|
||||
} else if(!value && !value2) {
|
||||
this.$refs.uToast.show({
|
||||
title: '您未登录,请先登录',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}else if(value3==3){
|
||||
this.$refs.uToast.show({
|
||||
title: '请重新选择区域',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
//1.分享给朋友
|
||||
@ -283,4 +300,4 @@
|
||||
|
||||
<style lang="scss">
|
||||
@import "./medicalservice.scss";
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -71,20 +71,17 @@
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.region = uni.getStorageSync('region')
|
||||
this.baseurl = baseurl
|
||||
this.info()
|
||||
this.selectDepartmentinfo();
|
||||
},
|
||||
methods: {
|
||||
info() {
|
||||
this.region = uni.getStorageSync('region')
|
||||
if (this.region == 3) {
|
||||
this.$refs.uToast.show({
|
||||
title: '当前地区不支持,请重新选择区域',
|
||||
type: 'error',
|
||||
duration: '2000',
|
||||
})
|
||||
}
|
||||
},
|
||||
//人员
|
||||
selectHospitalPersonInfo() {
|
||||
@ -120,9 +117,15 @@
|
||||
},
|
||||
//图文问诊
|
||||
goimagetextConsultation() {
|
||||
uni.navigateTo({
|
||||
url: '/pagesB/imagetextConsultation/imagetextConsultation'
|
||||
})
|
||||
if(this.region != 3){
|
||||
uni.navigateTo({
|
||||
url: '/pagesB/imagetextConsultation/imagetextConsultation'
|
||||
})
|
||||
|
||||
}else{
|
||||
this.info()
|
||||
}
|
||||
|
||||
},
|
||||
//医生详情
|
||||
// godoctordetails() {
|
||||
@ -284,4 +287,4 @@
|
||||
margin: 20rpx auto 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user