Showing
1 changed file
with
12 additions
and
4 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-01-15 18:28:25 | 2 | * @Date: 2024-01-15 18:28:25 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-01-16 10:03:13 | 4 | + * @LastEditTime: 2024-01-16 15:49:07 |
| 5 | * @FilePath: /xysBooking/src/views/success.vue | 5 | * @FilePath: /xysBooking/src/views/success.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -22,8 +22,8 @@ | ... | @@ -22,8 +22,8 @@ |
| 22 | <p style="font-size: 0.85rem;">2. 若您无法按时参观,请提前在预约记录中取消您的预约</p> | 22 | <p style="font-size: 0.85rem;">2. 若您无法按时参观,请提前在预约记录中取消您的预约</p> |
| 23 | </div> | 23 | </div> |
| 24 | <div class="success-btn"> | 24 | <div class="success-btn"> |
| 25 | - <div class="btn-item btn-left">首页</div> | 25 | + <div @click="goToHome" class="btn-item btn-left">首页</div> |
| 26 | - <div class="btn-item btn-right">详情</div> | 26 | + <div @click="goToDetail" class="btn-item btn-right">详情</div> |
| 27 | </div> | 27 | </div> |
| 28 | </div> | 28 | </div> |
| 29 | </template> | 29 | </template> |
| ... | @@ -31,7 +31,7 @@ | ... | @@ -31,7 +31,7 @@ |
| 31 | <script setup> | 31 | <script setup> |
| 32 | import { ref } from 'vue' | 32 | import { ref } from 'vue' |
| 33 | import { useRoute, useRouter } from 'vue-router' | 33 | import { useRoute, useRouter } from 'vue-router' |
| 34 | - | 34 | +import { useGo } from '@/hooks/useGo' |
| 35 | import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@/utils/generatePackage.js' | 35 | import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@/utils/generatePackage.js' |
| 36 | //import { } from '@/utils/generateModules.js' | 36 | //import { } from '@/utils/generateModules.js' |
| 37 | //import { } from '@/utils/generateIcons.js' | 37 | //import { } from '@/utils/generateIcons.js' |
| ... | @@ -40,6 +40,14 @@ const $route = useRoute(); | ... | @@ -40,6 +40,14 @@ const $route = useRoute(); |
| 40 | const $router = useRouter(); | 40 | const $router = useRouter(); |
| 41 | useTitle($route.meta.title); | 41 | useTitle($route.meta.title); |
| 42 | 42 | ||
| 43 | +const go = useGo(); | ||
| 44 | + | ||
| 45 | +const goToHome = () => { | ||
| 46 | + go('/') | ||
| 47 | +} | ||
| 48 | +const goToDetail = () => { | ||
| 49 | + go('/bookingDetail', { id: 'test' }) | ||
| 50 | +} | ||
| 43 | </script> | 51 | </script> |
| 44 | 52 | ||
| 45 | <style lang="less" scoped> | 53 | <style lang="less" scoped> | ... | ... |
-
Please register or login to post a comment