From ab95709b5d4009b414bf096cd81f2fe6fcae3d00 Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期三, 03 一月 2024 10:15:26 +0800 Subject: [PATCH] 客户管理-展示对应客户的详细信息 --- 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