Răsfoiți Sursa

修复时间展示的bug

blue 2 ani în urmă
părinte
comite
002335285a
2 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  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;