import { YYYYMMDDHHmmss } from "@/constants/constants";
import moment from "moment";
import { store } from "@/store/store";

export default {
  /** 返回YYYY-MM-DD HH:mm:ss */
  datetimeFilter(epochTime: number) {
    return moment(epochTime).format(YYYYMMDDHHmmss);
  },
  /** 根据fileServer得到完整的资源路径 */
  toCompleteUrl(path: string) {
    return store.setting.fileServer + path;
  },
  /** 根据fileServer得到完整的资源路径 */
  toCompleteUrlWithFileServer(fileServer: string, path: string) {
    return fileServer + path;
  },
};
