This commit is contained in:
2023-10-12 10:46:44 +08:00
parent ca98468c3a
commit 9e5f2b1aa4
3 changed files with 119 additions and 94 deletions

View File

@ -76,9 +76,7 @@
return {
patientName: '',
userinfo: {},
identity: '',
region: '',
openid: '',
checkSign: null,
}
},
@ -87,10 +85,13 @@
},
onShow() {
this.userinfo = uni.getStorageSync('userinfo');
this.patientName = this.userinfo.patientName
if (this.userinfo) {
checkSignApply(this.userinfo.cardNo, '1').then(res => {
if (res.code != 0) {
this.checkSign = true
} else {
this.checkSign = false
}
})
}
@ -103,131 +104,137 @@
})
},
gologin() {
if (!this.userinfo) {
this.$refs.uToast.show({
title: '您未登录,请先登录',
type: 'error',
duration: '1000',
url: '/pages/login/login'
})
return
}
},
//
detailinfo(url1, url2) {
detail(this.identity, this.region).then(res => {
// detail('372424194703207523', '1').then(res => {
if (res.code == 200) {
uni.navigateTo({
url: url2 + `?item=${JSON.stringify(res.data)}`
})
} else {
this.$refs.uToast.show({
title: '未签约,请先签约',
type: 'error',
duration: '1000',
url: url1
})
}
this.$refs.uToast.show({
title: '您未登录,请先登录',
type: 'error',
duration: '1000',
url: '/pages/login/login'
})
},
//
goonline() {
this.gologin();
if (!this.checkSign) {
this.$refs.uToast.show({
title: '未签约,请先签约',
type: 'error',
duration: '1000',
url: "/pagesC/Onlinesigning/Onlinesigning"
})
if (!this.userinfo) {
this.gologin();
} else {
uni.navigateTo({
url: "/pagesB/mysigning/mysigning"
})
if (!this.checkSign) {
this.$refs.uToast.show({
title: '未签约,请先签约',
type: 'error',
duration: '1000',
url: "/pagesC/Onlinesigning/Onlinesigning"
})
} else {
uni.navigateTo({
url: "/pagesB/mysigning/mysigning"
})
}
}
},
//
count() {
this.gologin();
if (!this.checkSign) {
this.$refs.uToast.show({
title: '未签约,请先签约',
type: 'error',
duration: '1000',
url: "/pagesC/Onlinesigning/Onlinesigning"
})
if (!this.userinfo) {
this.gologin();
} else {
uni.navigateTo({
url: ""
})
if (!this.checkSign) {
this.$refs.uToast.show({
title: '未签约,请先签约',
type: 'error',
duration: '1000',
url: "/pagesC/Onlinesigning/Onlinesigning"
})
} else {
uni.navigateTo({
url: ""
})
}
}
},
//
goHealthrecords() {
this.gologin();
uni.navigateTo({
url: "/pagesC/Healthrecords/Healthrecords"
})
if (!this.userinfo) {
this.gologin();
} else {
uni.navigateTo({
url: "/pagesC/Healthrecords/Healthrecords"
})
}
},
//
gorecords() {
this.gologin();
uni.navigateTo({
url: "/pagesC/Screeningrecords/Screeningrecords"
})
if (!this.userinfo) {
this.gologin();
} else {
uni.navigateTo({
url: "/pagesC/Screeningrecords/Screeningrecords"
})
}
},
//
healthtest() {
this.gologin();
uni.navigateTo({
url: "/pagesC/healthtest/healthtest"
})
if (!this.userinfo) {
this.gologin();
} else {
uni.navigateTo({
url: "/pagesC/healthtest/healthtest"
})
}
},
//
sign() {
this.gologin();
uni.navigateTo({
url: "/pagesC/Physicalexamination/Physicalexamination"
})
if (!this.userinfo) {
this.gologin();
} else {
uni.navigateTo({
url: "/pagesC/Physicalexamination/Physicalexamination"
})
}
},
//
goappoint() {
this.gologin();
if (!this.checkSign) {
this.$refs.uToast.show({
title: '未签约,请先签约',
type: 'error',
duration: '1000',
url: "/pagesC/Onlinesigning/Onlinesigning"
})
if (!this.userinfo) {
this.gologin();
} else {
uni.navigateTo({
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"
})
}
}
},
//
servicerecord() {
this.gologin();
uni.navigateTo({
url: "/pagesC/servicerecord/servicerecord"
})
if (!this.userinfo) {
this.gologin();
} else {
uni.navigateTo({
url: "/pagesC/servicerecord/servicerecord"
})
}
},
//
myappointment() {
this.gologin();
if (!this.checkSign) {
this.$refs.uToast.show({
title: '未签约,请先签约',
type: 'error',
duration: '1000',
url: "/pagesC/Onlinesigning/Onlinesigning"
})
if (!this.userinfo) {
this.gologin();
} else {
uni.navigateTo({
url: "/pagesC/Myappointment/Myappointment"
})
if (!this.checkSign) {
this.$refs.uToast.show({
title: '未签约,请先签约',
type: 'error',
duration: '1000',
url: "/pagesC/Onlinesigning/Onlinesigning"
})
} else {
uni.navigateTo({
url: "/pagesC/Myappointment/Myappointment"
})
}
}
},
}

View File

@ -68,7 +68,7 @@
type: 'success',
duration: '1500'
})
uni.setStorageSync('patientId', res.data.id);
// uni.setStorageSync('patientId', res.data.id);
uni.setStorageSync('userinfo', resp.data);
if (this.timer) {
clearTimeout(this.timer)

View File

@ -89,6 +89,24 @@
};
},
methods: {
//
detailinfo(url1, url2) {
detail(this.identity, this.region).then(res => {
// detail('372424194703207523', '1').then(res => {
if (res.code == 200) {
uni.navigateTo({
url: url2 + `?item=${JSON.stringify(res.data)}`
})
} else {
this.$refs.uToast.show({
title: '未签约,请先签约',
type: 'error',
duration: '1000',
url: url1
})
}
})
},
//
gomyfamilydoctorteam() {
uni.navigateTo({
@ -254,4 +272,4 @@
}
}
}
</style>
</style>