diff --git a/pages/book_detail/book_detail.vue b/pages/book_detail/book_detail.vue index f47c623..94968be 100644 --- a/pages/book_detail/book_detail.vue +++ b/pages/book_detail/book_detail.vue @@ -68,7 +68,18 @@ }, methods: { cancelBook(){ - + var that = this + uni.showModal({ + title:'取消预约', + content:'确认取消预约?', + success(res) { + if(!res.confirm) return + that.$http.req('client/user/visit_user/'+this.bookId, {}, 'POST').then(data=>{ + if(data == -1) return + that.getVisitors() + }); + } + }) }, rebook(){ this.$func.toPage('/pages/index/index') @@ -91,7 +102,6 @@ bookInfo = data this.bookInfo = bookInfo - bookInfo.status = 2 this.status = this.statusList[bookInfo.status] if(bookInfo.status==3) this.showReBook = true if(bookInfo.status==2) this.showCancelBook = true