Просмотр исходного кода

评价:完善卖家到期评价2

wangdy 8 лет назад
Родитель
Сommit
801bdbd56c

+ 17 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_order_ctrl.js

@@ -1231,4 +1231,21 @@ define(['app/app'], function (app) {
 
 
     });
+    /**
+     * 与现在的时间对比,距离多少天多少小时
+     */
+    app.register.filter('restTime', function () {
+        var day = 0, hours = 0;
+        return function (time) {
+            if(!time) {
+                return null;
+            }
+            var nowTime = new Date();
+            var s1 = time - nowTime.getTime();
+            var totalHours = s1/(1000*60*60);//算多少个小时
+            day = parseInt(totalHours) / 24;
+            hours = parseInt(totalHours) % 24;
+            return "还剩 " + parseInt(day) + "天" + parseInt(hours) + "小时";
+        }
+    });
 });

+ 6 - 0
src/main/webapp/resources/view/vendor/forstore/vendor_order.html

@@ -136,6 +136,12 @@
 		background-color: #4574E8;
 		color: white !important;
 	}
+	.clock-mind {
+		font-size: 12px;
+		color: #C2BEB7;
+		line-height: 20px;
+		height: 20px;
+	}
 	ul.pagination.ng-table-pagination > li > a > span {
 		height: 17px;
 		line-height: 17px;