Browse Source

修改格式化

lex-xin 3 years ago
parent
commit
c4ce35d82b
1 changed files with 10 additions and 10 deletions
  1. 10 10
      src/views/teacher/order.vue

+ 10 - 10
src/views/teacher/order.vue

@@ -269,16 +269,16 @@ export default {
     },
     filters: {
         formatterTimes(second){
-            if(second<60){
-                return second+'秒'
-            }else if(60<second&&second<3600){
-                return moment(second*1000).format('m分钟');
-            }else if(3600<second&&second<86400){
-                return moment(second*1000).format('HH小时mm分钟');
-            }else if (second > 86400){
-                return moment(second*1000).format('DD天HH小时');
-            }else{
-                return '--'
+            if (second < 60) {
+                return second + "秒";
+            } else if (60 < second && second < 3600) {
+                return moment(second * 1000).format("m分钟");
+            } else if (3600 < second && second < 86400) {
+                return moment(second * 1000).format("HH小时mm分钟");
+            } else if (second > 86400) {
+                return moment(second * 1000).format("DD天HH小时mm分钟");
+            } else {
+                return "--";
             }
         }
     }