animal.vue 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <!--
  2. * @Author: wanglj wanglijie@dashoo.cn
  3. * @Date: 2025-03-13 09:07:55
  4. * @LastEditors: wanglj wanglijie@dashoo.cn
  5. * @LastEditTime: 2025-03-20 16:38:29
  6. * @FilePath: \labsop-h5\src\layout\index.vue
  7. * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  8. -->
  9. <template>
  10. <router-view></router-view>
  11. <van-tabbar route :placeholder="true" v-if="route.path !== '/entry/add'">
  12. <van-tabbar-item replace to="/animal-application" icon="send-gift-o">笼位申请</van-tabbar-item>
  13. <van-tabbar-item replace to="/animal-return" icon="send-gift-o">笼位退还</van-tabbar-item>
  14. </van-tabbar>
  15. </template>
  16. <script lang="ts" setup>
  17. import to from 'await-to-js'
  18. import { showDialog } from 'vant'
  19. import { ref } from 'vue'
  20. import { useRouter, useRoute } from 'vue-router'
  21. import { useUserInfo } from '/@/stores/userInfo'
  22. import { Local } from '/@/utils/storage'
  23. const active = ref(0)
  24. const router = useRouter()
  25. const route = useRoute()
  26. const onRouterPush = (val: string) => {
  27. router.push(val)
  28. }
  29. const scan = async () => {
  30. const res = await useUserInfo().scanCode()
  31. if (res) {
  32. window.location.href = res as string
  33. }
  34. }
  35. </script>
  36. <style lang="scss" scoped>
  37. .footer-nav {
  38. height: 60px;
  39. font-weight: bold;
  40. ul {
  41. height: 60px;
  42. display: flex;
  43. li {
  44. flex: 1;
  45. display: flex;
  46. flex-direction: column;
  47. align-items: center;
  48. justify-content: center;
  49. font-size: 12px;
  50. &.center-icon {
  51. height: 60px;
  52. flex: 0 0 60px;
  53. padding: 10px;
  54. align-self: flex-end;
  55. i {
  56. padding: 10px;
  57. background: #1d66dc;
  58. border-radius: 50%;
  59. }
  60. }
  61. img {
  62. height: 24px;
  63. width: 24px;
  64. }
  65. .img-container {
  66. padding: 6px;
  67. height: 24px;
  68. width: 24px;
  69. background-color: #419fe5;
  70. border-radius: 50%;
  71. overflow: visible;
  72. }
  73. &.service .img-container {
  74. background-color: #f59969;
  75. }
  76. &.todo .img-container {
  77. background-color: #20b5ae;
  78. }
  79. &.user .img-container {
  80. background-color: #595cac;
  81. }
  82. }
  83. }
  84. }
  85. </style>