会话存档

This commit is contained in:
liuye
2023-06-08 16:48:32 +08:00
parent 7923da175a
commit a8cffd58d6
2 changed files with 12 additions and 11 deletions

View File

@@ -32,7 +32,6 @@
<div class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item)"> <div class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item)">
<img :src="item.toUserAvatar" alt="" v-if="currentTabs == 1"> <img :src="item.toUserAvatar" alt="" v-if="currentTabs == 1">
<p v-if="currentTabs == 1">{{item.toUserName}}</p> <p v-if="currentTabs == 1">{{item.toUserName}}</p>
<img src="./img/group-img.png" alt="" v-if="currentTabs != 1"> <img src="./img/group-img.png" alt="" v-if="currentTabs != 1">
<p v-if="currentTabs != 1">{{item.roomName}}</p> <p v-if="currentTabs != 1">{{item.roomName}}</p>
</div> </div>

View File

@@ -29,23 +29,23 @@
<div class="img-list" v-if="item.msgType == 'image'"> <div class="img-list" v-if="item.msgType == 'image'">
<img :src="item.sdkFileUrl" alt="" @click="previewImage(item.sdkFileUrl)"> <img :src="item.sdkFileUrl" alt="" @click="previewImage(item.sdkFileUrl)">
</div> </div>
<audio :src="item.sdkFileUrl" ref="audio" :controls="true" style="display: block;" v-if="item.msgType == 'voice'"></audio> <audio :src="item.sdkFileUrl" controls style="display: block;" v-if="item.msgType == 'voice'"></audio>
<video :src="item.sdkFileUrl" v-if="item.msgType == 'video'" /> <video :src="item.sdkFileUrl" v-if="item.msgType == 'video'" />
<div class="revoke-text" v-if="item.msgType == 'revoke'">{{item.userName}}{{item.msgSendTime.substring(0, 16)}}撤回了一条消息</div>
<div class="file" @click="prevFile(item)" v-if="item.msgType == 'file'"> <div class="file" @click="prevFile(item)" v-if="item.msgType == 'file'">
<u-row justify="between"> <u-row justify="between">
<label class="left"> <label class="left">
<img :src="$cdn + 'common/appendix.png'" alt=""> <img :src="$cdn + 'common/appendix.png'" alt="">
<span>{{ item.msgType }}.{{ item.msgType }}</span> <span>{{ item.sdkFileName }}</span>
</label> </label>
<span>{{ item.msgType }}</span> <span>{{ item.fileSizeStr }}</span>
</u-row> </u-row>
</div> </div>
<div class="revoke-text" v-if="item.msgType == 'revoke'">{{item.userName}}{{item.msgSendTime.substring(0, 16)}}撤回了一条消息</div>
</div> </div>
<img :src="item.userAvatar" alt="" class="user-img" v-if="item.userId == user.wxUserId"> <img :src="item.userAvatar" alt="" class="user-img" v-if="item.userId == user.wxUserId">
<!-- <img src="./img/fail-icon.png" alt="" class="fail-img" v-if="item.userId != user.wxUserId"> --> <!-- <img src="./img/fail-icon.png" alt="" class="fail-img" v-if="item.userId != user.wxUserId"> -->
@@ -54,12 +54,12 @@
</div> </div>
<AiEmpty v-else/> <AiEmpty v-else/>
<u-calendar v-model="isShowDate" @change="onDateChange" mode="range"></u-calendar> <u-calendar v-model="isShowDate" @change="onDateChange" mode="range"></u-calendar>
<div class="footer" @click="toGroup">{{type == 1 ? '群详情' : '个人信息'}}</div> <!-- <div class="footer" @click="toGroup">{{type == 1 ? '群详情' : '个人信息'}}</div> -->
</div> </div>
</template> </template>
<script> <script>
import {mapState} from "vuex"; import {mapState, mapActions} from "vuex";
export default { export default {
name: "conversationDetail", name: "conversationDetail",
data() { data() {
@@ -176,6 +176,7 @@ export default {
current: img current: img
}) })
}, },
...mapActions(['previewFile']),
prevFile(file) { prevFile(file) {
this.$loading() this.$loading()
this.previewFile({ ...file }).then(()=>{ this.previewFile({ ...file }).then(()=>{
@@ -290,8 +291,8 @@ export default {
line-height: 54px; line-height: 54px;
padding: 0 24px; padding: 0 24px;
border-radius: 8px; border-radius: 8px;
background-color: #ddd; background-color: #EEE;
color: #666; color: #999;
margin-top: 16px; margin-top: 16px;
} }
.file { .file {
@@ -378,6 +379,7 @@ export default {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: 99;
} }
} }
</style> </style>