完善业务闭环,实现对轮播图的管理,优化数据库表文件
This commit is contained in:
@@ -179,9 +179,15 @@
|
||||
if (!res.confirm) return
|
||||
this.cancelling = item.id
|
||||
try {
|
||||
await bookingApi.cancelBooking(item.id)
|
||||
const memberInfo = store.getMemberInfo()
|
||||
const memberId = memberInfo ? (memberInfo.memberId || memberInfo.id) : null
|
||||
if (!memberId) {
|
||||
uni.showToast({ title: '请先登录', icon: 'none' })
|
||||
return
|
||||
}
|
||||
await bookingApi.cancelBooking(item.id, memberId)
|
||||
await this.loadBookings()
|
||||
uni.showToast({ title: '已取消', icon: 'success' })
|
||||
this.loadBookings()
|
||||
} catch (e) {
|
||||
console.error('取消预约失败:', e)
|
||||
const msg = (e.data && e.data.message) || '取消失败,请重试'
|
||||
@@ -245,8 +251,8 @@
|
||||
return
|
||||
}
|
||||
await bookingApi.signIn(Number(scannedCourseId), memberId)
|
||||
await this.loadBookings()
|
||||
uni.showToast({ title: '签到成功', icon: 'success' })
|
||||
this.loadBookings()
|
||||
} catch (e) {
|
||||
console.error('签到失败:', e)
|
||||
const msg = (e.data && e.data.message) || '签到失败,请重试'
|
||||
|
||||
Reference in New Issue
Block a user