panhui 3 years ago
parent
commit
b27b2bcbac
3 changed files with 8 additions and 4 deletions
  1. 2 2
      src/components/ChatInfo.vue
  2. 3 1
      src/views/chat/Detail.vue
  3. 3 1
      src/views/chat/TeamSetting.vue

+ 2 - 2
src/components/ChatInfo.vue

@@ -4,7 +4,7 @@
         <div class="chat-time" v-if="type == 'notification'">{{ noticeStr }}</div>
         <div class="chat-content" v-else>
             <div class="chat-box">
-                <div class="chat-name" v-if="flow == 'in'">{{ info.fromNick }}</div>
+                <div class="chat-name" v-if="flow == 'in'">{{ info.fromNick || info.fromNickName }}</div>
                 <van-image
                     :src="body.msg + '?x-oss-process=image/resize,l_120'"
                     @click="preview(0, [body.msg])"
@@ -162,7 +162,7 @@ const noticeStr = computed(() => {
 });
 
 const timeStr = computed(() => {
-    let day1 = dayjs(props.info.time || props.info.createdAt);
+    let day1 = dayjs(props.info.time || props.info.timetag || props.info.createdAt);
     let day2 = '';
     if (props.beforeTime) {
         day2 = dayjs(props.beforeTime);

+ 3 - 1
src/views/chat/Detail.vue

@@ -32,7 +32,9 @@
                 v-for="(item, index) in list"
                 :key="index"
                 :info="item"
-                :beforeTime="index > 0 ? list[index - 1].time || list[index - 1].createdAt : ''"
+                :beforeTime="
+                    index > 0 ? list[index - 1].time || list[index - 1].timetag || list[index - 1].createdAt : ''
+                "
             ></chat-info>
         </div>
 

+ 3 - 1
src/views/chat/TeamSetting.vue

@@ -1,7 +1,9 @@
 <template>
     <div class="page">
         <van-sticky>
-            <van-nav-bar title="群聊信息" left-text="" right-text="" left-arrow @click-left="$router.go(-1)" />
+            <div class="padding-safe-top">
+                <van-nav-bar title="群聊信息" left-text="" right-text="" left-arrow @click-left="$router.go(-1)" />
+            </div>
         </van-sticky>
 
         <van-cell-group :border="false">