瀏覽代碼

修复时间展示的bug

blue 2 年之前
父節點
當前提交
002335285a
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 2 1
      im-ui/src/api/date.js
  2. 1 1
      im-uniapp/common/date.js

+ 2 - 1
im-ui/src/api/date.js

@@ -21,7 +21,8 @@ let toTimeText = (timeStamp, simple) => {
 		//不属于今年
 		timeText = formatDateTime(dateTime);
 		if(simple){
-			timeText = timeText.substring(2,5);
+			console.log(timeText)
+			timeText = timeText.substr(2,5);
 		}
 	}
 	return timeText;

+ 1 - 1
im-uniapp/common/date.js

@@ -21,7 +21,7 @@ let toTimeText = (timeStamp, simple) => {
 		//不属于今年
 		timeText = formatDateTime(dateTime);
 		if(simple){
-			timeText = timeText.substring(2,5);
+			timeText = timeText.substr(2,5);
 		}
 	}
 	return timeText;