This commit is contained in:
shidongli 2023-11-15 14:14:12 +08:00
parent fad1cfccf3
commit 024044cc11

View File

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