chenrui пре 2 година
родитељ
комит
b350a69dea
1 измењених фајлова са 11 додато и 2 уклоњено
  1. 11 2
      src/utils/util.js

+ 11 - 2
src/utils/util.js

@@ -3,7 +3,7 @@ export function timeFix () {
   const hour = time.getHours()
   return hour < 9 ? '早上好' : hour <= 11 ? '上午好' : hour <= 13 ? '中午好' : hour < 20 ? '下午好' : '晚上好'
 }
- 
+
 export function welcome () {
   const arr = ['休息一会儿吧', '准备吃什么呢?', '要不要打一把 DOTA', '我猜你可能累了']
   const index = Math.floor(Math.random() * arr.length)
@@ -70,4 +70,13 @@ export function oneOf (value, validList) {
     }
   }
   return false
-}
+}
+
+/*
+* 选择起止日期  + 固定时间
+* type:1 开始时间 2结束时间
+*/
+export function dealChooseDate (value, type) {
+  const newDate = type == 'start' ? value + ' 00:00:00' : value + ' 23:59:59'
+  return newDate
+}