huangyinfeng
2024-09-13 12f7304fe9e2bb56ec328e4429a654a0653928a9
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();
  });