electripper-v2-ui/src/views/bst/order/util.js
2025-04-26 18:41:39 +08:00

16 lines
294 B
JavaScript

import { calcSecond } from "@/utils/date";
export function getOrderDuration(order) {
if (order == null) {
return 0;
}
if (order.duration != null) {
return order.duration;
}
if (order.startTime != null) {
return calcSecond(order.startTime, new Date());
}
return 0;
}