zs hace 2 años
padre
commit
5afd1dad32
Se han modificado 1 ficheros con 22 adiciones y 7 borrados
  1. 22 7
      pagesMy/order/index.vue

+ 22 - 7
pagesMy/order/index.vue

@@ -113,8 +113,8 @@
 											@tap.stop="toReject(item)">拒收</button>
 										<button v-if="item.status=='3'" size="mini"
 											@tap.stop="toAfter(item)">申请售后</button>
-										<!-- <button v-if="item.status=='3'" size="mini"
-											@tap.stop="toAppraise(item)">立即评价</button> -->
+										<button v-if="item.status=='3'" type="default" size="mini"
+											@tap.stop="toAppraise(item)">{{item.rate?'追加评价':'立即评价'}}</button>
 									</view>
 								</view>
 								<view class="is_bottom" v-if="is_bottom">
@@ -160,11 +160,14 @@
 				statusList: []
 			};
 		},
-		onLoad: async function(e) {
+		onLoad: function(e) {
 			const that = this;
 			that.$set(that, `status`, e.status || '');
 			that.$set(that.tabs, `active`, e.status || '');
 			that.searchConfig();
+		},
+		onShow: async function(e) {
+			const that = this;
 			await that.searchOther();
 			await that.watchlogin();
 		},
@@ -403,6 +406,8 @@
 			},
 			// 查看物流
 			toLogi(e) {
+				const that = this;
+				that.clearPage();
 				uni.navigateTo({
 					url: `/pagesMy/logistics/index?id=${e._id}`
 				})
@@ -464,14 +469,24 @@
 					}
 				});
 			},
-			// 立即评价 追评
+			// 立即评价
 			toAppraise(e) {
-				uni.navigateTo({
-					url: `/pagesMy/order/appraise?id=${e._id}`
-				})
+				const that = this;
+				that.clearPage();
+				if (e.rate) {
+					uni.navigateTo({
+						url: `/pagesMy/order/appraise?id=${e._id}&rate_id=${e.rate}`
+					})
+				} else {
+					uni.navigateTo({
+						url: `/pagesMy/order/appraise?id=${e._id}`
+					})
+				}
 			},
 			// 申请售后
 			toAfter(e) {
+				const that = this;
+				that.clearPage();
 				uni.navigateTo({
 					url: `/pagesMy/order/service?id=${e._id}&&status=${e.status}`
 				})