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