xiaoxin 2 роки тому
батько
коміт
e3ed9ef23d

+ 24 - 0
package-lock.json

@@ -0,0 +1,24 @@
+{
+  "name": "Homestay_manage_app",
+  "lockfileVersion": 2,
+  "requires": true,
+  "packages": {
+    "": {
+      "dependencies": {
+        "dayjs": "^1.11.9"
+      }
+    },
+    "node_modules/dayjs": {
+      "version": "1.11.9",
+      "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.9.tgz",
+      "integrity": "sha512-QvzAURSbQ0pKdIye2txOzNaHmxtUBXerpY0FJsFXUMKbIZeFm5ht1LS/jFsrncjnmtv8HsG0W2g6c0zUjZWmpA=="
+    }
+  },
+  "dependencies": {
+    "dayjs": {
+      "version": "1.11.9",
+      "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.9.tgz",
+      "integrity": "sha512-QvzAURSbQ0pKdIye2txOzNaHmxtUBXerpY0FJsFXUMKbIZeFm5ht1LS/jFsrncjnmtv8HsG0W2g6c0zUjZWmpA=="
+    }
+  }
+}

+ 5 - 0
package.json

@@ -0,0 +1,5 @@
+{
+  "dependencies": {
+    "dayjs": "^1.11.9"
+  }
+}

+ 36 - 11
pages/appraiseDetail/appraiseDetail.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-	<view class="container">
+	<view class="container" v-if="info">
 		<!-- 评价信息区域 -->
 		<!-- 评价信息区域 -->
 		<view class="header">
 		<view class="header">
 			<!-- 用户信息区域 -->
 			<!-- 用户信息区域 -->
@@ -8,24 +8,21 @@
 				<view class="info_msg">
 				<view class="info_msg">
 					<view class="msg_name">张三</view>
 					<view class="msg_name">张三</view>
 					<view class="msg_star">
 					<view class="msg_star">
-						<uni-rate readonly activeColor="#FFC300" :size="16" :value="4" />
+						<uni-rate readonly activeColor="#FFC300" :size="16" :value="info.score" />
 					</view>
 					</view>
 				</view>
 				</view>
-				<view class="info_time">2023/07/25</view>
+				<view class="info_time">{{ info.commentTime }}</view>
 			</view>
 			</view>
 
 
 			<!-- 入住时间区域 -->
 			<!-- 入住时间区域 -->
-			<view class="header_time">2023-07入住,2023-08-01发表 | 大床房</view>
+			<view class="header_time">2023-07入住,{{ info.commentTime }}发表 | {{ info.houseName }}</view>
 
 
 			<!-- 评价内容区域 -->
 			<!-- 评价内容区域 -->
-			<view class="header_content">评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容的丰富的丰富</view>
+			<view class="header_content">{{ info.content }}</view>
 
 
 			<!-- 图片列表区域 -->
 			<!-- 图片列表区域 -->
 			<view class="header_img">
 			<view class="header_img">
-				<img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
-				<img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
-				<img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
-				<img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
+				<img v-for="(ele, index) in info.url" :key="index" mode="aspectFill" :src="ele" @click="handleLookImg(info.url, index)" />
 			</view>
 			</view>
 		</view>
 		</view>
 
 
@@ -33,7 +30,7 @@
 		<view class="hotel">
 		<view class="hotel">
 			<img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
 			<img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
 			<view class="hotel_info">
 			<view class="hotel_info">
-				<view class="info_name">民宿名称</view>
+				<view class="info_name">{{ info.hotelName }}</view>
 				<view class="info_star">
 				<view class="info_star">
 					<uni-rate readonly activeColor="#FFC300" :size="12" :value="4" />
 					<uni-rate readonly activeColor="#FFC300" :size="12" :value="4" />
 					<view class="star_num">4.0</view>
 					<view class="star_num">4.0</view>
@@ -99,12 +96,40 @@ export default {
 	data() {
 	data() {
 		return {
 		return {
 			// 评价详情信息
 			// 评价详情信息
-			info: {}
+			info: null,
+			id: null
 		}
 		}
 	},
 	},
 	onLoad(options) {
 	onLoad(options) {
+		// console.log(options)
+		this.id = options.id
+		this.getData()
 		// this.info = JSON.parse(decodeURIComponent(options.info))
 		// this.info = JSON.parse(decodeURIComponent(options.info))
 		// console.log(this.info)
 		// console.log(this.info)
+	},
+	methods: {
+		// 获取详情数据
+		getData() {
+			uni.request({
+				url: 'http://192.168.161.224:8088/mhotel/abcapersonageDetails.action',
+				data: {
+					bookingCommentId: this.id
+				},
+				success: (res) => {
+					// console.log(res.data)
+					if (res.data.code === 200) {
+						this.info = res.data.commentDetails
+					}
+				}
+			})
+		},
+		// 点击图片回调
+		handleLookImg(urls, current) {
+			uni.previewImage({
+				urls,
+				current
+			})
+		}
 	}
 	}
 }
 }
 </script>
 </script>

+ 17 - 0
pages/detail/detail.vue

@@ -369,6 +369,7 @@ export default {
 			success: (res) => {
 			success: (res) => {
 				this.showLocation = res.authSetting['scope.userLocation']
 				this.showLocation = res.authSetting['scope.userLocation']
 				this.getHotelInfo()
 				this.getHotelInfo()
+				this.getEvaData()
 			}
 			}
 		})
 		})
 	},
 	},
@@ -389,6 +390,22 @@ export default {
 		}
 		}
 	},
 	},
 	methods: {
 	methods: {
+		// 获取评论数据
+		getEvaData() {
+			uni.request({
+				url: 'http://192.168.161.224:8088/mhotel/abcaevaluatePage.action',
+				data: {
+					hotelId: this.hotelId,
+					page: 1,
+					rows: 5,
+					status: 0
+				},
+				success: (res) => {
+					console.log(res.data)
+				}
+			})
+		},
+		// 获取民宿信息
 		async getHotelInfo() {
 		async getHotelInfo() {
 			const res = await this.$myRequest({
 			const res = await this.$myRequest({
 				url: '/mhotel/ahpgetHouseByHotelId.action',
 				url: '/mhotel/ahpgetHouseByHotelId.action',

+ 159 - 77
pages/evaluate/evaluate.vue

@@ -9,8 +9,8 @@
 		<!-- 评分区域 -->
 		<!-- 评分区域 -->
 		<view class="rate">
 		<view class="rate">
 			<view class="rate_key">民宿评分</view>
 			<view class="rate_key">民宿评分</view>
-			<uni-rate v-model="rateValue" size="18" @change="onChange" />
-			<view class="rate_value">非常好</view>
+			<uni-rate v-model="rateValue" size="18" @change="onChange($event, 1)" />
+			<view class="rate_value">{{ msg }}</view>
 		</view>
 		</view>
 
 
 		<!-- 评价上传图片视频区域 -->
 		<!-- 评价上传图片视频区域 -->
@@ -49,26 +49,26 @@
 			<!-- 民宿位置评价 -->
 			<!-- 民宿位置评价 -->
 			<view class="foot_box">
 			<view class="foot_box">
 				<view class="box_key">民宿位置</view>
 				<view class="box_key">民宿位置</view>
-				<uni-rate v-model="rateLocation" size="18" @change="onChange" />
-				<view class="box_value">非常好</view>
+				<uni-rate v-model="rateLocation" size="18" @change="onChange($event, 2)" />
+				<view class="box_value">{{ msgLocation }}</view>
 			</view>
 			</view>
 			<!-- 民宿设施评价 -->
 			<!-- 民宿设施评价 -->
 			<view class="foot_box">
 			<view class="foot_box">
 				<view class="box_key">民宿设施</view>
 				<view class="box_key">民宿设施</view>
-				<uni-rate v-model="rateLocation" size="18" @change="onChange" />
-				<view class="box_value">非常好</view>
+				<uni-rate v-model="rateFacility" size="18" @change="onChange($event, 3)" />
+				<view class="box_value">{{ msgFacility }}</view>
 			</view>
 			</view>
 			<!-- 民宿服务评价 -->
 			<!-- 民宿服务评价 -->
 			<view class="foot_box">
 			<view class="foot_box">
 				<view class="box_key">民宿服务</view>
 				<view class="box_key">民宿服务</view>
-				<uni-rate v-model="rateLocation" size="18" @change="onChange" />
-				<view class="box_value">非常好</view>
+				<uni-rate v-model="rateServe" size="18" @change="onChange($event, 4)" />
+				<view class="box_value">{{ msgServe }}</view>
 			</view>
 			</view>
 			<!-- 民宿卫生评价 -->
 			<!-- 民宿卫生评价 -->
 			<view class="foot_box">
 			<view class="foot_box">
 				<view class="box_key">民宿卫生</view>
 				<view class="box_key">民宿卫生</view>
-				<uni-rate v-model="rateLocation" size="18" @change="onChange" />
-				<view class="box_value">非常好</view>
+				<uni-rate v-model="rateHygiene" size="18" @change="onChange($event, 5)" />
+				<view class="box_value">{{ msgHygiene }}</view>
 			</view>
 			</view>
 		</view>
 		</view>
 
 
@@ -94,6 +94,7 @@
 <script>
 <script>
 // 图片压缩方法
 // 图片压缩方法
 import getLessLimitSizeImage from '@/util/imageCompress.js'
 import getLessLimitSizeImage from '@/util/imageCompress.js'
+var dayjs = require('dayjs')
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
@@ -102,29 +103,32 @@ export default {
 			// 胶囊按钮栏高度
 			// 胶囊按钮栏高度
 			customBarH: 0,
 			customBarH: 0,
 			// 民宿评分
 			// 民宿评分
-			rateValue: 2,
+			rateValue: 0,
+			msg: '',
 			// 评价绑定数据
 			// 评价绑定数据
 			textareaValue: '',
 			textareaValue: '',
 			// 评价文字长度
 			// 评价文字长度
 			textareaValuelength: 0,
 			textareaValuelength: 0,
-			// 显示的图片数据
-			imgList: [],
 			// 上传的图片数据
 			// 上传的图片数据
 			subImgList: [],
 			subImgList: [],
-			// 图片上传框的样式
-			imageStyles: {
-				width: '60px',
-				height: 60,
-				border: {
-					// 如果为 Boolean 值,可以控制边框显示与否
-					color: '#eee', // 边框颜色
-					width: '1px', // 边框宽度
-					style: 'solid', // 边框样式
-					radius: '50%' // 边框圆角,支持百分比
-				}
-			},
 			// 民宿位置评分
 			// 民宿位置评分
-			rateLocation: 3
+			rateLocation: 0,
+			msgLocation: '',
+			// 民宿设施评分
+			rateFacility: 0,
+			msgFacility: '',
+			// 民宿服务评分
+			rateServe: 0,
+			msgServe: '',
+			// 民宿卫生评分
+			rateHygiene: 0,
+			msgHygiene: '',
+			// 订单id
+			bookingId: '',
+			// 民宿id
+			hotelId: '',
+			// 房间id
+			houseId: ''
 		}
 		}
 	},
 	},
 	created() {
 	created() {
@@ -139,6 +143,12 @@ export default {
 			}
 			}
 		})
 		})
 	},
 	},
+	onLoad(options) {
+		// console.log(options)
+		this.bookingId = options.bookingId
+		this.hotelId = options.hotelId
+		this.houseId = options.houseId
+	},
 	methods: {
 	methods: {
 		// 点击页面标题返回箭头回调
 		// 点击页面标题返回箭头回调
 		handleBack() {
 		handleBack() {
@@ -158,10 +168,67 @@ export default {
 		},
 		},
 		// 点击提交按钮回调
 		// 点击提交按钮回调
 		handleSub() {
 		handleSub() {
-			uni.navigateTo({
-				url: `/pages/evaluateStatus/evaluateStatus?status=2`
+			if (!this.rateValue || !this.rateLocation || !this.rateFacility || !this.rateHygiene || !this.rateServe) {
+				uni.showToast({
+					title: '请评分后再提交',
+					icon: 'none',
+					mask: true
+				})
+				return
+			}
+
+			let userInfo = uni.getStorageSync('userInfo')
+			let time = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss')
+
+			uni.request({
+				url: 'http://192.168.161.224:8088/mhotel/abcaorderRate.action',
+				method: 'post',
+				data: {
+					bookingId: this.bookingId,
+					hotelId: this.hotelId,
+					houseId: this.houseId,
+					content: this.textareaValue,
+					commentStatus: 1,
+					score: this.rateValue,
+					scoreWs: this.rateHygiene,
+					scoreFw: this.rateServe,
+					scoreSs: this.rateFacility,
+					scoreWz: this.rateLocation,
+					createId: userInfo.id,
+					createUsername: userInfo.user_name,
+					createDate: time,
+					modifyDate: time,
+					pictureList: this.subImgList
+				},
+				success: (res) => {
+					// console.log(res.data)
+					if (res.data.code === 200) {
+						uni.showToast({
+							title: '评价成功',
+							icon: 'success',
+							mask: true
+						})
+						setTimeout(() => {
+							uni.navigateTo({
+								url: `/pages/evaluateStatus/evaluateStatus?status=1`
+							})
+						}, 1500)
+					} else {
+						uni.showToast({
+							title: res.data.message,
+							icon: 'none',
+							mask: true
+						})
+						setTimeout(() => {
+							uni.navigateTo({
+								url: `/pages/evaluateStatus/evaluateStatus?status=2`
+							})
+						}, 1500)
+					}
+				}
 			})
 			})
 		},
 		},
+		// 上传图片回调
 		handleUpLoad() {
 		handleUpLoad() {
 			uni.chooseMedia({
 			uni.chooseMedia({
 				count: 9,
 				count: 9,
@@ -211,62 +278,77 @@ export default {
 			})
 			})
 		},
 		},
 		// 评分改变回调
 		// 评分改变回调
-		onChange(e) {
-			console.log(e.value)
+		onChange(e, index) {
+			// console.log(e)
+			if (index === 1) {
+				if (e.value === 1) {
+					this.msg = '非常差'
+				} else if (e.value === 2) {
+					this.msg = '差'
+				} else if (e.value === 3) {
+					this.msg = '一般'
+				} else if (e.value === 4) {
+					this.msg = '好'
+				} else if (e.value === 5) {
+					this.msg = '非常好'
+				}
+			} else if (index === 2) {
+				if (e.value === 1) {
+					this.msgLocation = '非常差'
+				} else if (e.value === 2) {
+					this.msgLocation = '差'
+				} else if (e.value === 3) {
+					this.msgLocation = '一般'
+				} else if (e.value === 4) {
+					this.msgLocation = '好'
+				} else if (e.value === 5) {
+					this.msgLocation = '非常好'
+				}
+			} else if (index === 3) {
+				if (e.value === 1) {
+					this.msgFacility = '非常差'
+				} else if (e.value === 2) {
+					this.msgFacility = '差'
+				} else if (e.value === 3) {
+					this.msgFacility = '一般'
+				} else if (e.value === 4) {
+					this.msgFacility = '好'
+				} else if (e.value === 5) {
+					this.msgFacility = '非常好'
+				}
+			} else if (index === 4) {
+				if (e.value === 1) {
+					this.msgServe = '非常差'
+				} else if (e.value === 2) {
+					this.msgServe = '差'
+				} else if (e.value === 3) {
+					this.msgServe = '一般'
+				} else if (e.value === 4) {
+					this.msgServe = '好'
+				} else if (e.value === 5) {
+					this.msgServe = '非常好'
+				}
+			} else if (index === 5) {
+				if (e.value === 1) {
+					this.msgHygiene = '非常差'
+				} else if (e.value === 2) {
+					this.msgHygiene = '差'
+				} else if (e.value === 3) {
+					this.msgHygiene = '一般'
+				} else if (e.value === 4) {
+					this.msgHygiene = '好'
+				} else if (e.value === 5) {
+					this.msgHygiene = '非常好'
+				}
+			}
 		},
 		},
 		// 评价输入框输入回调
 		// 评价输入框输入回调
 		handleInput(e) {
 		handleInput(e) {
 			this.textareaValuelength = e.detail.cursor
 			this.textareaValuelength = e.detail.cursor
 		},
 		},
-		// 选择图片回调
-		select(e) {
-			// console.log(e)
-			e.tempFiles.forEach((item) => {
-				//这里的id和页面中写的html代码的canvas的id要一致
-				let canvasId = 'zipCanvas'
-				//原图的路径
-				let imagePath = item.path
-				//大小限制1024kb
-				let limitSize = 1024
-				//初始绘画区域是画布自身的宽度也就是屏幕宽度
-				let drawWidth = uni.getSystemInfoSync().windowWidth
-
-				getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, (resPath) => {
-					uni.showLoading({
-						title: '上传中'
-					})
-					uni.uploadFile({
-						url: `https://chtech.ncjti.edu.cn/hotelReservation/mhotel/mhotel/uploadhimage.action`,
-						filePath: resPath,
-						name: 'myFile',
-						success: (uploadFileRes) => {
-							console.log(JSON.parse(uploadFileRes.data))
-							let temRes = JSON.parse(uploadFileRes.data)
-							if (temRes.code === 200) {
-								this.subImgList.push(temRes.data.url)
-								this.imgList.push({
-									url: item.path,
-									name: ''
-								})
-								uni.hideLoading()
-							}
-						},
-						fail: () => {
-							uni.showToast({
-								title: '上传失败',
-								icon: 'error'
-							})
-						}
-					})
-				})
-			})
-		},
 		// 删除图片回调
 		// 删除图片回调
 		handleDelete(index) {
 		handleDelete(index) {
-			// console.log(e);
-			// const num = this.imgList.findIndex((v) => v.url === e.tempFilePath)
 			this.subImgList.splice(index, 1)
 			this.subImgList.splice(index, 1)
-			// this.imgList.splice(num, 1)
 		}
 		}
 	}
 	}
 }
 }
@@ -441,4 +523,4 @@ export default {
 		background-color: #096562;
 		background-color: #096562;
 	}
 	}
 }
 }
-</style>
+</style>

+ 13 - 1
pages/evaluateStatus/evaluateStatus.vue

@@ -5,7 +5,7 @@
 			<img v-if="status === '1'" src="../../static/index/success.png" />
 			<img v-if="status === '1'" src="../../static/index/success.png" />
 			<img v-if="status === '2'" src="../../static/index/fail.png" />
 			<img v-if="status === '2'" src="../../static/index/fail.png" />
 			<view class="status_msg">{{ msg }}</view>
 			<view class="status_msg">{{ msg }}</view>
-			<view class="status_btn">{{ btnMsg }}</view>
+			<view class="status_btn" @click="handleClickBtn">{{ btnMsg }}</view>
 		</view>
 		</view>
 
 
 		<!-- 民宿信息区域 -->
 		<!-- 民宿信息区域 -->
@@ -99,6 +99,18 @@ export default {
 			this.msg = '评价失败'
 			this.msg = '评价失败'
 			this.btnMsg = '重新评价'
 			this.btnMsg = '重新评价'
 		}
 		}
+	},
+	methods: {
+		// 点击按钮回调
+		handleClickBtn() {
+			if (this.status === '1') {
+				uni.navigateTo({
+					url: '/pages/myEvaluate/myEvaluate'
+				})
+			} else {
+				uni.navigateBack(1)
+			}
+		}
 	}
 	}
 }
 }
 </script>
 </script>

+ 43 - 63
pages/myEvaluate/myEvaluate.vue

@@ -8,27 +8,27 @@
 		<!-- 列表区域 -->
 		<!-- 列表区域 -->
 		<scroll-view class="body" scroll-y @scrolltolower="handlePull">
 		<scroll-view class="body" scroll-y @scrolltolower="handlePull">
 			<!-- 每一个盒子区域 -->
 			<!-- 每一个盒子区域 -->
-			<view class="box" v-for="item in list" :key="item.id">
+			<view class="box" v-for="item in list" :key="item.bookingCommentId" @click="handleGoDetail(item)">
 				<!-- 头部区域 -->
 				<!-- 头部区域 -->
 				<view class="box_top">
 				<view class="box_top">
 					<img mode="aspectFill" src="../../static/my/hotel.png" />
 					<img mode="aspectFill" src="../../static/my/hotel.png" />
-					<view class="top_name">{{ item.name }}</view>
-					<view class="box_type">{{ item.type }}</view>
+					<view class="top_name">{{ item.hotelName }}</view>
+					<view class="box_type">已消费</view>
 				</view>
 				</view>
 
 
 				<!-- 房间信息区域 -->
 				<!-- 房间信息区域 -->
 				<view class="box_center">
 				<view class="box_center">
-					<img mode="aspectFill" :src="item.imgUrl" />
+					<img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
 					<view class="center_info">
 					<view class="center_info">
-						<view>{{ item.count }}间,{{ item.roomType }}</view>
-						<view>{{ item.time }}</view>
-						<view>总价:¥{{ item.total }}</view>
+						<view>{{ item.houseOrderNumber }}间,{{ item.houseName }}</view>
+						<view>{{ item.checkOutTime.slice(0, 10) }} - {{ item.checkOutTime.slice(0, 10) }}</view>
+						<view>总价:¥{{ item.payAccount }}</view>
 					</view>
 					</view>
 				</view>
 				</view>
 
 
 				<!-- 按钮区域 -->
 				<!-- 按钮区域 -->
-				<view class="box_btn">
-					<view class="btn_eva" @click="handleGoPage">去评价</view>
+				<view class="box_btn" v-if="activeCurrent === 0">
+					<view class="btn_eva" @click.stop="handleGoPage">去评价</view>
 				</view>
 				</view>
 			</view>
 			</view>
 
 
@@ -49,48 +49,7 @@ export default {
 			// 分段器数组
 			// 分段器数组
 			headerList: ['待评价', '已评价'],
 			headerList: ['待评价', '已评价'],
 			// 列表数据
 			// 列表数据
-			list: [
-				// {
-				// 	id: 1,
-				// 	name: '民宿名称',
-				// 	type: '已消费',
-				// 	imgUrl: 'https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375',
-				// 	count: 1,
-				// 	roomType: '大床房',
-				// 	time: '2023-07-26  -  2023-07-27',
-				// 	total: 229
-				// },
-				// {
-				// 	id: 2,
-				// 	name: '开心民宿',
-				// 	type: '已消费',
-				// 	imgUrl: 'https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375',
-				// 	count: 2,
-				// 	roomType: '双人房',
-				// 	time: '2023-07-27  -  2023-07-27',
-				// 	total: 299
-				// },
-				// {
-				// 	id: 3,
-				// 	name: '开心民宿',
-				// 	type: '已消费',
-				// 	imgUrl: 'https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375',
-				// 	count: 2,
-				// 	roomType: '双人房',
-				// 	time: '2023-07-27  -  2023-07-27',
-				// 	total: 299
-				// },
-				// {
-				// 	id: 4,
-				// 	name: '开心民宿',
-				// 	type: '已消费',
-				// 	imgUrl: 'https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375',
-				// 	count: 2,
-				// 	roomType: '双人房',
-				// 	time: '2023-07-27  -  2023-07-27',
-				// 	total: 299
-				// }
-			],
+			list: [],
 			noDataMsg: '暂无待评价数据',
 			noDataMsg: '暂无待评价数据',
 			// 当前页
 			// 当前页
 			page: 1,
 			page: 1,
@@ -107,37 +66,59 @@ export default {
 		getData() {
 		getData() {
 			uni.request({
 			uni.request({
 				url: 'http://192.168.161.224:8088/mhotel/abcapersonageComment.action',
 				url: 'http://192.168.161.224:8088/mhotel/abcapersonageComment.action',
-				method: 'get',
 				data: {
 				data: {
 					usersId: uni.getStorageSync('userInfo').id,
 					usersId: uni.getStorageSync('userInfo').id,
-					status: 1,
+					status: this.activeCurrent,
 					page: this.page,
 					page: this.page,
 					rows: this.rows
 					rows: this.rows
 				},
 				},
 				success: (res) => {
 				success: (res) => {
-					console.log(res.data)
+					// console.log(res.data)
+					if (res.data.code === 200 && res.data.page.pageList) {
+						this.list = [...this.list, ...res.data.page.pageList]
+						this.total = res.data.total
+					}
 				}
 				}
 			})
 			})
 		},
 		},
 		// 切换分段器回调
 		// 切换分段器回调
 		onClickItem(e) {
 		onClickItem(e) {
-			if (this.current !== e.currentIndex) {
-				this.current = e.currentIndex
-				if (this.current === 0) {
-					this.noDataMsg = '暂无待评价数据'
-				} else {
-					this.noDataMsg = '暂无已评价数据'
-				}
+			this.activeCurrent = e.currentIndex
+			if (this.activeCurrent === 0) {
+				this.noDataMsg = '暂无待评价数据'
+			} else {
+				this.noDataMsg = '暂无已评价数据'
 			}
 			}
+			this.list = []
+			this.page = 1
+			this.getData()
 		},
 		},
 		// 列表下拉到底部回调
 		// 列表下拉到底部回调
 		handlePull() {
 		handlePull() {
 			console.log(111)
 			console.log(111)
+			if (this.list.length < this.total) {
+				this.page++
+				this.getData()
+			} else {
+				uni.showToast({
+					title: '没有更多数据了',
+					icon: 'none'
+				})
+			}
 		},
 		},
+		//去评价按钮回调
 		handleGoPage() {
 		handleGoPage() {
 			uni.navigateTo({
 			uni.navigateTo({
 				url: '/pages/evaluate/evaluate'
 				url: '/pages/evaluate/evaluate'
 			})
 			})
+		},
+		// 点击每一个评价订单的回调
+		handleGoDetail(item) {
+			if (this.activeCurrent === 1) {
+				uni.navigateTo({
+					url: `/pages/appraiseDetail/appraiseDetail?id=${item.bookingCommentId}`
+				})
+			}
 		}
 		}
 	}
 	}
 }
 }
@@ -163,9 +144,8 @@ export default {
 		overflow-y: auto;
 		overflow-y: auto;
 
 
 		.box {
 		.box {
-			padding: 0 20rpx;
+			padding: 0 20rpx 20rpx;
 			margin-bottom: 20rpx;
 			margin-bottom: 20rpx;
-			height: 341rpx;
 			background-color: #fff;
 			background-color: #fff;
 
 
 			.box_top {
 			.box_top {

+ 4 - 4
pages/orderManage/orderManage.vue

@@ -40,8 +40,8 @@
 					</view>
 					</view>
 
 
 					<!-- 按钮区域 -->
 					<!-- 按钮区域 -->
-					<view class="box_btn" v-if="item.orderStatus === '1' || item.orderStatus === '6'">
-						<view class="btn_item" v-if="item.orderStatus === '5'" @click="handleEvaluate">去评价</view>
+					<view class="box_btn" v-if="item.orderStatus === '1' || item.orderStatus === '6' || item.orderStatus === '5'">
+						<view class="btn_item" v-if="item.orderStatus === '5'" @click.stop="handleEvaluate(item)">去评价</view>
 						<view class="btn_item pay" v-if="item.orderStatus === '1'" @click.stop="goPagePay(item)">去支付</view>
 						<view class="btn_item pay" v-if="item.orderStatus === '1'" @click.stop="goPagePay(item)">去支付</view>
 						<view class="btn_item" v-if="item.orderStatus === '6'" @click.stop="goPageDetail(item)">再次预定</view>
 						<view class="btn_item" v-if="item.orderStatus === '6'" @click.stop="goPageDetail(item)">再次预定</view>
 					</view>
 					</view>
@@ -403,10 +403,10 @@ export default {
 				}
 				}
 			})
 			})
 		},
 		},
-		handleEvaluate() {
+		handleEvaluate(item) {
 			this.handleDeleteList()
 			this.handleDeleteList()
 			uni.navigateTo({
 			uni.navigateTo({
-				url: `/pages/evaluate/evaluate`
+				url: `/pages/evaluate/evaluate?bookingId=${item.id}&hotelId=${item.hotelId}&houseId=${item.houseId}`
 			})
 			})
 		},
 		},
 		// 计算两个点之间的距离
 		// 计算两个点之间的距离

+ 1 - 1
pages/pay/pay.vue

@@ -149,7 +149,7 @@ export default {
 				success: (res) => {
 				success: (res) => {
 					if (res.confirm) {
 					if (res.confirm) {
 						uni.switchTab({
 						uni.switchTab({
-							url: '/pages/home/home'
+							url: '/pages/home3/home3'
 						})
 						})
 					}
 					}
 				}
 				}

+ 2 - 21
pages/payStatus/payStatus.vue

@@ -55,7 +55,7 @@ export default {
 									console.log('拒绝2')
 									console.log('拒绝2')
 								}
 								}
 								uni.switchTab({
 								uni.switchTab({
-									url: '/pages/home/home'
+									url: '/pages/home3/home3'
 								})
 								})
 							},
 							},
 							fail(err) {
 							fail(err) {
@@ -79,7 +79,7 @@ export default {
 									console.log('失败')
 									console.log('失败')
 									setTimeout(() => {
 									setTimeout(() => {
 										uni.switchTab({
 										uni.switchTab({
-											url: '/pages/home/home'
+											url: '/pages/home3/home3'
 										})
 										})
 									}, 1500)
 									}, 1500)
 								}
 								}
@@ -88,25 +88,6 @@ export default {
 					}
 					}
 				}
 				}
 			})
 			})
-
-			// uni.requestSubscribeMessage({
-			// 	tmplIds: [this.templateOrder],
-			// 	success: (res) => {
-			// 		console.log(res)
-			// 		if (res[this.templateOrder] !== 'reject') {
-			// 			console.log('成功')
-			// 		} else {
-			// 			console.log('拒绝2')
-			// 		}
-			// 		uni.switchTab({
-			// 			url: '/pages/home/home'
-			// 		})
-			// 	},
-			// 	fail(err) {
-			// 		console.log(err)
-			// 		console.log('拒绝')
-			// 	}
-			// })
 		}
 		}
 	}
 	}
 }
 }

+ 1 - 1
pages/push/push.vue

@@ -185,7 +185,7 @@ export default {
 		// 点击左上角返回按钮回调
 		// 点击左上角返回按钮回调
 		handleBack() {
 		handleBack() {
 			uni.switchTab({
 			uni.switchTab({
-				url: '/pages/home/home'
+				url: '/pages/home3/home3'
 			})
 			})
 		},
 		},
 		getWeek(time) {
 		getWeek(time) {