office.vue 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <!-- home -->
  2. <template>
  3. <div class="office-index">
  4. <pure-image :bg-image="require('@/assets/office/1.png')"></pure-image>
  5. <office-image class="office-navi" @goto="handleGoto" />
  6. <div v-for="(item, index) in list" :key="item.image">
  7. <yz-modal :visible="visible[index]" class="office-modal">
  8. <pure-image :bg-image="item.image"></pure-image>
  9. <div class="back-sign" @click="cancelShow(index)">
  10. <img :src="item.backSign" alt />
  11. </div>
  12. </yz-modal>
  13. </div>
  14. <div class="back-sign index-back" @click="handleGotoIndex(index)">
  15. <img :src="backSignImg" alt />
  16. </div>
  17. </div>
  18. </template>
  19. <script>
  20. const backSignImg = require('@/assets/office/1-2.png')
  21. const backSignImg2 = require('@/assets/images/apartment/backSign-2.png')
  22. export default {
  23. components: {
  24. PureImage: () => import('./components/PureImage.vue'),
  25. // SwiperImage: () => import('./components/SwiperImage.vue'),
  26. // ApartmentNavi: () => import('./components/ApartmentNavi.vue'),
  27. OfficeImage: () => import('./components/OfficeImage.vue')
  28. },
  29. data() {
  30. return {
  31. backSignImg,
  32. backSignImg2,
  33. visible: Array(6).fill(false),
  34. list: [
  35. {
  36. image: require('@/assets/office/2-1.png'),
  37. color: '#f0f0f0',
  38. backSign: backSignImg
  39. },
  40. {
  41. image: require('@/assets/office/3-1.png'),
  42. color: '#f0f0f0',
  43. backSign: backSignImg2
  44. },
  45. {
  46. image: require('@/assets/office/4-1.png'),
  47. color: '#f0f0f0',
  48. backSign: backSignImg
  49. },
  50. {
  51. image: require('@/assets/office/6-1.png'),
  52. color: '#f0f0f0',
  53. backSign: backSignImg
  54. },
  55. {
  56. image: require('@/assets/office/5-1.png'),
  57. color: '#f0f0f0',
  58. backSign: backSignImg
  59. }
  60. ],
  61. houseList: [
  62. {
  63. image: require('@/assets/images/apartment/7-1.jpg'),
  64. color: '#f0f0f0'
  65. },
  66. {
  67. image: require('@/assets/images/apartment/7-2.jpg'),
  68. color: '#f0f0f0'
  69. },
  70. {
  71. image: require('@/assets/images/apartment/7-3.jpg'),
  72. color: '#f0f0f0'
  73. },
  74. {
  75. image: require('@/assets/images/apartment/7-4.jpg'),
  76. color: '#f0f0f0'
  77. },
  78. {
  79. image: require('@/assets/images/apartment/7-5.jpg'),
  80. color: '#f0f0f0'
  81. },
  82. {
  83. image: require('@/assets/images/apartment/7-6.jpg'),
  84. color: '#f0f0f0'
  85. },
  86. {
  87. image: require('@/assets/images/apartment/7-7.jpg'),
  88. color: '#f0f0f0'
  89. },
  90. {
  91. image: require('@/assets/images/apartment/7-8.jpg'),
  92. color: '#f0f0f0'
  93. }
  94. ]
  95. }
  96. },
  97. methods: {
  98. handleGoto(inx) {
  99. // inx 是从1开始的
  100. this.$set(this.visible, inx - 1, true)
  101. },
  102. cancelShow(inx) {
  103. this.$set(this.visible, inx, false)
  104. },
  105. handleGotoIndex(inx) {
  106. this.$router.push({ path: '/' })
  107. }
  108. }
  109. }
  110. </script>
  111. <style lang="scss" scoped>
  112. .office-index {
  113. height: 100%;
  114. position: relative;
  115. overflow: hidden;
  116. .office-modal {
  117. position: absolute;
  118. width: 100%;
  119. height: 100%;
  120. bottom: 0;
  121. left: 0;
  122. }
  123. .office-navi {
  124. position: absolute;
  125. width: 100%;
  126. height: 40%;
  127. bottom: 0;
  128. left: 0;
  129. }
  130. .back-sign {
  131. position: absolute;
  132. z-index: 500;
  133. right: 10px;
  134. bottom: -24px;
  135. width: 96px;
  136. height: 78px;
  137. img {
  138. width: 100%;
  139. height: 100%;
  140. }
  141. }
  142. }
  143. </style>