From 12f7304fe9e2bb56ec328e4429a654a0653928a9 Mon Sep 17 00:00:00 2001 From: huangyinfeng <1244041895@qq.com> Date: 星期五, 13 九月 2024 17:15:02 +0800 Subject: [PATCH] 邮件列表联调 --- src/views/email/Inbox/index.vue | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/views/email/Inbox/index.vue b/src/views/email/Inbox/index.vue index 3f768fa..bad0cd4 100644 --- a/src/views/email/Inbox/index.vue +++ b/src/views/email/Inbox/index.vue @@ -1,12 +1,12 @@ <template> <div> - <PageIndex :pageList='pageList' ></PageIndex> + <PageIndex :pageList="pageList"></PageIndex> </div> </template> <script lang="ts" setup> name: 'Inbox'; - import { ref, onMounted, computed } from 'vue'; + import { ref, onMounted, computed, provide } from 'vue'; import PageIndex from '@/views/email/components/ListPage/list.vue'; import { useRoute } from 'vue-router'; @@ -28,15 +28,16 @@ } }); import { receiveApi, getMailListApi } from '@/api/email/userList'; - const pageList = ref([]) + const pageList = ref([]); function getDataList() { receiveApi({ mail: routerId.value }).then((res) => {}); getMailListApi({ mail: routerId.value }).then((res) => { - if(res.code==-1){ - pageList.value = res.data + if (res.code == 0) { + pageList.value = res.data; } }); } + provide('getDataList',getDataList); onMounted(() => { getDataList(); }); -- Gitblit v1.8.0