Commit db78304c authored by 李智书's avatar 李智书

1.提交更新;

parent 5ac1f923
...@@ -923,6 +923,25 @@ export default { ...@@ -923,6 +923,25 @@ export default {
this.queryConsumerTrend(); this.queryConsumerTrend();
}, },
methods: { methods: {
// 当天6:30 ~ 9:00,11:30 ~ 12:00, 17:30 ~ 19:00属于高峰期
isPeakPeriod() {
let first = this.timeIn("06:30:00", "09:00:00");
let second = this.timeIn("11:00:00", "12:00:00");
let three = this.timeIn("17:30:00", "19:00:00");
console.log(first, "first", second, "second", three, "three");
return first || second || three;
},
/*在某段时间内*/
timeIn(s, e) {
let t = moment().format("YYYY-MM-DD");
if (
moment(t + " " + s).diff(moment()) < 0 &&
moment(t + " " + e).diff(moment()) > 0
) {
return true;
}
return false;
},
tabTap: function (num) { tabTap: function (num) {
this.tabIndex = num; this.tabIndex = num;
if (num == 1) { if (num == 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment