From 7874262b15ca8d2495012ed5f934332dbeeadf29 Mon Sep 17 00:00:00 2001 From: songshankun <songshankun@foxmail.com> Date: 星期四, 28 九月 2023 09:42:57 +0800 Subject: [PATCH] feat: 客户管理页列表配置列显隐控制 --- src/common/config/index.js | 34 ++++++++++++++++++++-------------- 1 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/common/config/index.js b/src/common/config/index.js index 908e738..388b868 100644 --- a/src/common/config/index.js +++ b/src/common/config/index.js @@ -1,14 +1,20 @@ -let isProduction = process.env.NODE_ENV === "production" -let configObj = window.getServerJson - -// 鐢熶骇鐜璇锋眰鍦板潃 -export const baseUrl = configObj.managePath - -// 鏄惁鏄敓浜х幆澧�,鎵撳寘鐨勬椂鍊欏�间細鏄痶rue, 寮�鍙戠殑鏃跺�欏�兼槸false -export const IS_PRODUCTION = isProduction - -// @/common/until/wsCache 鍔犲瘑浣跨敤鐨勭洂 -export const LOCAL_ENCRYPTED_KEY = configObj.localEncryptedKey - -// 鎺ュ彛涓婁笅鏂� -export const manageContextPath = configObj.manageContextPath +export function dateFormat(fmt, date) { + let ret = "" + date = new Date(date) + const opt = { + "Y+": date.getFullYear().toString(), // 骞� + "m+": (date.getMonth() + 1).toString(), // 鏈� + "d+": date.getDate().toString(), // 鏃� + "H+": date.getHours().toString(), // 鏃� + "M+": date.getMinutes().toString(), // 鍒� + "S+": date.getSeconds().toString() // 绉� + // 鏈夊叾浠栨牸寮忓寲瀛楃闇�姹傚彲浠ョ户缁坊鍔狅紝蹇呴』杞寲鎴愬瓧绗︿覆 + } + for (let k in opt) { + ret = new RegExp("(" + k + ")").exec(fmt) + if (ret) { + fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0")) + } + } + return fmt +} -- Gitblit v1.8.0