reservation.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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. // console.log(userInfo.value)
  44. if (!userInfo.value) {
  45. uni.reLaunch({
  46. url: '/pages/index/index'
  47. })
  48. }
  49. })
  50. const goPage = (url) => {
  51. uni.navigateTo({
  52. url
  53. })
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .container {
  58. min-height: 100vh;
  59. background-color: #f1f6fe;
  60. // 背景图片区域样式
  61. .img_bg {
  62. position: absolute;
  63. top: -70rpx;
  64. right: 0;
  65. width: 589rpx;
  66. height: 320rpx;
  67. pointer-events: none;
  68. }
  69. // 背景墙区域样式
  70. .wall_bg {
  71. width: 750rpx;
  72. height: 340rpx;
  73. background-color: #0061ff;
  74. border-radius: 0 0 10rpx 10rpx;
  75. }
  76. // 背景文字区域样式
  77. .text_bg {
  78. position: absolute;
  79. top: 56rpx;
  80. left: 20rpx;
  81. color: #fff;
  82. font-size: 54rpx;
  83. font-weight: bold;
  84. }
  85. // 主体内容区域样式
  86. .body {
  87. position: relative;
  88. margin: auto;
  89. margin-top: -160rpx;
  90. padding: 0 50rpx;
  91. box-sizing: border-box;
  92. width: 710rpx;
  93. height: 775rpx;
  94. border-radius: 12rpx;
  95. background-color: #fff;
  96. overflow: hidden;
  97. .body_title {
  98. margin: 44rpx 0 34rpx 0;
  99. font-size: 40rpx;
  100. font-weight: bold;
  101. }
  102. .body_box {
  103. margin: auto;
  104. margin-bottom: 40rpx;
  105. padding: 0 30rpx 0 45rpx;
  106. box-sizing: border-box;
  107. display: flex;
  108. align-items: center;
  109. width: 607rpx;
  110. height: 110rpx;
  111. border-radius: 18rpx;
  112. background-color: #f2f4f9;
  113. .box_img {
  114. width: 40rpx;
  115. height: 40rpx;
  116. }
  117. .box_text {
  118. margin-left: 22rpx;
  119. color: #0061ff;
  120. font-size: 28rpx;
  121. }
  122. .box_icon {
  123. margin-left: auto;
  124. width: 31rpx;
  125. height: 31rpx;
  126. }
  127. }
  128. }
  129. }
  130. </style>