Prechádzať zdrojové kódy

修复时间展示的bug

blue 2 rokov pred
rodič
commit
26fca28d04

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

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

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

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

+ 1 - 1
im-uniapp/components/chat-item/chat-item.vue

@@ -7,7 +7,7 @@
 		<view class="chat-right">
 			<view class="chat-name">
 				<view class="chat-name-text">{{chat.showName}}</view>
-				<view class="chat-time">{{$date.toTimeText(chat.lastSendTime)}}</view>
+				<view class="chat-time">{{$date.toTimeText(chat.lastSendTime,true)}}</view>
 			</view>
 			<view class="chat-content">
 				<view class="chat-at-text">{{atText}}</view>