烟花爆竹批发企业仓库安全风险监测前端
马宇豪
2025-04-16 e46a6e287f752825a8ae5f4024769cd3fbc39a4a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import Cookies from 'js-cookie'
 
const TokenKey = 'Admin-Token'
 
export function computePageCount(totalCount, pageSize) {
  if (pageSize == 0) {
    return 0
  }
  return totalCount % pageSize == 0
      ? totalCount / pageSize
      : totalCount / pageSize + 1
}
 
export function formatDateDay(value) {
  let date = new Date(value);
  let y = date.getFullYear();
  let MM = date.getMonth() + 1;
  MM = MM < 10 ? "0" + MM : MM;
  let d = date.getDate();
  d = d < 10 ? "0" + d : d;
  let h = date.getHours();
  return y + "年" + MM + "月" + d + "日";
}