index.ts 420 B

1234567891011121314
  1. import { YYYYMMDDHHmmss } from "@/constants/constants";
  2. import moment from "moment";
  3. import { store } from "@/components/mark/store";
  4. export default {
  5. /** 返回YYYY-MM-DD HH:mm:ss */
  6. datetimeFilter(epochTime: number) {
  7. return moment(epochTime).format(YYYYMMDDHHmmss);
  8. },
  9. /** 根据fileServer得到完整的资源路径 */
  10. toCompleteUrl(path: string) {
  11. return store.setting.fileServer + path;
  12. },
  13. };