您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

buyPage.vue 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <template>
  2. <!-- eslint-disable max-len -->
  3. <section class="collapse-items">
  4. <div class="container">
  5. <div class="row">
  6. <div class="col-sm-12">
  7. <div class="tobuy-img-box">
  8. <img
  9. src="img/buy.jpg"
  10. alt="Timeshare To Buy"
  11. class="img-fluid"
  12. style="width:800px;height:400px; border-radius:10px"
  13. />
  14. </div>
  15. <div class="sinse-box" style="opacity:0.7; border: white solid 3px; border-radius: 15px">
  16. <h3 class="sinse-title">Timeshare To Buy</h3>
  17. </div>
  18. </div>
  19. <div class="container col-md-10">
  20. <br />
  21. <div class="row">
  22. <div class="col-md-12 text-left">
  23. <p>
  24. The resorts have been listed in their relevant provinces.
  25. Please select the resort for which you would like to view
  26. the available weeks and then select the weeks that interest
  27. you on the resort page.
  28. </p>
  29. <p>
  30. Arrival and departure dates are indicated but please note
  31. that these dates may vary annually.
  32. </p>
  33. <p>
  34. As with any property related sale, upon purchasing the holiday
  35. of your choice, there will be a transfer fee payable for the
  36. change of ownership. This fee will depend on the relevant resort
  37. or managing agent.
  38. </p>
  39. </div>
  40. </div>
  41. <br />
  42. <div class="row mb-4">
  43. <div class="container col-md-4">
  44. <div class="accordion" id="accordionExample">
  45. <div class="card" v-for="(region, r) in regions" :key="r">
  46. <a
  47. class="mb-0 color-text-a"
  48. data-toggle="collapse"
  49. :data-target="'#collapse' + region.id"
  50. aria-expanded="false"
  51. :aria-controls="'collapse' + region.id"
  52. >
  53. <div :id="'header' + region.id">
  54. <h5
  55. class="btn btn-link font-weight-bold color-b"
  56. @mouseover="updateMapProvince(region.regionName)"
  57. >{{ region.regionName }}</h5>
  58. </div>
  59. </a>
  60. <div
  61. :id="'collapse' + region.id"
  62. class="collapse"
  63. :aria-labelledby="'header' + region.id"
  64. data-parent="#accordionExample"
  65. >
  66. <div class="card-body">
  67. <p class="mb-0" v-for="(resort, i) in region.resorts" :key="i">
  68. <a
  69. class="cursor-pointer"
  70. href="#"
  71. @click="routerGoTo('/resort/' + resort.resortCode)"
  72. @mouseover="updateMap(resort.resortCode)"
  73. >{{resort.resortName}}</a>
  74. <br />
  75. </p>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. <div class="col-md-8">
  82. <div class="tab-content" id="myTabContent">
  83. <div
  84. class="tab-pane fade show active"
  85. id="directions"
  86. role="tabpanel"
  87. aria-labelledby="directions-tab"
  88. >
  89. <iframe
  90. :src="mapUrl"
  91. width="100%"
  92. height="450"
  93. frameborder="0"
  94. style="border-radius:10px"
  95. allowfullscreen
  96. ></iframe>
  97. <br />
  98. <small>
  99. <a
  100. :href="mapUrl"
  101. style="color:#60CBEB;text-align:left"
  102. target="_blank"
  103. >See map bigger</a>
  104. </small>
  105. </div>
  106. <div
  107. class="tab-pane fade"
  108. id="resort-layout"
  109. role="tabpanel"
  110. aria-labelledby="resort-layout-tab"
  111. >
  112. <img class="img-fluid" :src="layout" alt="Resort Layout" />
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </section>
  121. </template>
  122. <script>
  123. import { mapState, mapActions } from 'vuex';
  124. export default {
  125. name: 'TimeshareToBuy',
  126. data() {
  127. return {
  128. myMap: 'SouthAfrica',
  129. myZoom: 5,
  130. };
  131. },
  132. mounted() {
  133. this.getRegions();
  134. },
  135. computed: {
  136. ...mapState('timeshareBuy', ['detailedRegion', 'resort']),
  137. mapUrl() {
  138. // return 'http://maps.google.com/maps/place/Gauteng/';
  139. return `http://maps.google.com/maps?q=${this.myMap}&z=${this.myZoom}&output=embed`;
  140. },
  141. regions() {
  142. return _.sortBy(this.detailedRegion, r => r.regionName);
  143. },
  144. },
  145. methods: {
  146. ...mapActions('timeshareBuy', ['getRegions', 'getResort']),
  147. routerGoTo(goTo) {
  148. this.$router.push(goTo);
  149. },
  150. updateMap(resortCode) {
  151. this.myMap = 'SouthAfrice';
  152. this.getResort(resortCode);
  153. // `http://maps.google.com/maps?q=${this.resort.prLatitude},${this.resort.prLongitude}&z=7&output=embed`;
  154. this.myMap = `${this.resort.prLatitude},${this.resort.prLongitude}`;
  155. this.myZoom = 10;
  156. },
  157. updateMapProvince(province) {
  158. this.myMap = province.replace(/\s/g, '');
  159. this.myZoom = 7;
  160. },
  161. },
  162. };
  163. </script>