修改
This commit is contained in:
parent
c9d7f861e5
commit
a31fe92fce
@ -85,12 +85,14 @@
|
||||
stationId: null,
|
||||
stationItemId: null,
|
||||
stationItemPriceId: null,
|
||||
hospitalcare:false,
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.stationId = options.stationId
|
||||
this.stationItemId = options.stationItemId
|
||||
this.stationItemPriceId = options.stationItemPriceId
|
||||
this.hospitalcare = options.hospitalcare
|
||||
},
|
||||
onShow() {
|
||||
this.baseurl = baseurl
|
||||
@ -160,9 +162,22 @@
|
||||
if (res.code == 200) {
|
||||
if (res.data.loginFlag) {
|
||||
that.usershow = false
|
||||
uni.navigateTo({
|
||||
url: `/pages/appointmenttime/appointmenttime?stationId=${this.stationId}&stationItemId=${this.stationItemId}&stationItemPriceId=${this.stationItemPriceId}`,
|
||||
})
|
||||
const scenenurseStationId = uni.getStorageSync('scenenurseStationId');
|
||||
if (scenenurseStationId) {
|
||||
if (that.hospitalcare) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/hospitalcare/hospitalcare?stationId=${this.stationId}&stationItemId=${this.stationItemId}&stationItemPriceId=${this.stationItemPriceId}`,
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/appointmenttime/appointmenttime?stationId=${this.stationId}&stationItemId=${this.stationItemId}&stationItemPriceId=${this.stationItemPriceId}`,
|
||||
})
|
||||
}
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/appointmenttime/appointmenttime?stationId=${this.stationId}&stationItemId=${this.stationItemId}&stationItemPriceId=${this.stationItemPriceId}`,
|
||||
})
|
||||
}
|
||||
} else {
|
||||
that.usershow = true
|
||||
}
|
||||
|
||||
@ -67,6 +67,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timer: null,
|
||||
companionDays: 1,
|
||||
orderlist: {
|
||||
patientName: undefined,
|
||||
@ -127,20 +128,35 @@
|
||||
signType: response.data.signType,
|
||||
paySign: response.data.paySign,
|
||||
success: function(res) {
|
||||
uni.removeStorageSync('scenenurseStationId');
|
||||
that.$refs.uToast.show({
|
||||
title: '预约成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
url: `/pages/paysuccess/paysuccess`
|
||||
})
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.redirectTo({
|
||||
url: `/pages/paysuccess/paysuccess`
|
||||
})
|
||||
}, 1500)
|
||||
},
|
||||
fail: function(err) {
|
||||
that.$refs.uToast.show({
|
||||
title: '取消预约',
|
||||
type: 'error',
|
||||
duration: 1500,
|
||||
url: `/pages/menttimeorder/menttimeorder?list=${JSON.stringify(obj)}`
|
||||
})
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.redirectTo({
|
||||
url: `/pages/menttimeorder/menttimeorder?list=${JSON.stringify(obj)}`
|
||||
})
|
||||
}, 1500)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
@ -222,7 +222,6 @@
|
||||
// scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene
|
||||
if (options.scene) {
|
||||
this.nurseStationId = decodeURIComponent(options.scene)
|
||||
this.hospitalcare = true
|
||||
if (this.nurseStationId) {
|
||||
createMobileToken().then(res => {
|
||||
uni.setStorageSync("token", res.data.token)
|
||||
@ -308,20 +307,40 @@
|
||||
goappointments(item) {
|
||||
let that = this
|
||||
const value = uni.getStorageSync('openid');
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value && value2) {
|
||||
if (that.hospitalcare) {
|
||||
const scenenurseStationId = uni.getStorageSync('scenenurseStationId');
|
||||
// if (scenenurseStationId) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/hospitalcare/hospitalcare?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}`,
|
||||
const patientId = uni.getStorageSync('patientId');
|
||||
if (value && patientId) {
|
||||
let that = this
|
||||
AppIdentification(patientId).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.loginFlag) {
|
||||
that.usershow = false
|
||||
const scenenurseStationId = uni.getStorageSync('scenenurseStationId');
|
||||
if (scenenurseStationId) {
|
||||
if (that.hospitalcare) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/hospitalcare/hospitalcare?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}`,
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/appointmenttime/appointmenttime?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}`,
|
||||
})
|
||||
}
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/appointmenttime/appointmenttime?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}`,
|
||||
})
|
||||
}
|
||||
} else {
|
||||
that.usershow = true
|
||||
}
|
||||
} else if (res.code == 9999) {} else {
|
||||
that.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error',
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
// } else {
|
||||
// that.goAppIdentification(value2, item)
|
||||
// }
|
||||
} else {
|
||||
that.goAppIdentification(value2, item)
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '未登录,请先登录',
|
||||
@ -330,27 +349,6 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
goAppIdentification(value, item) {
|
||||
let that = this
|
||||
AppIdentification(value).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.loginFlag) {
|
||||
that.usershow = false
|
||||
uni.navigateTo({
|
||||
url: `/pages/appointmenttime/appointmenttime?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}`,
|
||||
})
|
||||
} else {
|
||||
that.usershow = true
|
||||
}
|
||||
} else if (res.code == 9999) {} else {
|
||||
that.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error',
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getInfo() {
|
||||
introductionList(this.nurseStationId).then(res => {
|
||||
if (res.code == 200) {
|
||||
@ -435,7 +433,7 @@
|
||||
},
|
||||
goProjectDetails(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/ProjectDetails/ProjectDetails?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}`,
|
||||
url: `/pages/ProjectDetails/ProjectDetails?stationId=${item.stationId}&stationItemId=${item.stationItemId}&stationItemPriceId=${item.stationItemPriceId}&hospitalcare=${this.hospitalcare}`,
|
||||
})
|
||||
},
|
||||
gophone() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user