浏览代码

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

able99 4 年之前
父节点
当前提交
14b920b1a0
共有 4 个文件被更改,包括 33 次插入12 次删除
  1. 1 1
      pages/index/index.vue
  2. 2 1
      pages/index/login.vue
  3. 28 9
      pagesMain/orderDetail.vue
  4. 2 1
      pagesMain/paySuccess.vue

+ 1 - 1
pages/index/index.vue

@@ -334,7 +334,7 @@
 					white-space: nowrap;
 					text-overflow: ellipsis;
 					overflow: hidden;
-					height: 12px;
+					height: 14px;
 					margin: 7px 6px 10px 6px;
 					font-size: 12px;
 					font-family: PingFang SC;

+ 2 - 1
pages/index/login.vue

@@ -305,6 +305,7 @@
 
 			// 发请求获取个人数据 envType:1小程序 0:app
 			getUserInfo(envType) {
+				debugger
 				console.log('发请求获取个人数据envType',envType)
 				NET.request(API.WxLogin, {
 					...this.wxLoginData,
@@ -319,7 +320,7 @@
 					uni.setStorage({
 						key: 'userData',
 						data: {
-							headImage: envType ? this.wxLoginData.rawData.avatarUrl : this.wxLoginData.avatarUrl,
+							headImage: envType ? JSON.parse(this.wxLoginData.rawData).avatarUrl : this.wxLoginData.avatarUrl,
 							userName: res.data.name,
 							userId: res.data.userId,
 						}

+ 28 - 9
pagesMain/orderDetail.vue

@@ -173,7 +173,7 @@
 					tenantCode: '',
 					evaluateReplyStatus: 1,
 				},
-				goodType: 1, // 1是普通商品类型;2是包含自助采摘+普通商品的类型;3是拍卖、共享种植
+				goodType: 1, // 1是普通商品类型;3是包含自助采摘+普通商品的类型;2是拍卖、共享种植
 				buttonGroup: [],
 				modalShow: false,
 				handleType: '',
@@ -203,16 +203,27 @@
 					// let tempDate = new Date(this.orderData.tempTimeArr[0].replace(/-/g, "/"))
 					// this.orderData.overTime = new Date(tempDate.setDate(tempDate.getDate() + 1))
 				}
-				if (this.orderData.merchantInfoResVO.products.length && this.orderData.merchantInfoResVO.products[0].productType !=
-					2 && this.orderData.merchantInfoResVO.products[0].productType != 4) {
-				    if (this.orderData.merchantInfoResVO.products.every(v=>{v.productType != 3})) {
+				// 1是普通商品类型;3是包含自助采摘+普通商品的类型;2是拍卖、共享种植
+				if (this.orderData.merchantInfoResVO.products.length) {
+					if (this.orderData.merchantInfoResVO.products.every(v=>{return (v.productType == 1)})) {
 						this.goodType = 1
-					} else {
+					} else if (this.orderData.merchantInfoResVO.products.some(v=>{return(v.productType == 3)})) {
 						this.goodType = 3
+					} else if (this.orderData.merchantInfoResVO.products[0].productType == 2 || this.orderData.merchantInfoResVO.products[0].productType == 4) {
+						this.goodType = 2
 					}
-				} else {
-					this.goodType = 2
 				}
+				// if (this.orderData.merchantInfoResVO.products.length && this.orderData.merchantInfoResVO.products[0].productType !=
+				// 	2 && this.orderData.merchantInfoResVO.products[0].productType != 4) {
+				// 		debugger
+				//     if (this.orderData.merchantInfoResVO.products.some(v=>{v.productType == 3})) {
+				// 		this.goodType = 3
+				// 	} else {
+				// 		this.goodType = 1
+				// 	}
+				// } else {
+				// 	this.goodType = 2
+				// }
 				switch (JSON.stringify(this.orderData.orderStatus)) {
 					case '1':
 					    if (this.goodType == 3) {
@@ -476,12 +487,20 @@
 								});
 							}
 						} else if (this.orderData.orderStatus == 4) {
-							if (e.index == 1) {
+							if (e.index == 1 && this.goodType == 2) {
 								//  去我的种植
 								uni.navigateTo({
 									url: '/pagesGood/goodDetails?minePlant=true&goodId=' + this.orderData.merchantInfoResVO.products[0].productId + '&orderId=' + this.orderData.orderId
 								});
-							} 
+							} else {
+								//  评价
+								uni.navigateTo({
+									url: '/pagesMain/evaluateForm?orderId=' + this.orderData.orderId + '&tenantCode=' + this.orderData.tenantCode +
+										'&productIds=' + this.orderData.merchantInfoResVO.products.map(site => {
+											return site.productId
+										}).join(',')
+								});
+							}
 						} else {
 							//  评价
 							uni.navigateTo({

+ 2 - 1
pagesMain/paySuccess.vue

@@ -5,7 +5,7 @@
 		</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 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="goPickVideo()" class="button1">自助采摘</u-button>
@@ -69,6 +69,7 @@
 			// 跳转自助采摘直播
 			goPickVideo() {
 				var that=this;
+				debugger
 				if(uni.getStorageSync("firstTimeLiveUser")==""){
 					uni.setStorage({
 						key: 'firstTimeLiveUser',