Browse Source

Merge branch 'master' of http://git.jihengcc.cn/liubaiyan/qjd-user-uniapp

unknown 4 years ago
parent
commit
628543e717

+ 62 - 0
components/CnumberBox.vue

@@ -0,0 +1,62 @@
+<template>
+	<view class="main">
+		<uni-icons type="minus-filled" size="20" color="#A67A54" @click="numReduce"></uni-icons>
+		<!-- <text class="buy-select">{{number}}</text> -->
+		<u-input
+		  v-model="number"
+		  type="number"
+		  height="40"
+		  :placeholder="placeholder"
+		  :clearable="false"
+		  :disabled="isDisabled"
+		  input-align="center"
+		  :custom-style="{width:'45px'}"/>
+		<uni-icons type="plus-filled" size="20" color="#A67A54" @click="numPlus"></uni-icons>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			isDisabled: {
+				default: false
+			},
+			placeholder: {
+				default: ''
+			},
+			step: {
+				default: 1
+			},
+			minNum: {
+				default: 0.01
+			}
+		},
+		data() {
+			return {
+			    number: 1,
+			}
+		},
+		methods: {
+			numPlus() {
+			    this.number = Number(this.number) + Number(this.step)
+				this.$emit('getNum',this.number);
+			},
+			numReduce() {
+			    if ((Number(this.number) - Number(this.step)) >= Number(this.minNum)) {
+				    this.number = Number(this.number) - Number(this.step)
+			    }
+				this.$emit('getNum',this.number);
+			}
+		}
+	}
+</script>
+
+<style>
+</style>
+<style lang="less" scoped>
+	.main {
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+	}
+</style>

+ 143 - 41
pagesGood/goodDetails.vue

@@ -33,6 +33,23 @@
 			<!-- 			<text class="iconfont iconfangxiang"></text>
  -->
 		</view>
+		<view class="buy-num" v-if="goodData.productType != 2 && !minePlant">
+			<view class="buy-text">购买数量:</view>
+			<!-- <view style="display: flex;">
+				<uni-icons type="minus-filled" size="20" color="#A67A54" @click="number>1?number--:''"></uni-icons>
+				<text class="buy-select">{{number}}</text>
+				<u-input
+				  v-model="number"
+				  type="number"
+				  height="40"
+				  placeholder=" "
+				  :clearable="false"
+				  input-align="center"
+				  :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>
 		<view class="tab-box">
 			<view class="tab-col" :class="tabIndex == 1 ? 'tab-col-active' :''" @click="tabIndex = 1">产品介绍</view>
 			<view class="tab-col" :class="tabIndex == 2 ? 'tab-col-active' :''" v-if="goodData.productType != 2 && goodData.productType != 4 "
@@ -68,7 +85,7 @@
 		</view>
 		<uni-goods-nav :fill="true" :options="goodData.productType == 4 ? [] : options" @click="goToShop" @buttonClick="showPopup"
 		 style="width: 100%; position: fixed; bottom: 0px;" :buttonGroup="goodData.productType == 2 ? buttonGroup2 : (goodData.productType == 4 ? (minePlant ? buttonGroup4 : buttonGroup3) : buttonGroup1)" />
-		<uni-popup ref="popup" type="bottom">
+		<!-- <uni-popup ref="popup" type="bottom">
 			<view class="popup-box">
 				<view class="popup-good-info-box">
 					<image mode="aspectFill" class="popup-good-img" v-if="goodData.imgs.length" :src="goodData.imgs[0].imgPath"></image>
@@ -87,7 +104,7 @@
 				</view>
 				<uni-goods-nav :fill="true" :options="[]" :buttonGroup="buttonGroup1" @buttonClick="submitData" style="width: 100%; position: absolute; bottom: 0px;left:0px" />
 			</view>
-		</uni-popup>
+		</uni-popup> -->
 		<u-top-tips ref="uTips"></u-top-tips>
 	</view>
 </template>
@@ -95,7 +112,11 @@
 <script>
 	const NET = require('@/utils/request')
 	const API = require('@/config/api')
+	import CnumberBox from '@/components/CnumberBox.vue'
 	export default {
+		components: {
+			CnumberBox
+		},
 		data() {
 			return {
 				//  从我的种植进入minePlant为true
@@ -118,6 +139,7 @@
 					areaSize: '',
 					imgs: [],
 				},
+				orderId: '',
 				currentPrice: '',
 				assessList: [],
 				goodsList: [],
@@ -126,6 +148,12 @@
 				options: [{
 					icon: 'shop',
 					text: '店铺',
+				},{
+					icon: 'cart',
+					text: '购物车',
+					info: 0,
+					infoBackgroundColor: '#52A63A',
+					infoColor:""
 				}],
 				buttonGroup1: [{
 						text: '加入购物车',
@@ -162,6 +190,7 @@
 		onLoad(options) {
 			this.goodId = options.goodId ? options.goodId : ''
 			this.minePlant = options.minePlant ? options.minePlant : false
+			this.orderId = options.orderId ? options.orderId : ''
 			uni.getSystemInfo({
 				success: (res) => {
 					this.swiperHeight = res.windowWidth
@@ -203,6 +232,10 @@
 			}
 		},
 		methods: {
+			// 获取子组件的购买数量
+			getNum(num) {
+				this.number = num
+			},
 			//  获取拍卖详情
 			getAuctionData() {
 				NET.request(API.getAuctionDetail + this.goodId, {}, 'GET').then(res => {
@@ -215,10 +248,16 @@
 				})
 			},
 			//  跳转商铺页
-			goToShop() {
-				uni.navigateTo({
-					url: '/pagesGood/shopDetails?goodId=' + this.goodId
-				});
+			goToShop(e) {
+				if (e.index == 0) {
+					uni.navigateTo({
+						url: '/pagesGood/shopDetails?goodId=' + this.goodId
+					});
+				} else {
+					uni.switchTab({
+						url: '/pages/cart/cart'
+					});
+				}
 			},
 			//  跳转评价页
 			goToEvaluate() {
@@ -243,33 +282,72 @@
 					url: '/pagesGood/goodDetails?goodId=' + item.productId + '&goodType=' + item.productType
 				});
 			},
-			//  弹出购物弹窗
+			//  弹出购物弹窗->需求变更,不需要购物车弹窗,直接加入购物车
 			showPopup(e) {
 				uni.removeStorageSync('defaultAddress');
 				this.setGoodStorage()
 				if (this.goodData.productType == 2) {
+					//拍卖商品
 					uni.navigateTo({
 						url: '/pagesGood/auctionDetail?goodId=' + this.goodId
 					});
 				} else if (this.goodData.productType == 4) {
+					//共享种植商品
 					if (this.minePlant) {
+						// 如果是已买到的共享种植
 						if (e.index == 0) {
+							// 去视察
 							uni.navigateTo({
 								url: '/pagesGood/plantVideo?productId=' + this.goodId
 							});
 						} else {
+							// 去委托种植
 							uni.navigateTo({
 								url: '/pagesMain/entrustList?productId=' + this.goodData.productId + '&tenantCode=' + this.goodData.tenantCode +
-									'&productName=' + this.goodData.productName + '&areaSize=' + this.goodData.areaSize
+									'&productName=' + this.goodData.productName + '&areaSize=' + this.orderId + '&orderId=' + this.orderId
 							});
 						}
 					} else {
+						// if (e.index == 0) {
+						// 	this.$refs.popup.open()
+						// } else if (e.index == 1) {
+							uni.navigateTo({
+								url: '/pagesGood/orderPay?flag=2&orderType=3&paySum=' + this.goodData.bizPrice
+							});
+						// }
+					}
+				} else {
+					// 需求变更,不需要购物车弹窗,直接加入购物车
+					// this.$refs.popup.open()
+					if (e.index == 0) {
+						NET.request(API.addCart, {
+							productId: this.goodId,
+							productName: this.goodData.productName,
+							imgUrl: this.goodData.imgs.length ? this.goodData.imgs[0].imgPath : '',
+							bizPrice: this.goodData.bizPrice,
+							originalPrice: this.goodData.originalPrice,
+							productType: this.goodData.productType,
+							tenantCode: this.goodData.tenantCode,
+							buyNum: this.number
+						}, 'POST').then(res => {
+							this.$refs.uTips.show({
+								title: '加入购物车成功',
+								type: 'success',
+							})
+							this.$refs.popup.close()
+						}).catch(error => {
+							this.$refs.uTips.show({
+								title: '加入购物车失败',
+								type: 'warning',
+							})
+						})
+					} else {
+						//  立即购买
+						this.setGoodStorage()
 						uni.navigateTo({
-							url: '/pagesGood/orderPay?flag=2&orderType=3&paySum=' + this.goodData.bizPrice
+							url: '/pagesGood/orderPay?flag=2&orderType=1'
 						});
 					}
-				} else {
-					this.$refs.popup.open()
 				}
 			},
 			//  存入商品信息缓存
@@ -296,36 +374,36 @@
 			},
 			//  提交操作
 			submitData(e) {
-				if (e.index) {
-					//  立即购买
-					this.setGoodStorage()
-					uni.navigateTo({
-						url: '/pagesGood/orderPay?flag=2&orderType=1'
-					});
-				} else {
-					//  加入购物车
-					NET.request(API.addCart, {
-						productId: this.goodId,
-						productName: this.goodData.productName,
-						imgUrl: this.goodData.imgs.length ? this.goodData.imgs[0].imgPath : '',
-						bizPrice: this.goodData.bizPrice,
-						originalPrice: this.goodData.originalPrice,
-						productType: this.goodData.productType,
-						tenantCode: this.goodData.tenantCode,
-						buyNum: this.number
-					}, 'POST').then(res => {
-						this.$refs.uTips.show({
-							title: '加入购物车成功',
-							type: 'success',
-						})
-						this.$refs.popup.close()
-					}).catch(error => {
-						this.$refs.uTips.show({
-							title: '加入购物车失败',
-							type: 'warning',
-						})
-					})
-				}
+				// if (e.index) {
+				// 	//  立即购买
+				// 	this.setGoodStorage()
+				// 	uni.navigateTo({
+				// 		url: '/pagesGood/orderPay?flag=2&orderType=1'
+				// 	});
+				// } else {
+				// 	//  加入购物车
+				// 	NET.request(API.addCart, {
+				// 		productId: this.goodId,
+				// 		productName: this.goodData.productName,
+				// 		imgUrl: this.goodData.imgs.length ? this.goodData.imgs[0].imgPath : '',
+				// 		bizPrice: this.goodData.bizPrice,
+				// 		originalPrice: this.goodData.originalPrice,
+				// 		productType: this.goodData.productType,
+				// 		tenantCode: this.goodData.tenantCode,
+				// 		buyNum: this.number
+				// 	}, 'POST').then(res => {
+				// 		this.$refs.uTips.show({
+				// 			title: '加入购物车成功',
+				// 			type: 'success',
+				// 		})
+				// 		this.$refs.popup.close()
+				// 	}).catch(error => {
+				// 		this.$refs.uTips.show({
+				// 			title: '加入购物车失败',
+				// 			type: 'warning',
+				// 		})
+				// 	})
+				// }
 			},
 		},
 	}
@@ -485,6 +563,30 @@
 				color: #999999;
 			}
 		}
+		
+		.buy-num {
+			display: flex;
+			justify-content: flex-end;
+			height: 46px;
+			margin-top: 10px;
+			box-sizing: border-box;
+			background-color: #FFFFFF;
+			padding: 14px 16px;
+			font-family: PingFang SC;
+			// font-size: 12px;
+			// line-height: 14px;
+			.buy-text {
+				margin-right: 10px;
+			}			
+			.buy-select {
+				font-size: 16px;
+				font-family: PingFang SC;
+				color: #343434;
+				margin: 0 12px;
+				line-height: 20px;
+				margin-right: 10px;
+			}
+		}
 
 		.tab-box {
 			height: 50px;

+ 38 - 3
pagesGood/goodList.vue

@@ -1,16 +1,27 @@
 <template>
 	<view class="container">
+		<view v-if="goodType == 2" class="auction-main">
+			<view class="auction-title" @click="isOpen = !isOpen">拍卖说明
+			    <u-icon :name="isOpen?'arrow-up-fill':'arrow-down-fill'" color="#ffffff" style="margin-left:5px"></u-icon>
+			</view>
+			<view v-if="isOpen" class="auction-explain">
+				<p>1、竞买人必须具备本公司发布的公告或有关规定中注明的竞买条件,否则不得参加竞买。</p>
+				<p>2、竞买人必须具备本公司发布的公告或有关规定中注明的竞买条件,否则不得参加竞买。</p>
+				<p>3、竞买人必须具备本公司发布的公告或有关规定中注明的竞买条件,否则不得参加竞买。</p>
+			</view>
+		</view>
 		<view class="search-box" v-if="goodsList.length">
 			<uni-search-bar ref="searchBar" radius="5" placeholder="搜索" :defaultText="goodName" clearButton="auto" cancelButton="none"
 			 bgColor="#ffffff" @confirm="search" class="search-bar" />
 		</view>
 		<scroll-view class="goods-box" scroll-y="true" @scrolltolower="handleLoadMore()">
-			<view class="goods-row" v-for="(item, index) in goodsList" :key="index" @click="goToGoodDetails(item)">
+			<view class="goods-row" :style="{height: (item.productType == 2 ? '124px' : '104px')}" v-for="(item, index) in goodsList" :key="index" @click="goToGoodDetails(item)">
 				<image class="goods-img" :src="item.imgPath" mode="aspectFill"></image>
 				<view class="goods-info">
 					<view class="goods-name">{{item.productName}}</view>
 					<view class="goods-details" v-if="item.productType != 4">{{item.productDescribe}}</view>
 					<view class="goods-area" v-if="item.productType == 4">面积:{{item.areaSize}}㎡&nbsp;&nbsp;&nbsp;&nbsp;时长:{{item.term}}天</view>
+					<view class="goods-endTime" v-if="item.productType == 2">结束时间: {{item.auctionEndTime}}</view>
 					<view class="goods-number">
 						<text class="goods-icon">¥</text>
 						<text class="goods-spec">{{item.bizPrice}}{{item.productType != 4 ? '/' + item.unit : ''}}</text>
@@ -50,6 +61,7 @@
 				goodsList: [],
 				modalShow: false,
 				goodItem: {},
+				isOpen: false
 			}
 		},
 		onLoad(options) {
@@ -188,6 +200,26 @@
 		width: 100%;
 		height: 100%;
 		background-color: #f7f7f7;
+        .auction-main {
+			 // background: #52A63A;
+		 }
+		.auction-title {
+			height: 35px;
+			background:#52A63A;
+			color: #FFFFFF;
+			text-align: center;
+			padding: 5px;
+		}
+		.auction-explain {
+			background:#52A63A;
+			color: #FFFFFF;
+			border-radius: 0 0 8px 8px;
+			text-align: center;
+			padding: 10px;
+			p {
+			  margin-bottom: 5px;
+			}
+		}
 
 		.search-box {
 			width: 100%;
@@ -256,7 +288,7 @@
 						-webkit-line-clamp: 2;
 						-webkit-box-orient: vertical;
 						word-wrap: break-word;
-						margin: 4px 0 12px 0;
+						margin: 4px 0 10px 0;
 					}
 
 					.goods-area {
@@ -267,7 +299,10 @@
 						font-family: PingFang SC;
 						color: #666666;
 					}
-
+                    .goods-endTime {
+						margin-bottom: 10px;
+						font-size: 12px;
+					}
 					.goods-number {
 						height: 16px;
 						font-family: PingFang SC;

+ 12 - 10
pagesGood/orderPay.vue

@@ -32,7 +32,7 @@
 						<view class="plant-area" v-if="orderType == 3">面积:{{orderData.areaSize}}㎡</view>
 						<view class="goods-price-number">
 							<text class="goods-unit">¥</text>
-							<text class="goods-price">{{orderType == 1 ? item.bizPrice : paySum}}</text>
+							<text class="goods-price">{{(orderType == 1 || orderType == 3) ? item.bizPrice : paySum}}</text>
 							<text class="goods-number">x{{item.buyNum}}</text>
 							<text class="plant-text" v-if="orderType == 3">有效期:{{orderData.term}}天</text>
 						</view>
@@ -42,7 +42,7 @@
 			<view class="order-info">
 				<u-cell-group :border="false">
 					<u-cell-item title="商品金额" :arrow="false" :border-bottom="false" title-width="170" :title-style="{textAlign: 'right'}">
-						<text class="order-text-right">¥{{orderType == 1 ? getAllGoodsInitialPrice() : paySum}}</text>
+						<text class="order-text-right">¥{{(orderType == 1 || orderType == 3) ? getAllGoodsInitialPrice() : paySum}}</text>
 					</u-cell-item>
 					<u-cell-item title="积分抵扣" :arrow="false" :border-bottom="false" title-width="170" :title-style="{textAlign: 'right'}"
 					 v-if="orderType == 1">
@@ -65,14 +65,14 @@
 			<view class="pay-info">
 				<text class="pay-text">共{{getAllGoodsNumber()}}件</text>
 				<text class="pay-text">总计</text>
-				<text class="pay-price">¥{{orderType == 1 ? getAllGoodsPrice() : paySum}}</text>
+				<text class="pay-price">¥{{(orderType == 1 || orderType == 3) ? getAllGoodsPrice() : paySum}}</text>
 			</view>
 		</view>
 		<view class="handle-box">
 			<view class="handle-info">
 				<text class="handle-text" style="margin-right: 12px;">共{{getAllGoodsNumber()}}件</text>
 				<text class="handle-text">合计:</text>
-				<text class="handle-price">¥{{orderType == 1 ? getAllGoodsPrice() : paySum}}</text>
+				<text class="handle-price">¥{{(orderType == 1 || orderType == 3) ? getAllGoodsPrice() : paySum}}</text>
 			</view>
 			<view class="handle-button" @click="submitOrder()">提交订单</view>
 		</view>
@@ -253,7 +253,7 @@
 						type: 'warning',
 					})
 				} else {
-					let paySum = this.orderType == 1 ? this.getAllGoodsPrice() : this.paySum
+					let paySum = (this.orderType == 1 || this.orderType == 3) ? this.getAllGoodsPrice() : this.paySum
 					NET.request(API.submitOrder, {
 						//  会员
 						mid: this.userData.userId,
@@ -275,22 +275,24 @@
 								...site,
 								supplierName: this.orderData.supplierName,
 								tenantCode: this.orderData.tenantCode,
-								bizPrice: this.orderType == 1 ? site.bizPrice : this.paySum,
+								bizPrice: (this.orderType == 1 || this.orderType == 3) ? site.bizPrice : this.paySum,
 							}
 						}),
 						//  优惠券
 						couponId: this.orderType == 1 ? this.coupon.couponId : '',
+						// 优惠券优惠总额
 						couponDiscountAmount: this.orderType == 1 ? this.coupon.discountAmount : '',
 						couponType: this.orderType == 1 ? this.coupon.couponType : '',
 						//  积分
 						integralValue: this.orderType == 1 ? this.getIntegral() : 0,
+						// 积分优惠总额
 						integralAmount: this.orderType == 1 ? this.getIntegral() / 100 : 0,
-						//  金额
-						discountAmount: this.orderType == 1 ? (parseFloat(this.coupon.discountAmount) + (this.getIntegral() / 100)) : 0,
-						orderSum: this.orderType == 1 ? this.orderData.goodsList.reduce((total, site) => {
+						//  总优惠金额
+						discountAmount: this.orderType == 1 ? (parseFloat(this.coupon.discountAmount) + (this.getIntegral() / 100)) : 0,               // 订单总金额(优惠前)
+						orderSum: (this.orderType == 1 || this.orderType == 3) ? this.orderData.goodsList.reduce((total, site) => {
 							return total + site.bizPrice * site.buyNum
 						}, 0) : this.paySum,
-						paySum: this.orderType == 1 ? this.getAllGoodsPrice() : this.paySum,
+						paySum: (this.orderType == 1 || this.orderType == 3) ? this.getAllGoodsPrice() : this.paySum,
 						//  支付类型
 						flag: this.flag,
 						orderType: this.orderType,

+ 13 - 2
pagesMain/entrustForm.vue

@@ -6,7 +6,8 @@
 					<!-- <u-number-box digit :positive-integer="false" :min="0" v-model="entrustForm.payAomount" bg-color="#51A539" color="#ffffff"></u-number-box> -->
 				</u-cell-item>
 				<u-cell-item title="委托时长(小时)" title-width="190" :arrow="false">
-					<u-number-box digit :min="1" v-model="entrustForm.entrustDurationTime" bg-color="#51A539" color="#ffffff"></u-number-box>
+					<!-- <u-number-box digit :min="1" v-model="entrustForm.entrustDurationTime" bg-color="#51A539" color="#ffffff"></u-number-box> -->
+					<CnumberBox @getNum="getNum" minNum="1"></CnumberBox>
 				</u-cell-item>
 				<u-cell-item title="委托开始时间" title-width="180" @click="dateShow = true">
 					<text class="">{{entrustForm.entrustStartTime}}</text>
@@ -25,7 +26,11 @@
 <script>
 	const NET = require('@/utils/request')
 	const API = require('@/config/api')
+	import CnumberBox from '@/components/CnumberBox.vue'
 	export default {
+		components: {
+			CnumberBox
+		},
 		data() {
 			return {
 				price: 0,
@@ -61,8 +66,13 @@
 			this.entrustForm.tenantCode = options.tenantCode
 			this.entrustForm.areaSize = options.areaSize
 			this.getPrice()
+			this.orderId = options.orderId
 		},
 		methods: {
+			// 获取子组件的购买数量
+			getNum(num) {
+				this.entrustForm.entrustDurationTime = num
+			},
 			//  设置时间
 			setDate(data) {
 				this.entrustForm.entrustStartTime = data.year + '-' + data.month + '-' + data.day + ' ' + data.hour + ':' + data.minute +
@@ -106,7 +116,8 @@
 					//  数据
 					...this.entrustForm,
 					entrustDurationTime: JSON.stringify(this.entrustForm.entrustDurationTime),
-					payAomount: this.price * Number(this.entrustForm.entrustDurationTime)
+					payAomount: this.price * Number(this.entrustForm.entrustDurationTime),
+					orderId: Number(this.orderId)
 				}, 'POST').then(res => {
 					if (res.isSuccess) {
 						if (res.data) {

+ 3 - 1
pagesMain/entrustList.vue

@@ -35,6 +35,7 @@
 				isOver: false,
 				entrustList: [],
 				entrustTotle: 0,
+				orderId: ''
 			}
 		},
 		onLoad(options) {
@@ -44,6 +45,7 @@
 				tenantCode: options.tenantCode,
 				areaSize: options.areaSize,
 			}
+			this.orderId = options.orderId
 		},
 		onShow() {
 			this.pageIndex = 1
@@ -97,7 +99,7 @@
 			goToAdd() {
 				uni.navigateTo({
 					url: '/pagesMain/entrustForm?productId=' + this.productData.productId + '&tenantCode=' + this.productData.tenantCode +
-						'&productName=' + this.productData.productName + '&areaSize=' + this.productData.areaSize
+						'&productName=' + this.productData.productName + '&areaSize=' + this.productData.areaSize + '&orderId=' + this.orderId
 				});
 			},
 		},

+ 27 - 6
pagesMain/orderDetail.vue

@@ -271,11 +271,26 @@
 						}]
 						break;
 					case '4':
-						this.buttonGroup = [{
-							text: '申请售后',
-							backgroundColor: '#75BD60',
-							color: '#fff'
-						}]
+						if (this.orderData.merchantInfoResVO.products.every(v => {
+								Number(v.productType)
+								return v.productType == 4
+							})) {
+								this.buttonGroup = [{
+									text: '申请售后',
+									backgroundColor: '#75BD60',
+									color: '#fff'
+								}, {
+									text: '我的种植',
+									backgroundColor: '#52A63A',
+									color: '#fff'
+								}]
+						} else {
+							this.buttonGroup = [{
+								text: '申请售后',
+								backgroundColor: '#75BD60',
+								color: '#fff'
+							}]
+						}
 						break;
 					default:
 						this.buttonGroup = [{
@@ -438,7 +453,6 @@
 							  }
 							})
 							//  自助采摘
-							
 						} else if (this.orderData.orderStatus == 3) {
 							if (e.index == 1) {
 								//  确认收货
@@ -451,6 +465,13 @@
 									url: '/pagesMain/logisticsDeatil?logisticCode=' + this.orderData.logisticsNum
 								});
 							}
+						} else if (this.orderData.orderStatus == 4) {
+							if (e.index == 1) {
+								//  去我的种植
+								uni.navigateTo({
+									url: '/pagesGood/goodDetails?minePlant=true&goodId=' + this.orderData.merchantInfoResVO.products[0].productId + '&orderId=' + this.orderData.orderId
+								});
+							} 
 						} else {
 							//  评价
 							uni.navigateTo({

+ 13 - 0
pagesMain/orderItem.vue

@@ -33,10 +33,16 @@
 			 v-if="tabIndex != 1 && tabIndex != 2" @click.stop="handleOrder(3)">申请售后</u-button> -->
 			<u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
 			 v-if="tabIndex == 3 && pickHandle" @click.stop="handleOrder(4)">自助采摘</u-button>
+			 <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
+			  v-if="tabIndex == 3 && sharePlant" @click.stop="handleOrder(8)">我的种植</u-button>
+			  <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
+			   v-if="tabIndex == 4 && sharePlant" @click.stop="handleOrder(8)">我的种植</u-button>
 			<u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
 			 v-if="tabIndex == 4" @click.stop="handleOrder(5)">确认收货</u-button>
 			<u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
 			 v-if="tabIndex == 4" @click.stop="handleOrder(6)">追踪物流</u-button>
+			 <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
+			  v-if="tabIndex == 5 && sharePlant" @click.stop="handleOrder(8)">我的种植</u-button>
 			<u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
 			 v-if="tabIndex == 5 && orderData.evaluateStatus == 1" @click.stop="handleOrder(7)">评价</u-button>
 		</view>
@@ -100,6 +106,7 @@
 			return {
 				show_qx:true,
 				pickHandle: false,
+				sharePlant: false,
 				modalShow: false,
 				modalContent: '',
 				handleType: '',
@@ -107,6 +114,7 @@
 		},
 		onReady() {
 			this.pickHandle = this.orderData.products.filter(site => site.productType == 3).length > 0
+			this.sharePlant = this.orderData.products.filter(site => site.productType == 4).length > 0
 		},
 		methods: {
 			closeSetting:function(){
@@ -215,6 +223,11 @@
 								return site.productId
 							}).join(',')
 					});
+				} else if (type == 8) {
+					//  去我的种植
+					uni.navigateTo({
+						url: '/pagesGood/goodDetails?minePlant=true&goodId=' + this.orderData.products[0].productId + '&orderId=' + this.orderData.orderId
+					});
 				}
 			},
 			//  跳转订单详情

+ 1 - 1
pagesMain/plantList.vue

@@ -84,7 +84,7 @@
 			//  跳转详情
 			goToGoodDetail(item) {
 				uni.navigateTo({
-					url: '/pagesGood/goodDetails?minePlant=true&goodId=' + item.id
+					url: '/pagesGood/goodDetails?minePlant=true&goodId=' + item.id + '&orderId=' + item.orderId
 				});
 			},
 		},