booked-detail.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <script setup lang='ts'>
  2. import { sceneBookingApi } from '@/api/api/sceneBooking';
  3. const bookedDetail = ref({} as any)
  4. const route = useRoute()
  5. const getDetailById = async() => {
  6. const res:any = await sceneBookingApi.getDetailByIdAPI(route.params.id)
  7. if(res.code === 0){
  8. bookedDetail.value = res.data
  9. }
  10. }
  11. onMounted(() => {
  12. getDetailById()
  13. })
  14. </script>
  15. <template>
  16. <div class='detail-box'>
  17. <div class="title">
  18. <img src="@/assets/images/cicle.png" alt="">
  19. <div class="title-content">我的预约</div>
  20. </div>
  21. <div class="info-box">
  22. <div>参观日期:{{ bookedDetail.bookDate + ' ' + bookedDetail.time }}</div>
  23. <div>当前状态:{{ bookedDetail.status === 0 ? '未验证' : '已验证' }}</div>
  24. </div>
  25. <div class="info-box-card" v-for="(item, index) in bookedDetail.rtf" :key="index">
  26. <div>参观人姓名:{{ item.name }}</div>
  27. <div>参观人电话:{{ item.phone }}</div>
  28. <div>{{ item.type + '号:' + item.num }}</div>
  29. </div>
  30. <div class="code-box" >
  31. <img src="@/assets/images/code.png" alt="">
  32. <div>验证码:56717</div>
  33. </div>
  34. </div>
  35. </template>
  36. <style lang='less' scoped>
  37. .detail-box {
  38. width: 100%;
  39. height: 100%;
  40. background: #F7F3E8;
  41. overflow: auto;
  42. padding: 40px 20px;
  43. font-family: SourceHanSansCN-Regular;
  44. .title {
  45. font-size: 1.4em;
  46. color: #333333;
  47. font-weight: bold;
  48. position: relative;
  49. // line-height: 1.6em;
  50. display: flex;
  51. align-items: flex-end;
  52. margin-bottom: 10px;
  53. img {
  54. position: absolute;
  55. left: 0;
  56. top: 0;
  57. height: 1.6em;
  58. }
  59. .title-content {
  60. // position: absolute;
  61. position: relative;
  62. left: 0;
  63. top: 0;
  64. height: 1.4em;
  65. z-index: 2;
  66. line-height: 1.6em;
  67. color: #333333;
  68. margin-top: 1%;
  69. font-family: SourceHanSansCN-Bold;
  70. }
  71. }
  72. .info-box {
  73. margin-top: 20px;
  74. color: #333333;
  75. line-height: 2em;
  76. font-family: SourceHanSansCN-Regular;
  77. }
  78. .info-box-card{
  79. width: 100%;
  80. border-radius: 10px;
  81. background: url(@/assets/images/booked-card.png);
  82. background-size: 100% 100%;
  83. margin-top: 30px;
  84. color: #F7F3E8;
  85. line-height: 3em;
  86. font-size: 1.1em;
  87. padding: 5% 8%;
  88. }
  89. .code-box{
  90. width: 100%;
  91. display: flex;
  92. flex-direction: column;
  93. justify-content: center;
  94. align-items: center;
  95. margin-top: 10%;
  96. img{
  97. width: 50%;
  98. margin-bottom: 10px;
  99. }
  100. div {
  101. width: 50%;
  102. text-align: center;
  103. color: #333333;
  104. }
  105. }
  106. }
  107. </style>