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 { return {
patientName: '', patientName: '',
userinfo: {}, userinfo: {},
identity: '',
region: '', region: '',
openid: '',
checkSign: null, checkSign: null,
} }
}, },
@ -87,10 +85,13 @@
}, },
onShow() { onShow() {
this.userinfo = uni.getStorageSync('userinfo'); this.userinfo = uni.getStorageSync('userinfo');
this.patientName = this.userinfo.patientName
if (this.userinfo) { if (this.userinfo) {
checkSignApply(this.userinfo.cardNo, '1').then(res => { checkSignApply(this.userinfo.cardNo, '1').then(res => {
if (res.code != 0) { if (res.code != 0) {
this.checkSign = true this.checkSign = true
} else {
this.checkSign = false
} }
}) })
} }
@ -103,37 +104,18 @@
}) })
}, },
gologin() { gologin() {
if (!this.userinfo) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '您未登录,请先登录', title: '您未登录,请先登录',
type: 'error', type: 'error',
duration: '1000', duration: '1000',
url: '/pages/login/login' 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
})
}
})
}, },
// //
goonline() { goonline() {
if (!this.userinfo) {
this.gologin(); this.gologin();
} else {
if (!this.checkSign) { if (!this.checkSign) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '未签约,请先签约', title: '未签约,请先签约',
@ -146,10 +128,13 @@
url: "/pagesB/mysigning/mysigning" url: "/pagesB/mysigning/mysigning"
}) })
} }
}
}, },
// //
count() { count() {
if (!this.userinfo) {
this.gologin(); this.gologin();
} else {
if (!this.checkSign) { if (!this.checkSign) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '未签约,请先签约', title: '未签约,请先签约',
@ -162,38 +147,53 @@
url: "" url: ""
}) })
} }
}
}, },
// //
goHealthrecords() { goHealthrecords() {
if (!this.userinfo) {
this.gologin(); this.gologin();
} else {
uni.navigateTo({ uni.navigateTo({
url: "/pagesC/Healthrecords/Healthrecords" url: "/pagesC/Healthrecords/Healthrecords"
}) })
}
}, },
// //
gorecords() { gorecords() {
if (!this.userinfo) {
this.gologin(); this.gologin();
} else {
uni.navigateTo({ uni.navigateTo({
url: "/pagesC/Screeningrecords/Screeningrecords" url: "/pagesC/Screeningrecords/Screeningrecords"
}) })
}
}, },
// //
healthtest() { healthtest() {
if (!this.userinfo) {
this.gologin(); this.gologin();
} else {
uni.navigateTo({ uni.navigateTo({
url: "/pagesC/healthtest/healthtest" url: "/pagesC/healthtest/healthtest"
}) })
}
}, },
// //
sign() { sign() {
if (!this.userinfo) {
this.gologin(); this.gologin();
} else {
uni.navigateTo({ uni.navigateTo({
url: "/pagesC/Physicalexamination/Physicalexamination" url: "/pagesC/Physicalexamination/Physicalexamination"
}) })
}
}, },
// //
goappoint() { goappoint() {
if (!this.userinfo) {
this.gologin(); this.gologin();
} else {
if (!this.checkSign) { if (!this.checkSign) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '未签约,请先签约', title: '未签约,请先签约',
@ -206,17 +206,23 @@
url: "/pagesC/ServiceAppointment/ServiceAppointment" url: "/pagesC/ServiceAppointment/ServiceAppointment"
}) })
} }
}
}, },
// //
servicerecord() { servicerecord() {
if (!this.userinfo) {
this.gologin(); this.gologin();
} else {
uni.navigateTo({ uni.navigateTo({
url: "/pagesC/servicerecord/servicerecord" url: "/pagesC/servicerecord/servicerecord"
}) })
}
}, },
// //
myappointment() { myappointment() {
if (!this.userinfo) {
this.gologin(); this.gologin();
} else {
if (!this.checkSign) { if (!this.checkSign) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '未签约,请先签约', title: '未签约,请先签约',
@ -229,6 +235,7 @@
url: "/pagesC/Myappointment/Myappointment" url: "/pagesC/Myappointment/Myappointment"
}) })
} }
}
}, },
} }
} }

View File

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

View File

@ -89,6 +89,24 @@
}; };
}, },
methods: { 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() { gomyfamilydoctorteam() {
uni.navigateTo({ uni.navigateTo({