Explorar o código

评论后返回页面刷新

junyuanz %!s(int64=4) %!d(string=hai) anos
pai
achega
adafa5dcfb
Modificáronse 2 ficheiros con 18 adicións e 18 borrados
  1. 3 3
      packageUser/pages/user/order/order.js
  2. 15 15
      packageUser/pages/user/orders/orders.js

+ 3 - 3
packageUser/pages/user/order/order.js

@@ -10,9 +10,9 @@ Page({
     rid = options.id
     this.getRadish()
   },
-  // onShow: function () {
-  //   this.getRadish()
-  // },
+  onShow: function () {
+    this.getRadish()
+  },
   getRadish () {
     var that = this
     var url = 'v1/order/' + rid

+ 15 - 15
packageUser/pages/user/orders/orders.js

@@ -34,21 +34,21 @@ Page({
       getApp().globalData.order = false
     }
 	
-	// if (rid) {
-	//   if (rid === 'unpay') {
-	//     this.tabUnpay()
-	//   } else if (rid === 'processing') {
-	//     this.tabProcessing()
-	//   } else if (rid === 'dispatch') {
-	//     this.tabDispatch()
-	//   } else if (rid === 'complete') {
-	//     this.tabComplete()
-	//   } else {
-	//     this.getOrderList()
-	//   }
-	// } else {
-	//   this.getOrderList()
-	// }
+	if (rid) {
+	  if (rid === 'unpay') {
+	    this.tabUnpay()
+	  } else if (rid === 'processing') {
+	    this.tabProcessing()
+	  } else if (rid === 'dispatch') {
+	    this.tabDispatch()
+	  } else if (rid === 'complete') {
+	    this.tabComplete()
+	  } else {
+	    this.getOrderList()
+	  }
+	} else {
+	  this.getOrderList()
+	}
   },
   tabAll: function () {
     if (this.data.type !== '') {