master
lion 1 year ago
parent d2728cf5d8
commit b0feaf322f

@ -158,17 +158,20 @@
}) })
}, },
async goBook(){ async goBook(){
await this.$u.api.user().then(res => { uni.navigateTo({
if (res.user.appointment_total - res.user.pass_appointments > 0) { url: '/packages/booksubmit/appointment'
this.can_appointment = true
uni.navigateTo({
url: '/packages/booksubmit/appointment'
})
} else {
this.can_appointment = false
this.base.toast("您当前没有可预约次数")
}
}) })
// await this.$u.api.user().then(res => {
// if (res.user.appointment_total - res.user.pass_appointments > 0) {
// this.can_appointment = true
// uni.navigateTo({
// url: '/packages/booksubmit/appointment'
// })
// } else {
// this.can_appointment = false
// this.base.toast("")
// }
// })
} }
} }

@ -277,7 +277,7 @@
this.$u.vuex('vuex_user', res.user) this.$u.vuex('vuex_user', res.user)
this.userInfo = res.user this.userInfo = res.user
this.course_signs = res.user.course_signs ? res.user.course_signs : [], this.course_signs = res.user.course_signs ? res.user.course_signs : [],
this.myQrcode = res.course_signs ? res.course_signs.qrcode : 'STBC' this.myQrcode = res.course_signs ? res.course_signs.qrcode : 'STBC'
if (this.base.isNull(res.user.mobile)) { if (this.base.isNull(res.user.mobile)) {
this.showRegister = true this.showRegister = true
this.hasMobile = false this.hasMobile = false

Loading…
Cancel
Save