You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.6 KiB
JavaScript
41 lines
1.6 KiB
JavaScript
import React from "react";
|
|
import dayjs from "dayjs";
|
|
|
|
export const HT_HOST = process.env.NODE_ENV == "production" ? "https://p9axztuwd7x8a7.mycht.cn" :"http://202.103.68.144:890"; //"http://202.103.68.231:889";
|
|
export const DATE_FORMAT = "YYYY-MM-DD";
|
|
export const DATE_FORMAT_MONTH = "YYYY-MM";
|
|
export const DATE_PRESETS = [
|
|
{
|
|
label: "This Week",
|
|
value: [dayjs().startOf("w"), dayjs().endOf("w")],
|
|
},
|
|
{
|
|
label: "Last Week",
|
|
value: [dayjs().startOf("w").subtract(7, "days"), dayjs().endOf("w").subtract(7, "days")],
|
|
},
|
|
{
|
|
label: "This Month",
|
|
value: [dayjs().startOf("M"), dayjs().endOf("M")],
|
|
},
|
|
{
|
|
label: "Last Month",
|
|
value: [dayjs().subtract(1, "M").startOf("M"), dayjs().subtract(1, "M").endOf("M")],
|
|
},
|
|
{
|
|
label: "Last Three Month",
|
|
value: [dayjs().subtract(2, "M").startOf("M"), dayjs().endOf("M")],
|
|
},
|
|
{
|
|
label: "This Year",
|
|
value: [dayjs().startOf("y"), dayjs().endOf("y")],
|
|
},
|
|
// 本月: [dayjs().startOf("month"), moment().endOf("month")],
|
|
// 上个月: [dayjs().subtract(1, "months").startOf("month"), moment(new Date()).subtract(1, "months").endOf("month")],
|
|
// 近7天: [dayjs().add(-7, "days"), dayjs()],
|
|
// 近30天: [dayjs().subtract(30, "days"), moment()],
|
|
// 近三个月: [dayjs().subtract(2, "month").startOf("month"), moment().endOf("month")],
|
|
// 今年: [dayjs().startOf("year"), moment().endOf("year")],
|
|
// 去年: [dayjs().subtract(1, "year").startOf("year"), moment().subtract(1, "year").endOf("year")],
|
|
];
|
|
export const arrManager = ["testzp","testzac","testycc","testlyj","testqqs","testjjh","testhn"];//特定账号加修改所属供应商的菜单 zp
|