Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

buyPage.vue 5.5KB

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