From 23dafaf347f77c2d12178df39618996100343a2c Mon Sep 17 00:00:00 2001 From: 15004070936 <1097449274@qq.com> Date: Fri, 29 May 2026 17:23:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E5=91=98=E8=AF=BE=E7=A8=8B=E9=A2=84?= =?UTF-8?q?=E7=BA=A6=E6=93=8D=E4=BD=9C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/book/booklist.vue | 123 ++++++++++++++++++++-------------------- 1 file changed, 63 insertions(+), 60 deletions(-) diff --git a/pages/book/booklist.vue b/pages/book/booklist.vue index 58a0bc1..b3ed86a 100644 --- a/pages/book/booklist.vue +++ b/pages/book/booklist.vue @@ -11,7 +11,7 @@ - + {{item.storeName?item.storeName:'门店'}} @@ -26,7 +26,7 @@ 已取消 - + @@ -37,8 +37,8 @@ 上课时间:{{ item.claDate+' '+item.startTime+'-'+item.endTime}} 教室:{{item.roomName}} - - + + @@ -48,23 +48,23 @@ - - - - - + + + + + - + - + - + - + @@ -77,10 +77,10 @@ - + - + @@ -96,10 +96,10 @@ openId:"", phone:"", userid:"", - tabCurrentIndex: 0, + tabCurrentIndex: 1, scrollLeft: 0,//tabs qr:'', // 预约二维码 - // 1:待上课,2:预约中,3:待评价 + // 1:待上课,2:预约中,3:待评价 list:[ { id:0, @@ -427,33 +427,33 @@ }); const {data: res} = await uni.$http.get('/api/course/bookCourseList'); var data = res.data; - if(data){ - console.log(res) + if(data){ + console.log(res) // 全部 this.list[0].loadStatus="noMore"; - this.list[0].slist=data.all; + this.list[0].slist=data.all; console.log(this.list[0].slist) this.$forceUpdate(); - + // 已取消 this.list[4].loadStatus="noMore"; - this.list[4].slist=data.canceled; + this.list[4].slist=data.canceled; this.$forceUpdate(); - + // 待上课 this.list[1].loadStatus="noMore"; - this.list[1].slist=data.waitingForClass; + this.list[1].slist=data.waitingForClass; this.$forceUpdate(); - + // 预约中 this.list[2].loadStatus="noMore"; - this.list[2].slist=data.booking; + this.list[2].slist=data.booking; this.$forceUpdate(); - + // 已完成 this.list[3].loadStatus="noMore"; - this.list[3].slist=data.completed; - this.$forceUpdate(); + this.list[3].slist=data.completed; + this.$forceUpdate(); } else{ this.list[this.tabCurrentIndex].loadStatus="noMore"; @@ -502,21 +502,21 @@ // 联系教练 gototeacher(item){ console.log(item); - if(item.teacherId){ + if(item.teacherAppId){ uni.showLoading({ title: '会话创建中...' }); // 直接跳转到聊天框 - var chatid="privatechat-" + this.userid +"-"+ item.teacherId; + var chatid="privatechat-" + this.userid +"-"+ item.teacherAppId; var timestamp = new Date().getTime(); var info={ - chatId: "privatechat-" + this.userid +"-"+ item.teacherId, + chatId: "privatechat-" + this.userid +"-"+ item.teacherAppId, chatType: "coach", chatName: item.teacherName, chatAvatar: item.pic?item.pic:'/static/image/kf.png', chatTime: timestamp, - userid: this.userid, - friendId: item.teacherId, // 会话教练userid + userid: this.userid, + friendId: item.teacherAppId, // 会话教练userid minId: "", // 已读消息的最大id sort:"privatechat", // privatechat 私聊 groupchat 群聊 from:"yh" // yh 用户咨询进入聊天框,message 从消息进入聊天框 @@ -561,23 +561,26 @@ }, // 再次预约 orderdo(e,item){ - console.log(id,item); + console.log(e,item); var that = this; + uni.navigateTo({ + url: `/pages/user/courselist` + }); // 再次预约 - uni.showModal({ - title: '提示', - content: '确定再次预约吗?', - cancelText: '取消', - confirmText: '确定', - success: ress => { - if (ress.confirm) { - that.checkdodo(id,item); - } - } - }); + // uni.showModal({ + // title: '提示', + // content: '确定再次预约吗?', + // cancelText: '取消', + // confirmText: '确定', + // success: ress => { + // if (ress.confirm) { + // that.orderdodo(item); + // } + // } + // }); }, // 再次预约 - async orderdodo(id,item){ + async orderdodo(item){ var param={ "courseTimeId": item.courseTimeId }; @@ -630,8 +633,8 @@ // 确认上课 async checkdodo(id,item){ var param={ - "courseTimeId": item.courseTimeId, - "startTime": item.startTime, + "courseTimeId": item.courseTimeId, + "startTime": item.startTime, "endTime": item.endTime }; uni.showToast({ @@ -686,7 +689,7 @@ duration: 2000 }); const {data: res} = await uni.$http.post('/api/course/cancelCourse', param); - if(res.msg=="successed"){ + if(res.success){ uni.showToast({ title: '预约已取消!', icon: 'success', @@ -697,7 +700,7 @@ } else{ uni.showToast({ - title: res.msg? res.msg:'预约取消失败!', + title: res.message? res.message:'预约取消失败!', icon: 'error', duration: 2000 }); @@ -732,7 +735,7 @@ duration: 2000 }); const {data: res} = await uni.$http.post('/api/course/cancelCourse', param); - if(res.msg=="successed"){ + if(res.msg=="success"){ uni.showToast({ title: '课程已取消!', icon: 'success', @@ -802,7 +805,7 @@ height: 100%; } .scrolllist{ - height: 110rpx; + height: 110rpx; background: #FFF; white-space: nowrap; width: 100%; @@ -843,7 +846,7 @@ background-image: url('/static/image/no.png'); background-size: 52% auto; background-repeat: no-repeat; - background-position: center; + background-position: center; font-size: 28rpx; text-align: center; color: #00a89b; @@ -1144,9 +1147,9 @@ } } } - - - + + + .pcon{ width: 690rpx; padding-top:30rpx; @@ -1173,10 +1176,10 @@ display: flex; align-items: center; justify-content: center; - margin: 30rpx auto; + margin: 30rpx auto; border-radius: 16rpx 16rpx 16rpx 16rpx; opacity: 1; - border: 2rpx solid #F7F8FA; + border: 2rpx solid #F7F8FA; padding: 30rpx; .qrimg{ width: 400rpx; @@ -1197,5 +1200,5 @@ color: #FCFCFD; } } - +