Showing
1 changed file
with
14 additions
and
3 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-01-15 11:43:01 | 2 | * @Date: 2024-01-15 11:43:01 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-01-15 13:33:14 | 4 | + * @LastEditTime: 2024-01-16 14:15:52 |
| 5 | * @FilePath: /xysBooking/src/views/notice.vue | 5 | * @FilePath: /xysBooking/src/views/notice.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -21,7 +21,7 @@ | ... | @@ -21,7 +21,7 @@ |
| 21 | <van-checkbox-group v-model="checked" shape="square" checked-color="#A67939" style="margin-left: 1.25rem;"> | 21 | <van-checkbox-group v-model="checked" shape="square" checked-color="#A67939" style="margin-left: 1.25rem;"> |
| 22 | <van-checkbox name="1" icon-size="0.8rem"><span style="color: #A67939; font-size: 0.85rem;">我已阅读并同意以上内容</span></van-checkbox> | 22 | <van-checkbox name="1" icon-size="0.8rem"><span style="color: #A67939; font-size: 0.85rem;">我已阅读并同意以上内容</span></van-checkbox> |
| 23 | </van-checkbox-group> | 23 | </van-checkbox-group> |
| 24 | - <div class="confirm-btn">确认,下一步</div> | 24 | + <div @click="confirmBtn" class="confirm-btn">确认,下一步</div> |
| 25 | </div> | 25 | </div> |
| 26 | </div> | 26 | </div> |
| 27 | </template> | 27 | </template> |
| ... | @@ -34,15 +34,26 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@ | ... | @@ -34,15 +34,26 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@ |
| 34 | //import { } from '@/utils/generateModules.js' | 34 | //import { } from '@/utils/generateModules.js' |
| 35 | //import { } from '@/utils/generateIcons.js' | 35 | //import { } from '@/utils/generateIcons.js' |
| 36 | //import { } from '@/composables' | 36 | //import { } from '@/composables' |
| 37 | +import { useGo } from '@/hooks/useGo' | ||
| 38 | +import { showSuccessToast, showFailToast } from 'vant'; | ||
| 37 | const $route = useRoute(); | 39 | const $route = useRoute(); |
| 38 | const $router = useRouter(); | 40 | const $router = useRouter(); |
| 39 | useTitle($route.meta.title); | 41 | useTitle($route.meta.title); |
| 40 | 42 | ||
| 43 | +const go = useGo(); | ||
| 44 | + | ||
| 41 | const checked = ref(['0']); | 45 | const checked = ref(['0']); |
| 42 | const checkedChange = () => { | 46 | const checkedChange = () => { |
| 43 | - checked.value = !checked.value; | 47 | + // checked.value[0] = !checked.value[0]; |
| 44 | }; | 48 | }; |
| 45 | 49 | ||
| 50 | +const confirmBtn = () => { | ||
| 51 | + if (checked.value[1] === '1') { | ||
| 52 | + go('/booking'); | ||
| 53 | + } else { | ||
| 54 | + showFailToast('请勾选同意须知'); | ||
| 55 | + } | ||
| 56 | +} | ||
| 46 | </script> | 57 | </script> |
| 47 | 58 | ||
| 48 | <style lang="less" scoped> | 59 | <style lang="less" scoped> | ... | ... |
-
Please register or login to post a comment