DengTao vor 8 Jahren
Ursprung
Commit
1bb64bc44e
1 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
  1. 4 2
      www/webapp/o2o/js/model/user.js

+ 4 - 2
www/webapp/o2o/js/model/user.js

@@ -138,10 +138,12 @@ define(['base', '$', 'native', 'api', 'order', 'config', 'address'], function (b
 				that.used_coupons = res.data.used_coupons;
 				that.overtime_coupons = res.data.overtime_coupons;
 
+				// that.usable_coupons.sort(function (a, b) {
+				// 	return b.coupon.value - a.coupon.value;
+				// });
 				that.usable_coupons.sort(function (a, b) {
-					return b.coupon.value - a.coupon.value;
+					return a.end_time - b.end_time;
 				});
-
 				that.used_coupons.sort(function (a, b) {
 					return a.end_time - b.end_time;
 				});