修改
This commit is contained in:
parent
a82f52b7d6
commit
21cf4c9e5d
@ -403,7 +403,6 @@
|
|||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
}, {
|
}, {
|
||||||
"root": "pagesC",
|
"root": "pagesC",
|
||||||
@ -495,7 +494,6 @@
|
|||||||
"navigationBarTitleText": "咨询医生",
|
"navigationBarTitleText": "咨询医生",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}],
|
}],
|
||||||
@ -546,4 +544,4 @@
|
|||||||
// }
|
// }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -60,7 +60,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-toast ref="uToast" />
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -74,57 +74,42 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: 'Hello',
|
patientName: '',
|
||||||
patientName:'',
|
userinfo: {},
|
||||||
userinfo:{},
|
identity: '',
|
||||||
identity:'',
|
region: '',
|
||||||
cityCode:'',
|
openid: '',
|
||||||
Code:'',
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
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.openid = this.userinfo.openid;
|
||||||
this.cityCode = this.userinfo.cityCode;
|
this.identity = this.userinfo.cardNo;
|
||||||
var openid = this.userinfo.openid;
|
if (!this.openid && !this.region) {
|
||||||
that.identity = this.userinfo.cardNo;
|
|
||||||
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 => {
|
||||||
|
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: {
|
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,153 +147,117 @@
|
|||||||
// },
|
// },
|
||||||
// 家医签约
|
// 家医签约
|
||||||
goonline() {
|
goonline() {
|
||||||
if(!this.userinfo){
|
uni.navigateTo({
|
||||||
this.gologin();
|
url: '/pagesC/Signingagency/Signingagency'
|
||||||
}else{
|
})
|
||||||
if(this.identity){
|
if (!this.userinfo && !this.identity) {
|
||||||
this.region=this.cityCode
|
// this.gologin();
|
||||||
detail(this.identity,this.region).then(res => {
|
} else {
|
||||||
this.Code=res.code
|
detail(this.identity, this.region).then(res => {
|
||||||
if(this.Code==500){
|
if (res.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){
|
detail(this.identity, this.region).then(res => {
|
||||||
this.region=this.cityCode
|
this.Code = res.code
|
||||||
detail(this.identity,this.region).then(res => {
|
if (this.Code == 500) {
|
||||||
this.Code=res.code
|
this.$refs.uToast.show({
|
||||||
if(this.Code==500){
|
title: '未签约,请先签约',
|
||||||
this.$refs.uToast.show({
|
type: 'error',
|
||||||
title: '未签约,请先签约',
|
duration: '1000',
|
||||||
type: 'error',
|
|
||||||
duration: '1000',
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: ''
|
url: ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}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){
|
detail(this.identity, this.region).then(res => {
|
||||||
this.region=this.cityCode
|
this.Code = res.code
|
||||||
detail(this.identity,this.region).then(res => {
|
if (this.Code == 500) {
|
||||||
this.Code=res.code
|
this.$refs.uToast.show({
|
||||||
if(this.Code==500){
|
title: '未签约,请先签约',
|
||||||
this.$refs.uToast.show({
|
type: 'error',
|
||||||
title: '未签约,请先签约',
|
duration: '1000',
|
||||||
type: 'error',
|
})
|
||||||
duration: '1000',
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
})
|
url: '/pagesC/ServiceAppointment/ServiceAppointment'
|
||||||
|
})
|
||||||
}else{
|
}
|
||||||
uni.navigateTo({
|
})
|
||||||
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({
|
||||||
url: '/pagesC/servicerecord/servicerecord'
|
url: '/pagesC/servicerecord/servicerecord'
|
||||||
})
|
})
|
||||||
@ -319,9 +267,9 @@
|
|||||||
},
|
},
|
||||||
// 我的预约
|
// 我的预约
|
||||||
myappointment() {
|
myappointment() {
|
||||||
if(!this.userinfo){
|
if (!this.userinfo && !this.identity) {
|
||||||
this.gologin();
|
this.gologin();
|
||||||
}else{
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesC/Myappointment/Myappointment'
|
url: '/pagesC/Myappointment/Myappointment'
|
||||||
})
|
})
|
||||||
@ -348,4 +296,4 @@
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "./homepage.scss";
|
@import "./homepage.scss";
|
||||||
</style>
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user