reservation.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <template>
  2. <view class="container">
  3. <!-- 背景图片区域 -->
  4. <img class="img_bg" src="../../static/images/center-bg.png" />
  5. <!-- 背景墙区域 -->
  6. <view class="wall_bg"></view>
  7. <!-- 背景文字区域 -->
  8. <view class="text_bg">欢迎使用访客预约</view>
  9. <!-- 主体内容区域 -->
  10. <view class="body">
  11. <view class="body_title">选择预约方式</view>
  12. <!-- 学生家长预约选项区域 -->
  13. <view class="body_box" @click="goPage('/pagesReservation/register/register?type=1')" v-if="userInfo.identityId == 1">
  14. <img class="box_img" src="../../static/images/reservation.png" />
  15. <view class="box_text">学生家长预约</view>
  16. <img class="box_icon" src="../../static/images/right-blue.png" />
  17. </view>
  18. <!-- 其他访客预约选项区域 -->
  19. <view class="body_box" @click="goPage('/pagesReservation/register/register?type=2')" v-if="userInfo.identityId != 1">
  20. <img class="box_img" src="../../static/images/reservation2.png" />
  21. <view class="box_text">其他访客预约</view>
  22. <img class="box_icon" src="../../static/images/right-blue.png" />
  23. </view>
  24. <!-- 生成邀请预约码选项区域 -->
  25. <!-- <view class="body_box" @click="goPage('/pagesReservation/QRCode/QRCode')">
  26. <img class="box_img" src="../../static/images/reservation3.png" />
  27. <view class="box_text">生成邀请预约码</view>
  28. <img class="box_icon" src="../../static/images/right-blue.png" />
  29. </view> -->
  30. </view>
  31. <!-- 底部导航栏区域 -->
  32. <tabber />
  33. </view>
  34. </template>
  35. <script setup>
  36. import { ref } from 'vue'
  37. import { onLoad } from '@dcloudio/uni-app'
  38. import tabber from '@/components/tabber.vue'
  39. // 用户信息
  40. const userInfo = ref('')
  41. onLoad(() => {
  42. userInfo.value = uni.getStorageSync('userInfo')
  43. })
  44. const goPage = (url) => {
  45. uni.navigateTo({
  46. url
  47. })
  48. }
  49. </script>
  50. <style lang="scss" scoped>
  51. .container {
  52. min-height: 100vh;
  53. background-color: #f1f6fe;
  54. // 背景图片区域样式
  55. .img_bg {
  56. position: absolute;
  57. top: -70rpx;
  58. right: 0;
  59. width: 589rpx;
  60. height: 320rpx;
  61. pointer-events: none;
  62. }
  63. // 背景墙区域样式
  64. .wall_bg {
  65. width: 750rpx;
  66. height: 340rpx;
  67. background-color: #0061ff;
  68. border-radius: 0 0 10rpx 10rpx;
  69. }
  70. // 背景文字区域样式
  71. .text_bg {
  72. position: absolute;
  73. top: 56rpx;
  74. left: 20rpx;
  75. color: #fff;
  76. font-size: 54rpx;
  77. font-weight: bold;
  78. }
  79. // 主体内容区域样式
  80. .body {
  81. position: relative;
  82. margin: auto;
  83. margin-top: -160rpx;
  84. padding: 0 50rpx;
  85. box-sizing: border-box;
  86. width: 710rpx;
  87. height: 775rpx;
  88. border-radius: 12rpx;
  89. background-color: #fff;
  90. overflow: hidden;
  91. .body_title {
  92. margin: 44rpx 0 34rpx 0;
  93. font-size: 40rpx;
  94. font-weight: bold;
  95. }
  96. .body_box {
  97. margin: auto;
  98. margin-bottom: 40rpx;
  99. padding: 0 30rpx 0 45rpx;
  100. box-sizing: border-box;
  101. display: flex;
  102. align-items: center;
  103. width: 607rpx;
  104. height: 110rpx;
  105. border-radius: 18rpx;
  106. background-color: #f2f4f9;
  107. .box_img {
  108. width: 40rpx;
  109. height: 40rpx;
  110. }
  111. .box_text {
  112. margin-left: 22rpx;
  113. color: #0061ff;
  114. font-size: 28rpx;
  115. }
  116. .box_icon {
  117. margin-left: auto;
  118. width: 31rpx;
  119. height: 31rpx;
  120. }
  121. }
  122. }
  123. }
  124. </style>