donateCertificate.vue
1.18 KB
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
<!--
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-04-27 10:23:05
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-06-14 12:04:00
* @FilePath: /tswj/src/views/client/donateCertificate.vue
* @Description: 捐赠成功后显示证书页面
-->
<template>
<div class="donate-certificate-page content-bg">
<donate-cert :item="certItem" />
</div>
<shortcut-fixed :type="USER_ROLE.CLIENT" :item="['home']" />
</template>
<script setup>
import DonateCert from '@/components/DonateCert/index'
import ShortcutFixed from '@/components/ShortcutFixed/index'
import { USER_ROLE } from '@/constant'
import { onMounted, ref } from 'vue'
import { useRoute } from 'vue-router'
import { oneCertAPI } from '@/api/C/donate'
import { sharePage } from '@/composables/useShare.js'
// TAG:微信分享
sharePage({});
const $route = useRoute();
// 捐款成功后,查询生成捐赠证书
const certItem = ref('')
onMounted(async () => {
const { data } = await oneCertAPI({ donate_id: $route.query.donate_id })
certItem.value = data;
})
</script>
<style lang="less" scoped>
@import url('@css/content-bg.less');
.donate-certificate-page {
height: 96vh;
padding: 2vh;
}
</style>