添加小屏成员聊天页面, 添加css降级配置, 修复ios时间格式化bug
This commit is contained in:
@@ -12,7 +12,9 @@ export const ChatTime: React.FC<IChatTimeProps> = (props) => {
|
||||
|
||||
const formatTime = () => {
|
||||
const now = new Date();
|
||||
const msgtime = new Date(props.msgtime);
|
||||
const msgtimeStr = props.msgtime.replace(/-/g, '/');
|
||||
const msgtime = new Date(msgtimeStr);
|
||||
console.log(msgtime);
|
||||
|
||||
const yesterday = new Date();
|
||||
yesterday.setDate(yesterday.getDate() - 1);
|
||||
@@ -20,7 +22,7 @@ export const ChatTime: React.FC<IChatTimeProps> = (props) => {
|
||||
(new Date(
|
||||
`${now.getFullYear()}-${padWith(now.getMonth() + 1)}-${padWith(now.getDate())} 00:00:00`,
|
||||
).getTime() -
|
||||
new Date(props.msgtime).getTime()) /
|
||||
new Date(msgtimeStr).getTime()) /
|
||||
(24 * 60 * 60 * 1000) +
|
||||
1;
|
||||
|
||||
|
Reference in New Issue
Block a user