zhaoxw 4 år sedan
förälder
incheckning
b27ea7b4e9

+ 11 - 1
pagesGood/evaluateList.vue

@@ -14,7 +14,7 @@
 					</view>
 					<view class="assess-text">{{item.evaluateContent}}</view>
 					<view class="assess-img-box">
-						<image class="img-col" v-for="(site, index2) in item.evaluateImgs" :key="index2" :src="site.imgUrl"></image>
+						<image class="img-col" v-for="(site, index2) in item.evaluateImgs" :key="index2" :src="site.imgUrl" @tap="_previewImage(site.imgUrl,i)"></image>
 					</view>
 				</view>
 				<view class="shop-reply-box" v-if="item.replyContent">
@@ -76,6 +76,16 @@
 					})
 				})
 			},
+			// 图片预览
+			_previewImage(image,index) {
+				var imgArr = [];
+				imgArr.push(image);
+				//预览图片
+				uni.previewImage({
+					urls: imgArr,
+					current: imgArr[index]
+				});
+			}
 		}
 	}
 </script>

+ 18 - 4
pagesGood/goodDetails.vue

@@ -48,7 +48,9 @@
 				  :custom-style="{width:'40px'}"/>
 				<uni-icons type="plus-filled" size="20" color="#A67A54" @click="number++"></uni-icons>
 			</view> -->
-			<CnumberBox @getNum="getNum" :isDisabled="true" minNum="1"></CnumberBox>
+			<view>
+				<CnumberBox @getNum="getNum" :isDisabled="true" minNum="1"></CnumberBox>
+			</view>
 		</view>
 		<view class="tab-box">
 			<view class="tab-col" :class="tabIndex == 1 ? 'tab-col-active' :''" @click="tabIndex = 1">产品介绍</view>
@@ -67,7 +69,7 @@
 					</view>
 					<view class="assess-text">{{item.evaluateContent}}</view>
 					<view class="assess-img-box">
-						<image class="img-col" v-for="site in item.evaluateImgs" :key="site" :src="site.imgUrl"></image>
+						<image class="img-col" v-for="site in item.evaluateImgs" :key="site" :src="site.imgUrl" @tap="_previewImage(site.imgUrl,i)"></image>
 					</view>
 				</view>
 			</view>
@@ -266,6 +268,16 @@
 					});
 				}
 			},
+			// 图片预览
+			_previewImage(image,index) {
+				var imgArr = [];
+				imgArr.push(image);
+				//预览图片
+				uni.previewImage({
+					urls: imgArr,
+					current: imgArr[index]
+				});
+			},
 			//  跳转评价页
 			goToEvaluate() {
 				uni.navigateTo({
@@ -548,6 +560,8 @@
 		}
 
 		.good-data {
+			display: flex;
+			justify-content: space-between;
 			height: 46px;
 			margin-top: 10px;
 			box-sizing: border-box;
@@ -575,7 +589,7 @@
 		
 		.buy-num {
 			display: flex;
-			justify-content: flex-end;
+			justify-content: space-between;
 			height: 46px;
 			margin-top: 10px;
 			box-sizing: border-box;
@@ -586,7 +600,7 @@
 			// line-height: 14px;
 			.buy-text {
 				margin-right: 10px;
-			}			
+			}
 			.buy-select {
 				font-size: 16px;
 				font-family: PingFang SC;

+ 5 - 1
pagesGood/goodList.vue

@@ -97,7 +97,7 @@
 			uni.setNavigationBarTitle({
 				title: this.goodType == 1 ? '商品列表' : (this.goodType == 3 ? '自助采摘' : (this.goodType == 4 ? '共享种植' : this.goodType == 5 ? '今日特惠' :  '拍卖'))
 			});
-			this.getGoodsList()
+			// this.getGoodsList()
 		},
 		onShow() {
 			this.getGoodsList()
@@ -137,6 +137,8 @@
 					}, 'GET').then(res => {
 						if (type == 'refresh') {
 							uni.stopPullDownRefresh();
+						} else {
+							this.goodsList = []
 						}
 						this.isOver = res.data.list.length != 10
 						this.goodsList = this.goodsList.concat(res.data.list)
@@ -155,6 +157,8 @@
 					}, 'POST').then(res => {
 						if (type == 'refresh') {
 							uni.stopPullDownRefresh();
+						} else {
+							this.goodsList = []
 						}
 						this.isOver = res.data.list.length != 10
 						this.goodsList = this.goodsList.concat(res.data.list)

+ 5 - 2
pagesGood/orderPay.vue

@@ -308,7 +308,7 @@
 								    	type: 'success',
 								    })
 								    setTimeout(() => {
-								    	uni.redirectTo({
+								    	uni.navigateTo({
 								    	    url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 1
 								    	});
 								    }, 1000)
@@ -334,7 +334,10 @@
 											type: 'warning',
 										})
 										setTimeout(() => {
-											uni.redirectTo({
+											// uni.redirectTo({
+											//     url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 1
+											// });
+											uni.navigateTo({
 											    url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 1
 											});
 										}, 1000)

+ 4 - 1
pagesMain/evaluateForm.vue

@@ -82,7 +82,10 @@
 						type: 'success',
 					})
 					setTimeout(()=>{
-						uni.reLaunch({
+						// uni.reLaunch({
+						// 	url: '/pagesMain/orderList?type=5'
+						// });
+						uni.navigateTo({
 							url: '/pagesMain/orderList?type=5'
 						});
 					},1000)

+ 1 - 1
pagesMain/logisticsDeatil.vue

@@ -4,7 +4,7 @@
 			<view class="express-text">物流公司:{{expressData.company}}</view>
 			<view class="express-text">物流单号:{{expressData.logisticCode}}</view>
 		</view>
-		<view class="express-list">
+		<view class="express-list" v-if="expressList.length">
 			<u-steps :list="expressList" :current="0" active-color="#008AFF" direction="column"></u-steps>
 			<!-- <uni-steps :options="expressList" active-color="#008AFF" direction="column" :active="0"></uni-steps> -->
 		</view>

+ 6 - 0
pagesMain/orderDetail.vue

@@ -1264,4 +1264,10 @@
 		left: 0px;
 		z-index: 1000;
 	}
+	/deep/.uni-tab__cart-button-right{
+		border-right: 1px solid #ffffff;
+	}
+	/deep/.uni-tab__cart-button-right:last-child{
+		border-right: none;
+	}
 </style>

+ 5 - 2
pagesMain/paySuccess.vue

@@ -19,12 +19,13 @@
 	export default {
 		data() {
 			return {
-			    orderId: ''
+			    orderId: '',
+				timeoutID:0
 			}
 		},
 		onLoad(options) {
 			this.orderId = options.orderId
-			setTimeout(() => {
+			this.timeoutID = setTimeout(() => {
 				uni.redirectTo({
 					url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 2
 				});
@@ -36,12 +37,14 @@
 				// uni.navigateTo({
 				// 	url: '/pagesMain/orderList?type=1'
 				// });
+				clearTimeout(this.timeoutID)
 				uni.navigateTo({
 					 url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 2
 				});
 			},
 			//  返回首页
 			goToIndex() {
+				clearTimeout(this.timeoutID)
 				uni.switchTab({
 					url: '/pages/index/index'
 				});