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