From a7bb755ee5f797eb390aef581cd9f758d9944f9a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 04 四月 2023 11:33:59 +0800 Subject: [PATCH] 2023-04-04 --- src/tabviews/custom/components/card/cardcellList/index.jsx | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index 185042e..89cfeaa 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -267,6 +267,19 @@ let city = sessionStorage.getItem('city') || '' let bid = data.$$BID || '' val = val.replace(/@username@/ig, userName).replace(/@fullName@/ig, fullName).replace(/@mk_city@/ig, city).replace(/@bid@/ig, bid) + } else if (/@month@/ig.test(val)) { + val = val.replace(/@month@/ig, new Date().toLocaleString('en-US', { month: 'long' })) + } else if (/@week@/ig.test(val)) { + val = val.replace(/@week@/ig, (() => { + let day = new Date().getDay() + let weeks = ['鏄熸湡鏃�', '鏄熸湡涓�', '鏄熸湡浜�', '鏄熸湡涓�', '鏄熸湡鍥�', '鏄熸湡浜�', '鏄熸湡鍏�'] + return weeks[day] + })()) + } else if (/@day@/ig.test(val)) { + val = val.replace(/@day@/ig, (() => { + let day = new Date().getDate() + return day < 10 ? '0' + day : day + })()) } } else if (data.hasOwnProperty(card.field)) { val = data[card.field] -- Gitblit v1.8.0