微信店铺重发优化功能

This commit is contained in:
wule committed 2026-04-29 09:53:46 +08:00
1 parent 16342df70a
commit daa7f733fc
28 files changed
+3675 -986

No files matched your search

@@ -345,6 +345,17 @@ namespace NaiBa.Util.Extension
{
return null;
}
try
{
return DateTime.Parse(str);
}
catch
{
}
if (str.Contains("年") && str.Contains("月") && str.Contains("日") && !str.Contains("周"))
str = str.Replace("年", "-").Replace("月", "-").Replace("日", "").Replace("时", ":").Replace("分", ":").Replace("秒", "").Trim(' ', ':');
if (str.Contains("-") || str.Contains("/"))
{
return DateTime.Parse(str);
@@ -485,6 +496,8 @@ namespace NaiBa.Util.Extension
}
else
{
if (obj is DateTime)
return (obj as DateTime?).Value.ToString("yyyy-MM-dd HH:mm:ss");
return obj.ToString();
}
}