This commit is contained in:
2023-10-10 15:28:21 +08:00
parent a82f52b7d6
commit 21cf4c9e5d
2 changed files with 81 additions and 135 deletions

View File

@ -403,7 +403,6 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
] ]
}, { }, {
"root": "pagesC", "root": "pagesC",
@ -495,7 +494,6 @@
"navigationBarTitleText": "咨询医生", "navigationBarTitleText": "咨询医生",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
] ]
}], }],

View File

@ -74,57 +74,42 @@
export default { export default {
data() { data() {
return { return {
title: 'Hello',
patientName: '', patientName: '',
userinfo: {}, userinfo: {},
identity: '', identity: '',
cityCode:'', region: '',
Code:'', openid: '',
} }
}, },
onLoad() { onLoad() {
// this.login() // this.login()
}, },
onShow() { onShow() {
var that = this
this.userinfo = uni.getStorageSync('userinfo'); this.userinfo = uni.getStorageSync('userinfo');
this.region = this.userinfo.cityCode;
this.cityCode = this.userinfo.cityCode; this.openid = this.userinfo.openid;
var openid = this.userinfo.openid; this.identity = this.userinfo.cardNo;
that.identity = this.userinfo.cardNo; if (!this.openid && !this.region) {
if (!openid && !that.cityCode) {
// that.appPersonallist = null // that.appPersonallist = null
that.$refs.uToast.show({ this.$refs.uToast.show({
title: '您未登录,请先登录', title: '您未登录,请先登录',
type: 'error', type: 'error',
duration: '1000', duration: '1000',
}) })
} else { } else {
getCurrentUser(this.openid, this.region).then(res => {
}
if(openid&&that.cityCode){
// isWxBing(openid, cityCode) {
getCurrentUser(openid,that.cityCode).then(res => {
this.patientName = res.data.patientName this.patientName = res.data.patientName
uni.setStorageSync('patientId', res.data.id); uni.setStorageSync('patientId', res.data.id);
console.log(res);
// if (!res.data) { // if (!res.data) {
// // // //
// } // }
}) })
// }
} }
}, },
methods: { methods: {
// //
login() { login() {
this.gologin(); this.gologin();
}, },
gologin() { gologin() {
this.$refs.uToast.show({ this.$refs.uToast.show({
@ -145,7 +130,6 @@
}, },
// //
// detailinfo(){ // detailinfo(){
// this.region=this.cityCode
// detail(this.identity,this.region).then(res => { // detail(this.identity,this.region).then(res => {
// this.Code=res.code // this.Code=res.code
// if(this.Code==500){ // if(this.Code==500){
@ -163,42 +147,33 @@
// }, // },
// //
goonline() { goonline() {
if(!this.userinfo){ uni.navigateTo({
this.gologin(); url: '/pagesC/Signingagency/Signingagency'
})
if (!this.userinfo && !this.identity) {
// this.gologin();
} else { } else {
if(this.identity){
this.region=this.cityCode
detail(this.identity, this.region).then(res => { detail(this.identity, this.region).then(res => {
this.Code=res.code if (res.code == 500) {
if(this.Code==500){
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '未签约,请先签约', title: '未签约,请先签约',
type: 'error', type: 'error',
duration: '1000', duration: '1000',
url: '/pagesC/Signingagency/Signingagency'
}) })
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pagesB/mysigning/mysigning' url: '/pagesB/mysigning/mysigning'
}) })
} }
}) })
}else{
} }
}
}, },
// //
count() { count() {
if(!this.userinfo){ if (!this.userinfo && !this.identity) {
this.gologin(); this.gologin();
} else { } else {
if(this.identity){
this.region=this.cityCode
detail(this.identity, this.region).then(res => { detail(this.identity, this.region).then(res => {
this.Code = res.code this.Code = res.code
if (this.Code == 500) { if (this.Code == 500) {
@ -215,72 +190,53 @@
}) })
} }
}) })
}else{
} }
}
}, },
// //
goHealthrecords() { goHealthrecords() {
if(!this.userinfo){ if (!this.userinfo && !this.identity) {
this.gologin(); this.gologin();
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pagesC/Healthrecords/Healthrecords' url: '/pagesC/Healthrecords/Healthrecords'
}) })
} }
}, },
// //
gorecords() { gorecords() {
if(!this.userinfo){ if (!this.userinfo && !this.identity) {
this.gologin(); this.gologin();
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pagesC/Screeningrecords/Screeningrecords' url: '/pagesC/Screeningrecords/Screeningrecords'
}) })
} }
}, },
// //
healthtest() { healthtest() {
if(!this.userinfo){ if (!this.userinfo && !this.identity) {
this.gologin(); this.gologin();
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pagesC/healthtest/healthtest' url: '/pagesC/healthtest/healthtest'
}) })
} }
}, },
// //
sign() { sign() {
if(!this.userinfo){ if (!this.userinfo && !this.identity) {
this.gologin(); this.gologin();
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pagesC/Physicalexamination/Physicalexamination' url: '/pagesC/Physicalexamination/Physicalexamination'
}) })
} }
}, },
// //
goappoint() { goappoint() {
if(!this.userinfo){ if (!this.userinfo && !this.identity) {
this.gologin(); this.gologin();
} else { } else {
if(this.identity){
this.region=this.cityCode
detail(this.identity, this.region).then(res => { detail(this.identity, this.region).then(res => {
this.Code = res.code this.Code = res.code
if (this.Code == 500) { if (this.Code == 500) {
@ -288,26 +244,18 @@
title: '未签约,请先签约', title: '未签约,请先签约',
type: 'error', type: 'error',
duration: '1000', duration: '1000',
}) })
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pagesC/ServiceAppointment/ServiceAppointment' url: '/pagesC/ServiceAppointment/ServiceAppointment'
}) })
} }
}) })
}else{
} }
}
}, },
// //
servicerecord() { servicerecord() {
if(!this.userinfo){ if (!this.userinfo && !this.identity) {
this.gologin(); this.gologin();
} else { } else {
uni.navigateTo({ uni.navigateTo({
@ -319,7 +267,7 @@
}, },
// //
myappointment() { myappointment() {
if(!this.userinfo){ if (!this.userinfo && !this.identity) {
this.gologin(); this.gologin();
} else { } else {
uni.navigateTo({ uni.navigateTo({