flat: 消息

This commit is contained in:
史典卓
2025-05-15 14:17:51 +08:00
parent 5333254c58
commit a93907018c
40 changed files with 875 additions and 56 deletions

View File

@@ -4,12 +4,12 @@
<!-- 顶部头部区域 -->
<view class="container-header">
<view class="header-btnLf button-click" @click="changeType(0)" :class="{ active: state.current === 0 }">
已读消息
<view class="btns-wd"></view>
全部消息
<!-- <view class="btns-wd"></view> -->
</view>
<view class="header-btnLf button-click" @click="changeType(1)" :class="{ active: state.current === 1 }">
未读消息
<view class="btns-wd"></view>
<view class="btns-wd" v-if="unreadCount"></view>
</view>
</view>
@@ -39,7 +39,14 @@ import UnreadComponent from './unread.vue';
const loadedMap = reactive([false, false]);
const swiperRefs = [ref(null), ref(null)];
const components = [ReadComponent, UnreadComponent];
import { storeToRefs } from 'pinia';
import { useReadMsg } from '@/stores/useReadMsg';
const { unreadCount } = storeToRefs(useReadMsg());
onShow(() => {
// 获取消息列表
useReadMsg().fetchMessages();
});
const state = reactive({
current: 0,
all: [{}],