Browse Source

1.门店评价
2.我的评价

guo 2 years ago
parent
commit
1076f2ca1d

+ 35 - 14
pages/index/onlineBooking.vue

@@ -17,15 +17,16 @@
 				<view class="newshopDstop">
 					<view class="newshopDname">{{shopInfo.shopName}}</view>
 
-					<view class="appraiseBox">
+					<view v-if="(data.isShowScore == 1) || (data.isShowEvaluate == 1)" class="appraiseBox">
 						<view v-if="data.isShowScore == 1" class="appraise">{{data.shopInfo.miniV2ShopScore}}
 							<span style='font-size: 26rpx; margin-left: 3rpx;'>分</span>
 						</view>
+						<view v-if="data.isShowScore == 1" class="line"></view>
 						<view @click="goShopAppraiseList()" v-if="data.isShowEvaluate == 1" class="appraiseCount">评价数
 							{{data.evaluateCount}}
-							<image src="../../static/timg/icon_arrow_right.png" mode=""
-								style="width: 7rpx; height: 15rpx; margin-left: 32rpx;"></image>
+
 						</view>
+						<image v-if="data.isShowEvaluate == 1" class="rightArrow" src="../../static/timg/icon_arrow_right.png" mode=""></image>
 					</view>
 
 					<view class="newshopDtime">
@@ -161,8 +162,8 @@
 				},
 				shopInfo: '',
 				naShopId: '',
-				themeColor: '',
-				data:{},
+				themeColor: '',
+				data: {},
 			}
 		},
 		onLoad(opt) {
@@ -184,12 +185,12 @@
 				}, 0).toFixed(2)
 			}
 		},
-		methods: {
-			goShopAppraiseList(){
-				uni.navigateTo({
-					url:'../user/ShopAppraiseList?shopID=' + this.data.shopInfo.id
-					// url: 'ShopAppraiseList?shopID=' + this.numList.shopInfo.id
-				})
+		methods: {
+			goShopAppraiseList() {
+				uni.navigateTo({
+					url: '../user/ShopAppraiseList?shopID=' + this.data.shopInfo.id
+					// url: 'ShopAppraiseList?shopID=' + this.numList.shopInfo.id
+				})
 			},
 			getInfo() {
 				uni.showLoading({
@@ -202,7 +203,7 @@
 					lng: this.location.lng ? this.location.lng : '',
 					shopId: this.naShopId,
 				}, 'GET').then(res => {
-					this.shopInfo = res.data.shopInfo;
+					this.shopInfo = res.data.shopInfo;
 					this.data = res.data;
 					uni.setStorage({
 						key: 'yyshopInfo',
@@ -723,7 +724,7 @@
 	}
 
 	.appraiseBox {
-		padding: 5rpx 20rpx;
+		padding: 5rpx 40rpx 5rpx 20rpx;
 		margin-top: 10rpx;
 		height: 62rpx;
 		background: rgba(255, 0, 0, 0.08);
@@ -733,16 +734,36 @@
 		align-items: center;
 	}
 
+
 	.appraise {
 		color: #FF0000;
 		font-size: 38rpx;
 		font-weight: bold;
+
+	}
+
+	.line {
+
+		margin: 0 20rpx;
+		width: 1rpx;
+		height: 30rpx;
+		background: #E9E8E8;
+
 	}
 
 	.appraiseCount {
-		margin-left: 40rpx;
+
 		font-size: 24rpx;
 		font-weight: 400;
 		color: #666666;
+		flex-grow: 1;
+
+	}
+
+	.rightArrow {
+
+		width: 7rpx;
+		height: 15rpx;
+		margin-left: 32rpx;
 	}
 </style>

+ 26 - 15
pages/user/ShopAppraiseList.vue

@@ -3,11 +3,10 @@
 
 		<!-- 列表 -->
 		<view class="itemContent">
-			<view v-for="(item,index) in itemData" :key="index" @click="goDetail(item)">
+			<view v-for="(item,index) in itemData" :key="index">
 				<view class="item">
 
 
-
 					<!-- 第一行 -->
 					<view class="firstView">
 						<view class="left">
@@ -36,18 +35,23 @@
 					<view class="contentMes">{{item.EContent}}</view>
 
 					<!-- 照片 -->
-					<view v-if="item.imgs.length != 0" class="imgBg">
+					<view v-if="item.imgs.length > 0" class="imgBg">
 						<view v-for="(itemImg,indexImg) in item.imgs" :key="indexImg">
 
-							<image :src="itemImg.imageUrl" class="img"
+							<image :src="itemImg.imageUrl" class="img" :class="{'img4R':(indexImg+1)%4==0&&indexImg!=0}"
 								@click.stop="previewImage(itemImg.imageUrl,item.imgs)"></image>
 						</view>
 					</view>
 
 					<!-- 商家回复 -->
 
-					<view class="writeBack" v-if="item.ReplyContent">商家回复:{{item.ReplyContent}}</view>
-
+					<view v-if="item.ReplyContent" class="writeBack">
+						<view class="title">
+							<view style="font-weight: bold;">商家回复</view>
+							<view>{{item.ReplyTime.slice(0,item.ReplyTime.length-8)}}</view>
+						</view>
+						<view>{{item.ReplyContent}}</view>
+					</view>
 
 					<!-- <view class="bottom">
 						<view class="btnBox" @click.stop="goOrder(item)">
@@ -92,11 +96,11 @@
 				itemData: [],
 				page: 1,
 				noMoreShow: false,
-				shopID:'',
+				shopID: '',
 			}
 		},
-		onLoad(opt) {
-			// console.log('opt===',opt);
+		onLoad(opt) {
+			// console.log('opt===',opt);
 			this.shopID = opt.shopID;
 		},
 		onShow() {
@@ -110,11 +114,7 @@
 					url: 'historyDetail?id=' + item.SheetID
 				})
 			},
-			goDetail(item) {
-				uni.navigateTo({
-					url: 'myAppraiseDetail?sheetId=' + item.SheetID
-				})
-			},
+			
 			previewImage(img, arrDic) {
 				var arr = [];
 
@@ -175,7 +175,7 @@
 					params = {
 						page: this.page,
 						limit: 20,
-						shopId:this.shopID,
+						shopId: this.shopID,
 					}
 				this.$http(url, params, 'GET').then(res => {
 					uni.hideLoading();
@@ -323,6 +323,11 @@
 		border-radius: 8rpx;
 	}
 
+	.img4R {
+
+		margin-right: 0;
+	}
+
 	.writeBack {
 		font-size: 26rpx;
 		color: #666666;
@@ -334,6 +339,12 @@
 		border-radius: 10rpx;
 	}
 
+	.title {
+		display: flex;
+		justify-content: space-between;
+		margin-bottom: 10rpx;
+	}
+
 	.bottom {
 		padding-top: 27rpx;
 		padding-bottom: 7rpx;

+ 5 - 4
pages/user/appraise.vue

@@ -6,7 +6,7 @@
 				<view class="title">总体评价</view>
 				<view class=" " style="padding-left: 30rpx;">
 					<view class="xxBox">
-						<uni-rate v-model="grade" :max="5" color="#EEEEEE" active-color="#FF0000" :size="20" :margin="5"
+						<uni-rate v-model="grade" :max="5" color="#EEEEEE" active-color="#FF0000" :size="20" :margin="20"
 							@change="gradeCl" />
 						<view class="td orangeColor" v-if="grade==5">非常好</view>
 						<view class="td orangeColor" v-if="grade==4">很好</view>
@@ -24,7 +24,7 @@
 				<view class="rowView">
 					<view class="littleTitle">服务态度</view>
 					<view class="xxBox">
-						<uni-rate v-model="xx" :max="5" color="#EEEEEE" active-color="#FF4F00" :size="20" :margin="5"
+						<uni-rate v-model="xx" :max="5" color="#EEEEEE" active-color="#FF4F00" :size="20" :margin="20"
 							@change="taidu" />
 						<view class="td orangeColor" v-if="taiduStar==5">非常好</view>
 						<view class="td orangeColor" v-if="taiduStar==4">很好</view>
@@ -37,7 +37,7 @@
 				<view class="rowView">
 					<view class="littleTitle">施工质量</view>
 					<view class="xxBox">
-						<uni-rate v-model="yy" :max="5" color="#EEEEEE" active-color="#FF4F00" :size="20" :margin="5"
+						<uni-rate v-model="yy" :max="5" color="#EEEEEE" active-color="#FF4F00" :size="20" :margin="20"
 							@change="zhiliang" />
 						<view class="td orangeColor" v-if="zhiliangStar==5">非常好</view>
 						<view class="td orangeColor" v-if="zhiliangStar==4">很好</view>
@@ -50,7 +50,7 @@
 				<view class="rowView">
 					<view class="littleTitle">店面环境</view>
 					<view class="xxBox">
-						<uni-rate v-model="zz" :max="5" color="#EEEEEE" active-color="#FF4F00" :size="20" :margin="5"
+						<uni-rate v-model="zz" :max="5" color="#EEEEEE" active-color="#FF4F00" :size="20" :margin="20"
 							@change="huanjing" />
 						<view class="td orangeColor" v-if="huanjingStar==5">非常好</view>
 						<view class="td orangeColor" v-if="huanjingStar==4">很好</view>
@@ -194,6 +194,7 @@
 				uni.chooseImage({
 					sourceType: ['album','camera'],
 					count:num-length, 
+					sizeType:['compressed'],
 					success: (chooseImageRes) => {
 						const tempFilePaths = chooseImageRes.tempFilePaths;
 						/* uni.uploadFile({

+ 78 - 9
pages/user/historyDetail.vue

@@ -108,9 +108,10 @@
 	</view>
 
 	
-	<view class="bottom">
-		<view v-if="orderData.billsheet.EvaluateState == 0" @click.stop="goAppraise()" class="ping">评价</view>
-		<view v-else @click.stop="goAppraiseDetail()" class="kan">查看评价</view>
+	<view v-if="appraise == true" class="bottom">
+		<view v-if="(orderData.billsheet.EvaluateState == 0) && (lastDay <= 30) && appraise == true" @click.stop="goAppraise()" class="ping">评价</view>
+		<view v-if="orderData.billsheet.EvaluateState == 1" @click.stop="goAppraiseDetail()" class="kan">查看评价</view>
+		
 	</view>
 	
 	</view>
@@ -127,7 +128,9 @@
                 authorizShow:false,
                 userInfo:'',
 				ext:'',
-				wxOpenData:'',
+				wxOpenData:'',
+				appraise:false,
+				lastDay:'',
 			}
 		},
 		onLoad(opt) {
@@ -147,11 +150,22 @@
 				})
 			}
 			
-			
+			this.myPower();
 
 		},
 		
 		methods: {
+			//评价权限
+			myPower() {
+				this.$http('openMiniEvaluate/getEvaluateSetting', {
+			
+				}, 'GET').then(res => {
+					// var list = res.data.Items
+					this.appraise = res.data
+					
+					
+				})
+			},
 			goAppraiseDetail(item) {
 				uni.navigateTo({
 					url: 'myAppraiseDetail?sheetId=' + this.orderData.billsheet.id
@@ -219,7 +233,8 @@
 			},
 
 
-			getData() {
+			getData() {
+				let that = this
 				uni.showLoading({
 					title: '加载中'
 				});
@@ -231,10 +246,64 @@
 				}, 'POST').then(res => {
 					uni.hideLoading();
 					this.orderData = res.data;
-
+					
+					
 					
 				})
-			},
+			},
+			//时间对比
+			getDateBeforeNow(stringTime) {
+							console.log("传参未格式化", stringTime);
+							stringTime = new Date(stringTime.replace(/-/g, '/'))
+			
+							// 统一单位换算
+							var minute = 1000 * 60;
+							var hour = minute * 60;
+							var day = hour * 24;
+							var week = day * 7;
+							var month = day * 30;
+							var year = month * 12;
+			
+							var time1 = new Date().getTime(); //当前的时间戳
+							console.log("当前时间", time1);
+			
+							// 对时间进行毫秒单位转换
+							var time2 = new Date(stringTime).getTime(); //指定时间的时间戳
+			
+							console.log("传过来的时间", time2);
+			
+							var time = time1 - time2;
+							console.log("计算后的时间", time);
+			
+							var result = null;
+							// if (time < 0) {
+							// 	// alert("传过来的时间的时间不能晚于当前时间!");
+							// 	result = stringTime;
+							// } else if (time / year >= 1) {
+							// 	result = parseInt(time / year) + "年前";
+							// } else if (time / month >= 1) {
+							// 	result = parseInt(time / month) + "月前";
+							// } else if (time / week >= 1) {
+							// 	result = parseInt(time / week) + "周前";
+							// } else if (time / day >= 1) {
+							// 	result = parseInt(time / day) + "天前";
+							// } else if (time / hour >= 1) {
+							// 	result = parseInt(time / hour) + "小时前";
+							// } else if (time / minute >= 1) {
+							// 	result = parseInt(time / minute) + "分钟前";
+							// } else {
+							// 	result = "刚刚";
+							// }
+							
+							if (time < 0) {
+								// alert("传过来的时间的时间不能晚于当前时间!");
+								result = -1;
+							} else if (time / day >= 0) {
+								result = parseInt(time / day);//多少天前
+							}
+							console.log("多少天前", result);
+							return result;
+						},
 			goback() {
 
 				uni.navigateBack({})
@@ -835,7 +904,7 @@
 			bottom: 0;
 			background: #ffffff;
 			border-radius: 24rpx 24rpx 0px 0px;
-			
+			font-size: 28rpx;
 			display: flex;
 			justify-content: flex-end;
 		}

+ 90 - 18
pages/user/historySpend.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="box">
-		<view class="itemHistory" v-for="(item,index) in itemData" :key="index" @click="goDetail(item.id)">
+		<view class="itemHistory" v-for="(item,index) in itemData" :key="index" @click="goDetail(item)">
 			<view class="time">{{item.time}}</view>
 			<view class="carPlate">
 				<view class="plate">{{item.PlateNumber}}</view>
@@ -16,9 +16,9 @@
 				<view class="itemContent" v-if="item.listParts.length != 0" v-for="(v,i) in item.listParts">{{v.GoodsName}},</view>
 			</view>
 			
-			<view class="bottom">
-				<view v-if="item.EvaluateState == 0" @click.stop="goAppraise(item)" class="ping">评价</view>
-				<view v-else @click.stop="goAppraiseDetail(item)" class="kan">查看评价</view>
+			<view v-if="((appraise == true) && ((item.lastDay <= 30 && item.EvaluateState == 0) || item.EvaluateState == 1))" class="bottom">
+				<view v-if="(item.EvaluateState == 0) && (item.lastDay <= 30) && appraise == true" @click.stop="goAppraise(item)" class="ping">评价</view>
+				<view v-if="item.EvaluateState == 1" @click.stop="goAppraiseDetail(item)" class="kan">查看评价</view>
 			</view>
 		</view>
 
@@ -41,14 +41,30 @@
 			return {
 				page: 1,
 				itemData: [],
-				noMoreShow: false,
+				noMoreShow: false,
+				appraise:false,
+				
 			}
 		},
 		onLoad() {
 			this.page = 1
-			this.myOrderCoupon()
+			this.myOrderCoupon()
+			this.myPower()
+			
 		},
 		methods: {
+			
+			//评价权限
+			myPower() {
+				this.$http('openMiniEvaluate/getEvaluateSetting', {
+			
+				}, 'GET').then(res => {
+					// var list = res.data.Items
+					this.appraise = res.data
+					
+					
+				})
+			},
 			goAppraiseDetail(item) {
 				uni.navigateTo({
 					url: 'myAppraiseDetail?sheetId=' + item.id
@@ -59,12 +75,13 @@
 					url: 'appraise?sheetID=' + item.id + '&shopID=' + item.shopID
 				})
 			},
-			goDetail(id) {
+			goDetail(item) {
 				uni.navigateTo({
-					url: 'historyDetail?id=' + id
+					url: 'historyDetail?id=' + item.id + '&lastDay=' + item.lastDay
 				})
 			},
-			myOrderCoupon() {
+			myOrderCoupon() {
+				let that = this
 				uni.showLoading({
 					title: '加载中'
 				})
@@ -76,13 +93,8 @@
 					uni.hideLoading();
 					// var list = res.data.Items
 					var list = res.data
+					
 					
-					// 处理 undefined和null转为空白字符串
-					// list.forEach((item, index) => {
-					// 	for (const key in item) {
-					// 		item[key] = this.$praseStrEmpty(item[key])
-					// 	}
-					// })
 
 					if (this.page == 1) {
 						this.itemData = list
@@ -97,14 +109,68 @@
 					}
 
 					
-
+					
 
 
 				})
 			},
+			//时间对比
+			getDateBeforeNow(stringTime) {
+							console.log("传参未格式化", stringTime);
+							stringTime = new Date(stringTime.replace(/-/g, '/'))
+			
+							// 统一单位换算
+							var minute = 1000 * 60;
+							var hour = minute * 60;
+							var day = hour * 24;
+							var week = day * 7;
+							var month = day * 30;
+							var year = month * 12;
+			
+							var time1 = new Date().getTime(); //当前的时间戳
+							console.log("当前时间", time1);
+			
+							// 对时间进行毫秒单位转换
+							var time2 = new Date(stringTime).getTime(); //指定时间的时间戳
+			
+							console.log("传过来的时间", time2);
+			
+							var time = time1 - time2;
+							console.log("计算后的时间", time);
+			
+							var result = null;
+							// if (time < 0) {
+							// 	// alert("传过来的时间的时间不能晚于当前时间!");
+							// 	result = stringTime;
+							// } else if (time / year >= 1) {
+							// 	result = parseInt(time / year) + "年前";
+							// } else if (time / month >= 1) {
+							// 	result = parseInt(time / month) + "月前";
+							// } else if (time / week >= 1) {
+							// 	result = parseInt(time / week) + "周前";
+							// } else if (time / day >= 1) {
+							// 	result = parseInt(time / day) + "天前";
+							// } else if (time / hour >= 1) {
+							// 	result = parseInt(time / hour) + "小时前";
+							// } else if (time / minute >= 1) {
+							// 	result = parseInt(time / minute) + "分钟前";
+							// } else {
+							// 	result = "刚刚";
+							// }
+							
+							if (time < 0) {
+								// alert("传过来的时间的时间不能晚于当前时间!");
+								result = -1;
+							} else if (time / day >= 0) {
+								result = parseInt(time / day);//多少天前
+							}
+							console.log("多少天前", result);
+							return result;
+						},
+			
 
-
-		},
+		},
+		
 
 		// 下拉刷新 
 		onPullDownRefresh() {
@@ -196,7 +262,11 @@
 		margin-top: 20rpx;
 		display: flex;
 		justify-content: flex-end;
+		font-size: 28rpx;
+		margin-left: -24rpx;
+		margin-right: -24rpx;
 	}
+	
 	.ping{
 		text-align: center;
 		color: #FF4F00;
@@ -205,6 +275,7 @@
 		line-height: 56rpx;
 		border-radius: 36rpx;
 		border: 2rpx solid #FF4F00;
+		margin-right: 24rpx;
 	}
 	.kan{
 		text-align: center;
@@ -214,6 +285,7 @@
 		line-height: 56rpx;
 		border-radius: 36rpx;
 		border: 2rpx solid #DDDDDD;
+		margin-right: 24rpx;
 	}
 	.noMore {
 		text-align: center;

+ 22 - 11
pages/user/myAppraise.vue

@@ -3,7 +3,7 @@
 
 		<!-- 列表 -->
 		<view class="itemContent">
-			<view v-for="(item,index) in itemData" :key="index" @click="goDetail(item)">
+			<view v-for="(item,index) in itemData" :key="index">
 				<view class="item">
 
 
@@ -36,17 +36,23 @@
 					<view class="contentMes">{{item.EContent}}</view>
 
 					<!-- 照片 -->
-					<view class="imgBg">
+					<view v-if="item.imgs.length > 0" class="imgBg">
 						<view v-for="(itemImg,indexImg) in item.imgs" :key="indexImg">
 
-							<image :src="itemImg.imageUrl" class="img"
+							<image :src="itemImg.imageUrl" class="img" :class="{'img4R':(indexImg+1)%4==0&&indexImg!=0}"
 								@click.stop="previewImage(itemImg.imageUrl,item.imgs)"></image>
 						</view>
 					</view>
 
 					<!-- 商家回复 -->
 
-					<view class="writeBack" v-if="item.ReplyContent">商家回复:{{item.ReplyContent}}</view>
+					<view  v-if="item.ReplyContent" class="writeBack">
+						<view class="title">
+							<view style="font-weight: bold;">商家回复</view>
+							<view>{{item.ReplyTime.slice(0,item.ReplyTime.length-8)}}</view>
+						</view>
+						<view>{{item.ReplyContent}}</view>
+					</view>
 
 
 					<view class="bottom">
@@ -109,11 +115,7 @@
 					url: 'historyDetail?id=' + item.SheetID
 				})
 			},
-			goDetail(item) {
-				uni.navigateTo({
-					url: 'myAppraiseDetail?sheetId=' + item.SheetID
-				})
-			},
+			
 			previewImage(img, arrDic) {
 				var arr = [];
 
@@ -199,7 +201,8 @@
 					} else {
 						this.noMoreShow = true
 					}
-
+					
+					
 
 				})
 			},
@@ -320,6 +323,10 @@
 		height: 150rpx;
 		margin-right: 20rpx;
 		border-radius: 8rpx;
+	}
+	.img4R {
+		
+		margin-right: 0;
 	}
 
 	.writeBack {
@@ -329,8 +336,12 @@
 		padding: 20rpx;
 		background-color: #F4F5F7;
 		margin-bottom: 20rpx;
-
 		border-radius: 10rpx;
+	}
+	.title{
+		display: flex;
+		justify-content: space-between;
+		margin-bottom: 10rpx;
 	}
 
 	.bottom {

+ 60 - 20
pages/user/myAppraiseDetail.vue

@@ -36,21 +36,26 @@
 					<view class="contentMes">{{item.EContent}}</view>
 
 					<!-- 照片 -->
-					<view class="imgBg">
+					<view v-if="item.imgs.length > 0" class="imgBg">
 						<view v-for="(itemImg,indexImg) in item.imgs" :key="indexImg">
 
-							<image :src="itemImg.imageUrl" class="img"
+							<image :src="itemImg.imageUrl" class="img" :class="{'img4R':(indexImg+1)%4==0&&indexImg!=0}"
 								@click.stop="previewImage(itemImg.imageUrl,item.imgs)"></image>
 						</view>
 					</view>
 
 					<!-- 商家回复 -->
 
-					<view class="writeBack" v-if="item.ReplyContent">商家回复:{{item.ReplyContent}}</view>
-
+					<view v-if="item.ReplyContent" class="writeBack">
+						<view class="title">
+							<view style="font-weight: bold;">商家回复</view>
+							<view>{{item.ReplyTime.slice(0,item.ReplyTime.length-8)}}</view>
+						</view>
+						<view>{{item.ReplyContent}}</view>
+					</view>
 
 					<view class="bottom">
-						
+
 
 						<view class="btnBox" @click.stop="deleteItem(item, index)">
 							<image src="../../static/img/icon_del.png" class="btnImg"></image>
@@ -90,12 +95,12 @@
 				page: 1,
 				noMoreShow: false,
 				imgArr: [],
-				userInfo: '',
-				sheetId:''
+				userInfo: '',
+				sheetId: ''
 			}
 		},
-		onLoad(opt) {
-			console.log('opt==',opt);
+		onLoad(opt) {
+			console.log('opt==', opt);
 			this.sheetId = opt.sheetId;
 			this.userInfo = uni.getStorageSync("userInfo");
 		},
@@ -105,7 +110,7 @@
 			this.getItemData()
 		},
 		methods: {
-			
+
 			previewImage(img, arrDic) {
 				var arr = [];
 
@@ -148,8 +153,21 @@
 							that.$http(url, params, 'POST').then(res => {
 								uni.hideLoading();
 
-								that.page = 1
-								that.getItemData()
+								uni.showToast({
+									title: '成功',
+									icon: 'none',
+									duration: 2000,
+								});
+								let pages = getCurrentPages(); // 当前页面
+								let beforePage = pages[pages.length - 2]; // 上一页
+								setTimeout(function() {
+									uni.navigateBack({
+									    success: function() {
+									        beforePage.onLoad(); // 执行上一页的onLoad方法
+									    }
+									});
+								}, 2000);
+								
 
 							})
 						}
@@ -165,7 +183,7 @@
 				let url = 'openMiniEvaluate/queryOpenEvaluateDetail',
 					params = {
 						sheetId: this.sheetId,
-						
+
 
 					}
 				this.$http(url, params, 'GET').then(res => {
@@ -179,21 +197,32 @@
 					// 	}
 					// })
 
-					
+
 					// if (this.page == 1) {
 					// 	this.itemData = list
-					// } else {
-						
-						this.itemData = [];
-						this.itemData = this.itemData.concat(list)
+					// } else {
+
+					this.itemData = [];
+					this.itemData = this.itemData.concat(list)
 					// }
 
 					// if (list.length < 10) {
 					// 	this.noMoreShow = false
 					// } else {
 					// 	this.noMoreShow = true
-					// }
-
+					// }
+					
+					if (res.data.length == 0) {
+						uni.showToast({
+							title: '评价已删除,无法查看!',
+							icon: 'none',
+							duration: 2000
+						});
+						
+						setTimeout(function() {
+							uni.navigateBack()
+						}, 1000);
+					}
 
 				})
 			},
@@ -316,6 +345,11 @@
 		border-radius: 8rpx;
 	}
 
+	.img4R {
+
+		margin-right: 0;
+	}
+
 	.writeBack {
 		font-size: 26rpx;
 		color: #666666;
@@ -327,6 +361,12 @@
 		border-radius: 10rpx;
 	}
 
+	.title {
+		display: flex;
+		justify-content: space-between;
+		margin-bottom: 10rpx;
+	}
+
 	.bottom {
 		padding-top: 27rpx;
 		padding-bottom: 7rpx;

+ 166 - 127
pages/user/user.vue

@@ -3,8 +3,10 @@
 
 		<view class="top" :style="{background:'#'+themeColor}">
 			<view class="customerMes">
-				<image @click="updateUserInfo" v-if="headImg" :src="headImg" mode="" style="width: 88rpx;height: 88rpx;border-radius: 44rpx;"></image>
-				<image @click="updateUserInfo" v-else src="../../static/img/icon_me.png" mode="" style="width: 88rpx;height: 88rpx;border-radius: 44rpx;"></image>
+				<image @click="updateUserInfo" v-if="headImg" :src="headImg" mode=""
+					style="width: 88rpx;height: 88rpx;border-radius: 44rpx;"></image>
+				<image @click="updateUserInfo" v-else src="../../static/img/icon_me.png" mode=""
+					style="width: 88rpx;height: 88rpx;border-radius: 44rpx;"></image>
 				<view class="mes">
 					<view class="nick">
 						<view class="nickName" v-if="nickName">{{nickName}}</view>
@@ -40,21 +42,27 @@
 			<view class="orderLIneBox">
 				<view class="orderLine" @click="goorder(1)">
 					<view class="orderImgBox">
-						<view class="orderNum" v-show="numList.waitPurchaseSize>0">{{numList.waitPurchaseSize>99?'99+':numList.waitPurchaseSize}}</view>
+						<view class="orderNum" v-show="numList.waitPurchaseSize>0">
+							{{numList.waitPurchaseSize>99?'99+':numList.waitPurchaseSize}}
+						</view>
 						<image src="../../static/img/icon_daifukuan.png" mode="" class="orderLineImg"></image>
 					</view>
 					<view class="orderLineTxt">待付款</view>
 				</view>
 				<view class="orderLine" @click="goorder(2)">
 					<view class="orderImgBox">
-						<view class="orderNum" v-show="numList.waitServiceSize>0">{{numList.waitServiceSize>99?'99+':numList.waitServiceSize}}</view>
+						<view class="orderNum" v-show="numList.waitServiceSize>0">
+							{{numList.waitServiceSize>99?'99+':numList.waitServiceSize}}
+						</view>
 						<image src="../../static/img/icon_daifuwu.png" mode="" class="orderLineImg"></image>
 					</view>
 					<view class="orderLineTxt">待服务</view>
 				</view>
 				<view class="orderLine" @click="goorder(3)">
 					<view class="orderImgBox">
-						<view class="orderNum" v-show="numList.hasOverSize>0">{{numList.hasOverSize>99?'99+':numList.hasOverSize}}</view>
+						<view class="orderNum" v-show="numList.hasOverSize>0">
+							{{numList.hasOverSize>99?'99+':numList.hasOverSize}}
+						</view>
 						<image src="../../static/img/icon_yiwancheng.png" mode="" class="orderLineImg"></image>
 					</view>
 					<view class="orderLineTxt">已完成</view>
@@ -62,7 +70,8 @@
 
 				<view class="orderLine" @click="goorder(0)">
 					<view class="orderImgBox">
-						<view class="orderNum" v-show="numList.allSize>0">{{numList.allSize>99?'99+':numList.allSize}}</view>
+						<view class="orderNum" v-show="numList.allSize>0">{{numList.allSize>99?'99+':numList.allSize}}
+						</view>
 						<image src="../../static/img/icon_allorder.png" mode="" class="orderLineImg"></image>
 					</view>
 					<view class="orderLineTxt">全部</view>
@@ -82,19 +91,22 @@
 					<image src="../../static/img/icon_phone.png" mode="" class="shopRightImg" @click="call"></image>
 				</view>
 
-			</view>
-			<view class="appraiseBox">
-				<view v-if="numList.isShowScore == 1" class="appraise">{{numList.shopInfo.miniV2ShopScore}}
-				<span style='font-size: 26rpx; margin-left: 3rpx;'>分</span>
-				</view>
-				<view @click="goShopAppraiseList()"  v-if="numList.isShowEvaluate == 1" class="appraiseCount">评价数 {{numList.evaluateCount}}
-				<image src="../../static/timg/icon_arrow_right.png" mode="" style="width: 7rpx; height: 15rpx; margin-left: 32rpx;"></image>
-				</view>
-			</view>
-			
-			
+			</view>
+			<view v-if="(numList.isShowScore == 1) || (numList.isShowEvaluate == 1)" class="appraiseBox">
+				<view v-if="numList.isShowScore == 1" class="appraise">{{numList.shopInfo.miniV2ShopScore}}
+					<span style='font-size: 26rpx; margin-left: 3rpx;'>分</span>
+				</view>
+				<view  v-if="numList.isShowScore == 1" class="line"></view>
+				<view @click="goShopAppraiseList()" v-if="numList.isShowEvaluate == 1" class="appraiseCount">评价数
+					{{numList.evaluateCount}}
+				</view>
+				<image v-if="numList.isShowEvaluate == 1" class="rightArrow" src="../../static/timg/icon_arrow_right.png" mode=""></image>
+			</view>
+
+
 			<view class="shopTime" v-if="numList.shopInfo.startTime && numList.shopInfo.endTime">
-				{{numList.shopInfo.startTime}}-{{numList.shopInfo.endTime}}</view>
+				{{numList.shopInfo.startTime}}-{{numList.shopInfo.endTime}}
+			</view>
 			<view class="address">
 				<view class="Address">
 					{{numList.shopInfo.provinceName?numList.shopInfo.provinceName:''}}
@@ -162,7 +174,7 @@
 				</view>
 				<image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
 			</view>
-			<button open-type="share" class="rowBox" >
+			<button open-type="share" class="rowBox">
 				<view class="leftView">
 					<image src="../../static/img/icon_me6.png" mode="" class="liftIcon"></image>
 					<view class="rowTitle">分享给好友</view>
@@ -177,20 +189,22 @@
 				</view>
 				<image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
 			</view>
-			<view class="rowBox" @click="gonavigateTo('../partner/partner')" v-if="numList.customerInfo.pState==1&&numList.shopSettings.partnerDisabled">
+			<view class="rowBox" @click="gonavigateTo('../partner/partner')"
+				v-if="numList.customerInfo.pState==1&&numList.shopSettings.partnerDisabled">
 				<view class="leftView">
 					<image src="../../static/img/icon_hehuoren.png" mode="" class="liftIcon"></image>
 					<view class="rowTitle">车主合伙人</view>
 				</view>
 				<image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
 			</view>
-			<view class="rowBox" @click="gonavigateTo('../referral/referral')" v-if="numList.customerInfo.rebateState==1&&numList.shopSettings.introductionDisabled">
+			<view class="rowBox" @click="gonavigateTo('../referral/referral')"
+				v-if="numList.customerInfo.rebateState==1&&numList.shopSettings.introductionDisabled">
 				<view class="leftView">
 					<image src="../../static/img/icon_kehuzhuanjieshao.png" mode="" class="liftIcon"></image>
 					<view class="rowTitle">客户转介绍</view>
 				</view>
 				<image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
-			</view> 
+			</view>
 
 			<!-- 先隐藏 -->
 			<!-- <view class="rowBox" @click="gonavigateTo('')">
@@ -202,7 +216,7 @@
 			</view> -->
 
 		</view>
-        <view class="releaseVersion">版本号:{{release_version}}</view>
+		<view class="releaseVersion">版本号:{{release_version}}</view>
 
 		<!-- <view class="signOut" @click="signOut">退出登录</view> -->
 		<!-- 手机号授权 -->
@@ -225,7 +239,7 @@
 	export default {
 		data() {
 			return {
-				
+
 				userInfo: '',
 				shopData: '',
 				numList: '',
@@ -238,43 +252,43 @@
 				authorizShow: false,
 				code: '',
 				wxOpenData: '',
-				nickName:'',
-				phone:'',
-				ext:'',
-				themeColor:'',
-                release_version:'',
+				nickName: '',
+				phone: '',
+				ext: '',
+				themeColor: '',
+				release_version: '',
 			}
 		},
 		onLoad(opt) {
-			
-            this.ext=this.$common.getExtStoreId();
-			 this.themeColor = uni.getStorageSync("themeColor");
-			if(this.themeColor){
-				if(this.themeColor=='6F2BE8'){
-					var backgroundImage='/static/tabimg/me6F2BE8.png'
+
+			this.ext = this.$common.getExtStoreId();
+			this.themeColor = uni.getStorageSync("themeColor");
+			if (this.themeColor) {
+				if (this.themeColor == '6F2BE8') {
+					var backgroundImage = '/static/tabimg/me6F2BE8.png'
 				}
-				if(this.themeColor=='1677FF'){
-					var backgroundImage='/static/tabimg/me1677FF.png'
+				if (this.themeColor == '1677FF') {
+					var backgroundImage = '/static/tabimg/me1677FF.png'
 				}
-				if(this.themeColor=='FF4F00'){
-					var backgroundImage='/static/tabimg/meFF4F00.png'
+				if (this.themeColor == 'FF4F00') {
+					var backgroundImage = '/static/tabimg/meFF4F00.png'
 				}
-				if(this.themeColor=='D53533'){
-					var backgroundImage='/static/tabimg/me1.png'
+				if (this.themeColor == 'D53533') {
+					var backgroundImage = '/static/tabimg/me1.png'
 				}
 				uni.setTabBarStyle({
-				  // color: '#FF0000',
-				  selectedColor: '#'+this.themeColor,
+					// color: '#FF0000',
+					selectedColor: '#' + this.themeColor,
 				})
 				uni.setTabBarItem({
-				  index: 3,
-				  text: '我的',
-				   selectedIconPath: backgroundImage
+					index: 3,
+					text: '我的',
+					selectedIconPath: backgroundImage
 				})
 			}
 			uni.setNavigationBarColor({
 				frontColor: "#ffffff",
-				backgroundColor:'#'+ this.themeColor
+				backgroundColor: '#' + this.themeColor
 			})
 			this.getVersionInfo()
 			// const accountInfo = wx.getAccountInfoSync();
@@ -283,10 +297,10 @@
 		},
 		onShow() {
 			const wxOpenData = this.$store.state.wxOpenData;
-			this.wxOpenData=wxOpenData
+			this.wxOpenData = wxOpenData
 			//console.log()
 			if (wxOpenData) {
-				
+
 				this.uid = wxOpenData.loginInfo.uid;
 			}
 			this.userInfo = this.$store.state.userInfo;
@@ -298,45 +312,45 @@
 
 
 		},
-		methods: {
-			goShopAppraiseList(){
-				uni.navigateTo({
-					url: 'ShopAppraiseList?shopID=' + this.numList.shopInfo.id
-				})
+		methods: {
+			goShopAppraiseList() {
+				uni.navigateTo({
+					url: 'ShopAppraiseList?shopID=' + this.numList.shopInfo.id
+				})
 			},
-			getVersionInfo(){
+			getVersionInfo() {
 				this.$http('miniApp2/sys/getVersionInfo', {
 					appId: this.ext.appId,
-					
+
 				}, 'POST').then(res => {
-					this.release_version=res.data.release_version
+					this.release_version = res.data.release_version
 				})
 			},
-			updateUserInfo(){
-				var that=this;
+			updateUserInfo() {
+				var that = this;
 				uni.getUserProfile({
-					lang:'zh_CN',
-					desc:'登录',
-					success:(res)=>{
+					lang: 'zh_CN',
+					desc: '登录',
+					success: (res) => {
 						console.log(res);
-						that.headImg=res.userInfo.avatarUrl;
-						that.nickName=res.userInfo.nickName;
+						that.headImg = res.userInfo.avatarUrl;
+						that.nickName = res.userInfo.nickName;
 						that.$http('miniApp2/sys/updateUserInfo', {
-							nickName:res.userInfo.nickName,
-							unionId:that.ext.unionId,
+							nickName: res.userInfo.nickName,
+							unionId: that.ext.unionId,
 							headImg: res.userInfo.avatarUrl,
 							openId: that.wxOpenData.openid
 						}, 'POST').then(res => {
-							
+
 						})
 					},
-					fail:(res)=>{
+					fail: (res) => {
 						console.log(res)
 					}
 				});
-				
-					
-					
+
+
+
 			},
 			decryptPhoneNumber: function(e) {
 				console.log(e);
@@ -347,8 +361,8 @@
 			wxPhoneLogin() {
 				var that = this;
 				this.$http('miniApp2/sys/wxPhoneLogin', {
-					appId:this.ext.appId,
-					unionId:this.ext.unionId,
+					appId: this.ext.appId,
+					unionId: this.ext.unionId,
 					code: this.code,
 					openId: this.wxOpenData.openid
 				}, 'POST').then(res => {
@@ -417,7 +431,7 @@
 				})
 			},
 			gonavigateTo(url) {
-			 //   if (this.userInfo) {
+				//   if (this.userInfo) {
 				// 	uni.navigateTo({
 				// 		url: url
 				// 	})
@@ -437,26 +451,26 @@
 			},
 
 		},
-       onShareAppMessage(res) {
-       
-       	return {
-       		title: this.wxOpenData.miniAppName,
-       		//imageUrl:img,
-       		path: 'pages/index/index',
-       		success(res){
-       			uni.showToast({
-       				title:'分享成功'
-       			})
-       		},
-       		fail(res){
-       			uni.showToast({
-       				title:'分享失败',
-       				icon:'none',
-       				duration: 3000
-       			})
-       		}
-       	}
-       },
+		onShareAppMessage(res) {
+
+			return {
+				title: this.wxOpenData.miniAppName,
+				//imageUrl:img,
+				path: 'pages/index/index',
+				success(res) {
+					uni.showToast({
+						title: '分享成功'
+					})
+				},
+				fail(res) {
+					uni.showToast({
+						title: '分享失败',
+						icon: 'none',
+						duration: 3000
+					})
+				}
+			}
+		},
 		// 下拉刷新
 		onPullDownRefresh() {
 
@@ -469,7 +483,7 @@
 </script>
 
 <style scoped>
-	.releaseVersion{
+	.releaseVersion {
 		font-size: 24rpx;
 		font-family: PingFangSC-Regular, PingFang SC;
 		font-weight: 400;
@@ -477,10 +491,12 @@
 		padding: 40rpx;
 		text-align: center;
 	}
-	button::after{
-	 	border: none;
+
+	button::after {
+		border: none;
 	}
-	button{
+
+	button {
 		position: relative;
 		display: block;
 		margin-left: 0;
@@ -498,10 +514,10 @@
 		overflow: hidden;
 		color: #000000;
 		background-color: #fff;
-		
+
 		height: 100%;
-		}
-	
+	}
+
 	.box {
 
 		width: 100vw;
@@ -552,8 +568,8 @@
 		border: 1rpx solid #FFFFFF;
 		border-radius: 4rpx;
 		height: 36rpx;
-	}
-	
+	}
+
 
 	.phone {
 		font-size: 24rpx;
@@ -638,7 +654,7 @@
 	}
 
 	.orderNum {
-		
+
 		height: 26rpx;
 		line-height: 26rpx;
 		background: #FF0000;
@@ -647,7 +663,7 @@
 		color: #FFFFFF;
 		font-size: 20rpx;
 		position: absolute;
-		
+
 		left: 90rpx;
 		z-index: 11;
 	}
@@ -664,7 +680,7 @@
 	.rowBoxBg {
 
 		margin: 20rpx 24rpx;
-		
+
 		background: #FFFFFF;
 
 		border-radius: 10rpx;
@@ -740,27 +756,50 @@
 		color: #3C3C3C;
 		line-height: 42rpx;
 	}
-	.appraiseBox{
-		padding: 5rpx 20rpx;
-		margin: 10rpx 0 0 -20rpx;
-		height: 62rpx;
-		background: rgba(255,0,0,0.08);
-		border-radius: 0 25rpx 70rpx 0;
-		width: 320rpx;
-		display: flex;
-		align-items: center;
-	}
-	.appraise{
-		color: #FF0000;
-		font-size: 38rpx;
-		font-weight: bold;
-	}
-	.appraiseCount{
-		margin-left: 40rpx;
-		font-size: 24rpx;
-		font-weight: 400;
-		color: #666666;
+
+	.appraiseBox {
+		padding: 5rpx 40rpx 5rpx 20rpx;
+		margin: 10rpx 0 0 -20rpx;
+		height: 62rpx;
+		background: rgba(255, 0, 0, 0.08);
+		border-radius: 0 25rpx 70rpx 0;
+		width: 300rpx;
+		display: flex;
+		align-items: center;
 	}
+
+	.appraise {
+		color: #FF0000;
+		font-size: 38rpx;
+		font-weight: bold;
+
+	}
+
+	.line {
+		
+		margin: 0 20rpx;
+		width: 1rpx;
+		height: 30rpx;
+		background: #E9E8E8;
+		
+	}
+
+	.appraiseCount {
+
+		font-size: 24rpx;
+		font-weight: 400;
+		color: #666666;
+		flex-grow: 1;
+
+	}
+
+	.rightArrow {
+
+		width: 7rpx;
+		height: 15rpx;
+		margin-left: 32rpx;
+	}
+
 	.shopRightBox {
 		display: flex;
 		justify-content: space-between;
@@ -859,4 +898,4 @@
 		margin-top: 62rpx;
 		margin-left: 71rpx;
 	}
-</style>
+</style>