zhengyiming
5 天以前 b785f4eeb117923ad7a276f4387a342728bc4fa8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<template>
  <ContentScrollView :paddingH="false">
    <List v-if="detail?.length > 0">
      <ListItem
        v-for="item in detail"
        :key="item.id"
        :title="item.typeContent"
        @click="handleAdOrEdit(item.id)"
      >
      </ListItem>
    </List>
  </ContentScrollView>
  <PageFooter>
    <PageFooterBtn type="primary" @click="handleAdOrEdit()">添加证书</PageFooterBtn>
  </PageFooter>
</template>
 
<script setup lang="ts">
import { List, ListItem } from '@12333/components';
import Taro from '@tarojs/taro';
import { RouterPath } from '@/constants';
import * as userResumeServices from '@12333/services/apiV2/userResume';
import { useQuery } from '@tanstack/vue-query';
 
defineOptions({
  name: 'InnerPage',
});
 
const {
  isLoading,
  isError,
  data: detail,
  refetch,
} = useQuery({
  queryKey: ['userResumeServices/getUserResumeCredentials'],
  queryFn: async () => {
    return await userResumeServices.getUserResumeCredentials(
      {},
      {
        showLoading: false,
      }
    );
  },
  placeholderData: () => [] as API.GetUserResumeCredentialsQueryResultItem[],
});
 
function handleAdOrEdit(id?: string) {
  Taro.navigateTo({
    url: `${RouterPath.mineCertificateAddOrEdit}?id=${id}`,
  });
}
</script>
 
<style lang="scss">
@import '@/styles/common.scss';
</style>