首页修改+签约信息跳转
This commit is contained in:
parent
a0c54b7d99
commit
55c14baf4d
@ -81,7 +81,6 @@
|
||||
<script>
|
||||
import {
|
||||
getOpenId,
|
||||
getCurrentUser,
|
||||
detail,
|
||||
checkSignApply
|
||||
} from '@/api/pages/homepage/homepage.js'
|
||||
@ -89,10 +88,14 @@
|
||||
data() {
|
||||
return {
|
||||
patientName: '',
|
||||
userinfo: null,
|
||||
userinfo: {
|
||||
cityCode: "",
|
||||
},
|
||||
|
||||
region: '',
|
||||
checkSign: null,
|
||||
address: '',
|
||||
openid: '',
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@ -100,6 +103,10 @@
|
||||
},
|
||||
onShow() {
|
||||
this.address = uni.getStorageSync('location')
|
||||
this.userinfo = uni.getStorageSync('userinfo')
|
||||
this.openid = uni.getStorageSync('openid');
|
||||
this.cityCode = this.userinfo.cityCode;
|
||||
|
||||
if (this.address == '德州市') {
|
||||
uni.setStorageSync("region", 1)
|
||||
} else if (this.address == '东营市') {
|
||||
@ -107,7 +114,16 @@
|
||||
} else if (this.address == '济南市') {
|
||||
uni.setStorageSync("region", 3)
|
||||
}
|
||||
this.userinfo = uni.getStorageSync('userinfo');
|
||||
this.region = uni.getStorageSync('region')
|
||||
if (this.region) {
|
||||
if (this.region == "1" || this.region == "2") {
|
||||
|
||||
} else {
|
||||
this.family()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (this.userinfo) {
|
||||
this.patientName = this.userinfo.patientName
|
||||
checkSignApply(this.userinfo.cardNo).then(res => {
|
||||
@ -123,6 +139,7 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
city() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/location/location'
|
||||
@ -134,6 +151,7 @@
|
||||
url: "/pages/login/login"
|
||||
})
|
||||
},
|
||||
|
||||
gologin() {
|
||||
this.$refs.uToast.show({
|
||||
title: '您未登录,请先登录',
|
||||
@ -142,23 +160,45 @@
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
},
|
||||
// 家医功能提示
|
||||
family() {
|
||||
this.$refs.uToast.show({
|
||||
title: '请切换城市,再操作家医相关功能',
|
||||
type: 'error',
|
||||
duration: '3000',
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
// 家医签约
|
||||
goonline() {
|
||||
if (!this.userinfo) {
|
||||
this.gologin();
|
||||
} else {
|
||||
if (!this.checkSign) {
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: "/pagesC/Onlinesigning/Onlinesigning"
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pagesB/mysigning/mysigning"
|
||||
})
|
||||
if (this.region == "3") {
|
||||
this.family()
|
||||
} else{
|
||||
if (this.cityCode == "1" || this.cityCode == "2") {
|
||||
if (!this.checkSign) {
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: "/pagesC/Onlinesigning/Onlinesigning"
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pagesB/mysigning/mysigning"
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.family()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
// 积分兑换
|
||||
@ -166,18 +206,32 @@
|
||||
if (!this.userinfo) {
|
||||
this.gologin();
|
||||
} else {
|
||||
if (!this.checkSign) {
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: "/pagesC/Onlinesigning/Onlinesigning"
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pagesB/Behaviorpoints/Behaviorpoints'
|
||||
})
|
||||
if (this.region == "3") {
|
||||
this.family()
|
||||
} else{
|
||||
if (this.cityCode == "1" || this.cityCode == "2") {
|
||||
if (!this.checkSign) {
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: "/pagesC/Onlinesigning/Onlinesigning"
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pagesB/Behaviorpoints/Behaviorpoints'
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
this.family()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
// 健康档案
|
||||
@ -188,6 +242,9 @@
|
||||
uni.navigateTo({
|
||||
url: "/pagesC/Healthrecords/Healthrecords"
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
// 筛查记录
|
||||
@ -231,18 +288,36 @@
|
||||
if (!this.userinfo) {
|
||||
this.gologin();
|
||||
} else {
|
||||
if (!this.checkSign) {
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: "/pagesC/Onlinesigning/Onlinesigning"
|
||||
})
|
||||
if (this.region == "3") {
|
||||
this.family()
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pagesC/ServiceAppointment/ServiceAppointment"
|
||||
})
|
||||
if (this.cityCode == "1" || this.cityCode == "2") {
|
||||
if (!this.checkSign) {
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: "/pagesC/Onlinesigning/Onlinesigning"
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pagesC/ServiceAppointment/ServiceAppointment"
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
this.family()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
// 服务记录
|
||||
@ -250,9 +325,21 @@
|
||||
if (!this.userinfo) {
|
||||
this.gologin();
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pagesC/servicerecord/servicerecord"
|
||||
})
|
||||
if (this.region == "3") {
|
||||
this.family()
|
||||
} else{
|
||||
if (this.cityCode == "1" || this.cityCode == "2") {
|
||||
uni.navigateTo({
|
||||
url: "/pagesC/servicerecord/servicerecord"
|
||||
})
|
||||
|
||||
} else {
|
||||
this.family()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
// 我的预约
|
||||
@ -260,18 +347,31 @@
|
||||
if (!this.userinfo) {
|
||||
this.gologin();
|
||||
} else {
|
||||
if (!this.checkSign) {
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: "/pagesC/Onlinesigning/Onlinesigning"
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pagesC/Myappointment/Myappointment"
|
||||
})
|
||||
if (this.region == "3") {
|
||||
this.family()
|
||||
} else{
|
||||
if (this.cityCode == "1" || this.cityCode == "2") {
|
||||
if (!this.checkSign) {
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: "/pagesC/Onlinesigning/Onlinesigning"
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pagesC/Myappointment/Myappointment"
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
this.family()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@
|
||||
<image src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="myorder titles">
|
||||
<view class="myorder titles" @tap="Signing">
|
||||
<view class="title">
|
||||
签约信息
|
||||
</view>
|
||||
@ -350,6 +350,12 @@
|
||||
})
|
||||
|
||||
},
|
||||
// 签约信息
|
||||
Signing(){
|
||||
uni.navigateTo({
|
||||
url:'/pagesB/mysigning/mysigning'
|
||||
})
|
||||
},
|
||||
//去登陆
|
||||
gologin() {
|
||||
this.$refs.uToast.show({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user