Commit 8ebaf0d2 authored by 水玉婷's avatar 水玉婷
Browse files

feat:细节优化

parent 8c28a714
...@@ -223,7 +223,8 @@ const getChatRecordList = async (isLoadMore = false) => { ...@@ -223,7 +223,8 @@ const getChatRecordList = async (isLoadMore = false) => {
if (res.data.code === 0) { if (res.data.code === 0) {
let { data = [], total = 0, totalInfo = {} } = res.data.data || []; let { data = [], total = 0, totalInfo = {} } = res.data.data || [];
const newData = (data || []).map((item: any) => ({ // 反转数据,最新的在前面
const newData = (data.reverse() || []).map((item: any) => ({
...item, ...item,
isEdit: false, isEdit: false,
})); }));
...@@ -443,6 +444,7 @@ onMounted(() => { ...@@ -443,6 +444,7 @@ onMounted(() => {
height: 100vh; height: 100vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-color: #f5f5f5;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</template> </template>
<script> <script>
import { ref, onMounted, onUnmounted } from 'vue' import { ref, onMounted } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import wechat from '../utils/wechat' import wechat from '../utils/wechat'
...@@ -57,10 +57,6 @@ export default { ...@@ -57,10 +57,6 @@ export default {
// 执行静默登录 // 执行静默登录
handleLogin() handleLogin()
}) })
onUnmounted(() => {
// 组件卸载时,移除登录状态
wechat.logout()
})
return { return {
loading, loading,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment