zhaoxw 4 years ago
parent
commit
cf23a125b8

+ 5 - 5
pagesGood/auctionDetail.vue

@@ -98,8 +98,8 @@
 					this.auctionBaseList[1].payTime = '竞拍截止时间:' + res.data.auctionEndTime
 					this.auctionBaseList[2].payTime = '竞拍于 '+res.data.auctionStartTime +' 正式开始!'
 					this.auctionList = res.data.userPriceResVOs.concat(this.auctionBaseList)
-					if (this.price <= this.goodData.currentPrice + this.goodData.auctionMinAddPrice) {
-						this.price = (this.goodData.currentPrice + this.goodData.auctionMinAddPrice).toFixed(2)
+					if (this.price <= parseFloat(this.goodData.currentPrice + this.goodData.auctionMinAddPrice)) {
+						this.price = parseFloat(this.goodData.currentPrice + this.goodData.auctionMinAddPrice).toFixed(2)
 					}
 				}).catch(error => {
 					this.$refs.uTips.show({
@@ -112,13 +112,13 @@
 			reducePrice() {
 				if (this.price > this.goodData.currentPrice + this.goodData.auctionMinAddPrice) {
 					this.price -= this.goodData.auctionMinAddPrice
-					this.price = parseFloat(this.price.toFixed(2))
+					this.price = parseFloat(this.price).toFixed(2)
 				}
 			},
 			//  加价
 			addPrice() {
-				this.price += this.goodData.auctionMinAddPrice
-				this.price = parseFloat(this.price.toFixed(2))
+				this.price = (parseFloat(this.price) + parseFloat(this.goodData.auctionMinAddPrice)).toFixed(2)
+				// this.price = parseFloat(this.price).toFixed(2)
 			},
 			//  去支付
 			submitAuction() {

+ 1 - 1
pagesGood/goodList.vue

@@ -256,7 +256,7 @@
 			width: 100%;
 			height: 58px;
 			box-sizing: border-box;
-			padding: 2px 12px 1px 12px;
+			padding: 2px 3px 1px 3px;
 
 			/deep/.uni-searchbar {
 				background-color: #f7f7f7;

+ 14 - 2
pagesGood/orderPay.vue

@@ -132,7 +132,8 @@
 				notes: '',
 				paySum: 0,
 				mineIntegral: {},
-				orderId: ''
+				orderId: '',
+				goodType: false,
 			}
 		},
 		onLoad(options) {
@@ -184,6 +185,9 @@
 				})
 			}
 		},
+		onReady() {
+			this.goodType = (this.orderData.goodsList.filter(site => site.productType == 3).length > 0) ? 3 : ''
+		},
 		onShow() {
 			if (uni.getStorageSync("defaultAddress")) {
 				this.addressData = uni.getStorageSync("defaultAddress")
@@ -314,6 +318,14 @@
 								    }, 1000)
 									return;
 								}
+								if (this.goodType == 3) {
+									setTimeout(() => {
+										uni.redirectTo({
+											url: '/pagesMain/paySuccess?orderId=' + this.orderId + '&orderStatus=' + 1 + '&goodType=' + this.goodType + '&tenantCode=' + res.data.tenantCode
+										});
+									}, 1000)
+									return;
+								}
 								uni.requestPayment({
 									provider: 'wxpay',
 									timeStamp: res.data.timeStamp,
@@ -324,7 +336,7 @@
 									success: (payRes) => {
 										console.log('success:' + JSON.stringify(payRes));
 										uni.redirectTo({
-											url: '/pagesMain/paySuccess?orderId=' + this.orderId
+											url: '/pagesMain/paySuccess?orderId=' + this.orderId + '&orderStatus=' + 2
 										});
 									},
 									fail: (error) => {

+ 1 - 1
pagesMain/entrustForm.vue

@@ -40,7 +40,7 @@
 					productName: '',
 					tenantCode: '',
 					areaSize: '',
-					payAomount: '',
+					payAomount: 1,
 					entrustDurationTime: 1,
 					entrustStartTime: '',
 					remarks: '',

+ 29 - 4
pagesMain/paySuccess.vue

@@ -3,13 +3,15 @@
 		<view class="pay-icon">
 			<view class="iconfont iconqueding"></view>
 		</view>
-		<view class="pay-title">支付成功</view>
+		<view class="pay-title" v-if="goodType && orderStatus == 1">提交成功</view>
+		<view class="pay-title" v-else>支付成功</view>
 		<view class="pay-text">{{goodType ? '您已支付成功, 您所购买的商品需要留言卖家后进行自助采摘' : '您已支付成功,您所购买的商品正在向您飞奔, 请耐心等待!'}}</view>
 		<view v-if="!goodType" class="pay-text">3秒后自动跳转订单详情...</view>
 		<view class="pay-handle">
-			<u-button v-if="!goodType" type="success" shape="circle" :ripple="true" @click="goToOrderList()" class="button1">查看订单</u-button>
 			<u-button v-if="goodType" type="success" shape="circle" :ripple="true" @click="goPickVideo()" class="button1">自助采摘</u-button>
-			<u-button type="success" shape="circle" :ripple="true" :hair-line="false" :plain="true" @click="goToIndex()" class="button2">返回首页</u-button>
+			<u-button v-if="goodType" type="success" shape="circle" :ripple="true" :hair-line="false" :plain="true" @click="goToOrderList2()" class="button3">查看订单</u-button>
+			<u-button v-if="!goodType" type="success" shape="circle" :ripple="true" @click="goToOrderList()" class="button1">查看订单</u-button>
+			<u-button v-if="!goodType" type="success" shape="circle" :ripple="true" :hair-line="false" :plain="true" @click="goToIndex()" class="button2">返回首页</u-button>
 		</view>
 	</view>
 </template>
@@ -23,16 +25,21 @@
 			    orderId: '',
 				timeoutID:0,
 				goodType: '',
-				tenantCode: ''
+				tenantCode: '',
+				orderStatus: ''
 			}
 		},
 		onLoad(options) {
 			this.orderId = options.orderId
 			this.goodType = options.goodType ? options.goodType : ''
 			this.tenantCode = options.tenantCode ? options.tenantCode : ''
+			this.orderStatus = options.orderStatus ? options.orderStatus : ''
 			if (!this.goodType) {
 				this.autoJump()
 			}
+			uni.setNavigationBarTitle({
+				title: (this.goodType == 3 && this.orderStatus == 1) ? '提交结果' : '支付结果'
+			});
 		},
 		methods: {
 			// 自动跳转页面
@@ -53,6 +60,12 @@
 					 url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 2
 				});
 			},
+			//  自助采摘未付款查看订单
+			goToOrderList2() {
+				uni.navigateTo({
+					 url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 1
+				});
+			},
 			// 跳转自助采摘直播
 			goPickVideo() {
 				var that=this;
@@ -174,6 +187,18 @@
 				width: 100%;
 				height: 34px;
 			}
+			
+			.button3 {
+				/deep/button {
+					background-color: #74bd60 !important;
+					border: none !important;
+					color: white !important;
+				}
+			
+				float: left;
+				width: 100%;
+				height: 34px;
+			}
 		}
 	}
 </style>