修改
This commit is contained in:
parent
a82f52b7d6
commit
21cf4c9e5d
@ -403,7 +403,6 @@
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}, {
|
||||
"root": "pagesC",
|
||||
@ -495,7 +494,6 @@
|
||||
"navigationBarTitleText": "咨询医生",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}],
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -74,57 +74,42 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: 'Hello',
|
||||
patientName:'',
|
||||
userinfo:{},
|
||||
identity:'',
|
||||
cityCode:'',
|
||||
Code:'',
|
||||
patientName: '',
|
||||
userinfo: {},
|
||||
identity: '',
|
||||
region: '',
|
||||
openid: '',
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// this.login()
|
||||
},
|
||||
onShow() {
|
||||
var that = this
|
||||
this.userinfo= uni.getStorageSync('userinfo');
|
||||
|
||||
this.cityCode = this.userinfo.cityCode;
|
||||
var openid = this.userinfo.openid;
|
||||
that.identity = this.userinfo.cardNo;
|
||||
if (!openid && !that.cityCode) {
|
||||
this.userinfo = uni.getStorageSync('userinfo');
|
||||
this.region = this.userinfo.cityCode;
|
||||
this.openid = this.userinfo.openid;
|
||||
this.identity = this.userinfo.cardNo;
|
||||
if (!this.openid && !this.region) {
|
||||
// that.appPersonallist = null
|
||||
that.$refs.uToast.show({
|
||||
this.$refs.uToast.show({
|
||||
title: '您未登录,请先登录',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
})
|
||||
|
||||
} else {
|
||||
|
||||
getCurrentUser(this.openid, this.region).then(res => {
|
||||
this.patientName = res.data.patientName
|
||||
uni.setStorageSync('patientId', res.data.id);
|
||||
// if (!res.data) {
|
||||
// // 注册
|
||||
// }
|
||||
})
|
||||
}
|
||||
|
||||
if(openid&&that.cityCode){
|
||||
// isWxBing(openid, cityCode) {
|
||||
|
||||
getCurrentUser(openid,that.cityCode).then(res => {
|
||||
this.patientName=res.data.patientName
|
||||
uni.setStorageSync('patientId',res.data.id);
|
||||
console.log(res);
|
||||
// if (!res.data) {
|
||||
// // 注册
|
||||
// }
|
||||
})
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 登录
|
||||
login(){
|
||||
login() {
|
||||
this.gologin();
|
||||
|
||||
},
|
||||
gologin() {
|
||||
this.$refs.uToast.show({
|
||||
@ -145,7 +130,6 @@
|
||||
},
|
||||
// 签约信息
|
||||
// detailinfo(){
|
||||
// this.region=this.cityCode
|
||||
// detail(this.identity,this.region).then(res => {
|
||||
// this.Code=res.code
|
||||
// if(this.Code==500){
|
||||
@ -163,153 +147,117 @@
|
||||
// },
|
||||
// 家医签约
|
||||
goonline() {
|
||||
if(!this.userinfo){
|
||||
this.gologin();
|
||||
}else{
|
||||
if(this.identity){
|
||||
this.region=this.cityCode
|
||||
detail(this.identity,this.region).then(res => {
|
||||
this.Code=res.code
|
||||
if(this.Code==500){
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
|
||||
})
|
||||
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/Signingagency/Signingagency'
|
||||
})
|
||||
if (!this.userinfo && !this.identity) {
|
||||
// this.gologin();
|
||||
} else {
|
||||
detail(this.identity, this.region).then(res => {
|
||||
if (res.code == 500) {
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: '/pagesC/Signingagency/Signingagency'
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pagesB/mysigning/mysigning'
|
||||
})
|
||||
}
|
||||
})
|
||||
}else{
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
// 积分兑换
|
||||
count(){
|
||||
if(!this.userinfo){
|
||||
count() {
|
||||
if (!this.userinfo && !this.identity) {
|
||||
this.gologin();
|
||||
}else{
|
||||
if(this.identity){
|
||||
this.region=this.cityCode
|
||||
detail(this.identity,this.region).then(res => {
|
||||
this.Code=res.code
|
||||
if(this.Code==500){
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
} else {
|
||||
detail(this.identity, this.region).then(res => {
|
||||
this.Code = res.code
|
||||
if (this.Code == 500) {
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
}else{
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: ''
|
||||
})
|
||||
}
|
||||
})
|
||||
}else{
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
// 健康档案
|
||||
goHealthrecords() {
|
||||
if(!this.userinfo){
|
||||
if (!this.userinfo && !this.identity) {
|
||||
this.gologin();
|
||||
}else{
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/Healthrecords/Healthrecords'
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
// 筛查记录
|
||||
gorecords() {
|
||||
if(!this.userinfo){
|
||||
if (!this.userinfo && !this.identity) {
|
||||
this.gologin();
|
||||
}else{
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/Screeningrecords/Screeningrecords'
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
// 健康自评
|
||||
healthtest() {
|
||||
if(!this.userinfo){
|
||||
if (!this.userinfo && !this.identity) {
|
||||
this.gologin();
|
||||
}else{
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/healthtest/healthtest'
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
// 体征检测
|
||||
sign() {
|
||||
if(!this.userinfo){
|
||||
if (!this.userinfo && !this.identity) {
|
||||
this.gologin();
|
||||
}else{
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/Physicalexamination/Physicalexamination'
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
// 服务预约
|
||||
goappoint() {
|
||||
if(!this.userinfo){
|
||||
if (!this.userinfo && !this.identity) {
|
||||
this.gologin();
|
||||
}else{
|
||||
if(this.identity){
|
||||
this.region=this.cityCode
|
||||
detail(this.identity,this.region).then(res => {
|
||||
this.Code=res.code
|
||||
if(this.Code==500){
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
|
||||
})
|
||||
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/ServiceAppointment/ServiceAppointment'
|
||||
})
|
||||
}
|
||||
})
|
||||
}else{
|
||||
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
detail(this.identity, this.region).then(res => {
|
||||
this.Code = res.code
|
||||
if (this.Code == 500) {
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/ServiceAppointment/ServiceAppointment'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
// 服务记录
|
||||
servicerecord() {
|
||||
if(!this.userinfo){
|
||||
if (!this.userinfo && !this.identity) {
|
||||
this.gologin();
|
||||
}else{
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/servicerecord/servicerecord'
|
||||
})
|
||||
@ -319,9 +267,9 @@
|
||||
},
|
||||
// 我的预约
|
||||
myappointment() {
|
||||
if(!this.userinfo){
|
||||
if (!this.userinfo && !this.identity) {
|
||||
this.gologin();
|
||||
}else{
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/Myappointment/Myappointment'
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user