Showing
1 changed file
with
19 additions
and
6 deletions
| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | * @Author: hookehuyr hookehuyr@gmail.com | 2 | * @Author: hookehuyr hookehuyr@gmail.com |
| 3 | * @Date: 2022-04-26 16:06:31 | 3 | * @Date: 2022-04-26 16:06:31 |
| 4 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 4 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 5 | - * @LastEditTime: 2022-05-31 20:12:23 | 5 | + * @LastEditTime: 2022-06-01 21:35:21 |
| 6 | * @FilePath: /tswj/src/views/client/finishUpload.vue | 6 | * @FilePath: /tswj/src/views/client/finishUpload.vue |
| 7 | * @Description: 作品上传成功提示页面 | 7 | * @Description: 作品上传成功提示页面 |
| 8 | --> | 8 | --> |
| ... | @@ -26,20 +26,23 @@ | ... | @@ -26,20 +26,23 @@ |
| 26 | </div> | 26 | </div> |
| 27 | </div> | 27 | </div> |
| 28 | 28 | ||
| 29 | - <donate-book :show-popup="showDonate" :item="userInfo" @on-close="closeDonate" /> | 29 | + <!-- <donate-book :show-popup="showDonate" :item="userInfo" @on-close="closeDonate" /> --> |
| 30 | + <donate-flower :user-type="donateType" :show-popup="showDonate" :item="donateInfo" @on-close="closeDonate" /> | ||
| 30 | </template> | 31 | </template> |
| 31 | 32 | ||
| 32 | <script setup> | 33 | <script setup> |
| 33 | import icon_success from '@images/que-sucess@2x.png' | 34 | import icon_success from '@images/que-sucess@2x.png' |
| 34 | 35 | ||
| 35 | import MyButton from '@/components/MyButton/index.vue' | 36 | import MyButton from '@/components/MyButton/index.vue' |
| 36 | -import DonateBook from '@/components/DonateBook/index.vue' | 37 | +import DonateFlower from '@/components/DonateFlower/index.vue' |
| 37 | 38 | ||
| 38 | import { useDefaultPerf } from '@/composables/useDefaultPerf.js' | 39 | import { useDefaultPerf } from '@/composables/useDefaultPerf.js' |
| 39 | 40 | ||
| 40 | -import { ref } from 'vue' | 41 | +import { ref, computed, onMounted } from 'vue' |
| 41 | import { useRoute, useRouter } from 'vue-router' | 42 | import { useRoute, useRouter } from 'vue-router' |
| 42 | -import { Toast } from 'vant'; | 43 | +import { Cookies } from '@/utils/generatePackage' |
| 44 | +import { prepareDonateAPI } from '@/api/C/donate.js' | ||
| 45 | + | ||
| 43 | const $route = useRoute(); | 46 | const $route = useRoute(); |
| 44 | const $router = useRouter(); | 47 | const $router = useRouter(); |
| 45 | 48 | ||
| ... | @@ -51,11 +54,21 @@ if (!book_id) { | ... | @@ -51,11 +54,21 @@ if (!book_id) { |
| 51 | Toast.fail('书籍数据不全'); | 54 | Toast.fail('书籍数据不全'); |
| 52 | } | 55 | } |
| 53 | 56 | ||
| 57 | +const donateInfo = ref({}) | ||
| 58 | +const userType = Cookies.get('userType') | ||
| 59 | +// 判断是访客进入还是幼儿园进入 | ||
| 60 | +const donateType = computed(() => { | ||
| 61 | + return userType === 'client' ? 'K' : 'V'; | ||
| 62 | +}) | ||
| 63 | +onMounted(async () => { | ||
| 64 | + const { data } = await prepareDonateAPI({ kg_id: $route.query.kg_id }); | ||
| 65 | + donateInfo.value = data; | ||
| 66 | +}) | ||
| 67 | + | ||
| 54 | // 弹出捐赠弹框模块 | 68 | // 弹出捐赠弹框模块 |
| 55 | const showDonate = ref(false); | 69 | const showDonate = ref(false); |
| 56 | 70 | ||
| 57 | const toDonate = () => { | 71 | const toDonate = () => { |
| 58 | - // TODO: 调用新的捐钱组件 | ||
| 59 | showDonate.value = true; | 72 | showDonate.value = true; |
| 60 | // 生成捐赠数据 | 73 | // 生成捐赠数据 |
| 61 | } | 74 | } | ... | ... |
-
Please register or login to post a comment