Переглянути джерело

Univate.2 > Additions to buy Timeshare

master
George Williams 4 роки тому
джерело
коміт
f86f37025e

BIN
public/img/apple-touch-icon.png Переглянути файл


BIN
public/img/icons/Walking.png Переглянути файл


BIN
public/img/icons/YouTube.png Переглянути файл


BIN
public/img/icons/facebook.png Переглянути файл


BIN
public/img/icons/twitter.png Переглянути файл


BIN
public/img/icons/www.png Переглянути файл


+ 61
- 0
src/components/timeshare/resort/unit/media.vue Переглянути файл

@@ -0,0 +1,61 @@
1
+<template>
2
+  <div class="container">
3
+    <div class="row justify-content-md-center">
4
+      <div v-for="(media, i) in resortMedia" :key="i">
5
+        <div v-if="media.prCategory === 'Facebook'">
6
+          <a :href="`${media.prSite}`" target="_blank">
7
+            <img src="../../../../../public/img/icons/facebook.png" class="img_media" />
8
+          </a>
9
+        </div>
10
+        <div v-if="media.prCategory === 'Twitter'">
11
+          <a :href="`${media.prSite}`" target="_blank">
12
+            <img src="../../../../../public/img/icons/twitter.png" class="img_media" />
13
+          </a>
14
+        </div>
15
+        <div v-if="media.prCategory === 'YouTube'">
16
+          <a :href="`${media.prSite}`" target="_blank">
17
+            <img src="../../../../../public/img/icons/YouTube.png" class="img_media" />
18
+          </a>
19
+        </div>
20
+        <div v-if="media.prCategory === 'Website'">
21
+          <a :href="`${media.prSite}`" target="_blank">
22
+            <img src="../../../../../public/img/icons/www.png" class="img_media" />
23
+          </a>
24
+        </div>
25
+        <div v-if="media.prCategory === 'WalkThrough'">
26
+          <a :href="`${media.prSite}`" target="_blank">
27
+            <img src="../../../../../public/img/icons/Walking.png" class="img_media" />
28
+          </a>
29
+        </div>
30
+      </div>
31
+    </div>
32
+  </div>
33
+</template>
34
+
35
+<script>
36
+import { mapState, mapActions } from "vuex";
37
+
38
+export default {
39
+  name: "resortMedia",
40
+  props: {
41
+    resortCode: ""
42
+  },
43
+  methods: {
44
+    ...mapActions("resort", ["getResortMedia"])
45
+  },
46
+  computed: {
47
+    ...mapState("resort", ["resortMedia"])
48
+  },
49
+  mounted() {
50
+    this.getResortMedia(this.resortCode);
51
+  }
52
+};
53
+</script>
54
+
55
+<style lang="scss" scoped>
56
+.img_media {
57
+  height: 100px;
58
+  width: 100px;
59
+  margin: 10px;
60
+}
61
+</style>

+ 8
- 10
src/components/timeshare/resort/unit/summarySection.vue Переглянути файл

@@ -14,7 +14,7 @@
14 14
       <div class="col-md-12 col-lg-8 summarySection">
15 15
         <h4>
16 16
           Unit {{ week ? week.unitNumber : "" }} | {{ week ? week.bedrooms : "" }} Bedroom/{{
17
-            week ? week.maxSleep : ""
17
+          week ? week.maxSleep : ""
18 18
           }}
19 19
           Sleeper
20 20
         </h4>
@@ -54,9 +54,7 @@
54 54
               style="color:white"
55 55
               data-toggle="modal"
56 56
               data-target="#myModal"
57
-            >
58
-              Make an Offer
59
-            </button>
57
+            >Make an Offer</button>
60 58
             <div class="col-md-12">
61 59
               <div id="myModal" class="modal fade" role="dialog">
62 60
                 <div class="modal-dialog modal-lg">
@@ -92,22 +90,22 @@ import gallerySection from "../gallerySection";
92 90
 export default {
93 91
   components: {
94 92
     makeOffer,
95
-    gallerySection
93
+    gallerySection,
96 94
   },
97 95
   computed: {
98 96
     ...mapState("resort", ["resort", "description", "images", "layout"]),
99 97
 
100 98
     ...mapGetters({
101
-      weekById: "weekList/weekById"
99
+      weekById: "weekList/weekById",
102 100
     }),
103 101
     week() {
104 102
       return this.weekById(this.resortCode, this.unitNumber);
105
-    }
103
+    },
106 104
     // ...mapState('week', ['currentWeek']),
107 105
   },
108 106
   props: {
109 107
     resortCode: {},
110
-    unitNumber: {}
108
+    unitNumber: {},
111 109
   },
112 110
   methods: {
113 111
     ...mapActions("weekList", ["getWeeks", "applyResortFilter"]),
@@ -119,8 +117,8 @@ export default {
119 117
         return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
120 118
       }
121 119
       return "";
122
-    }
123
-  }
120
+    },
121
+  },
124 122
 };
125 123
 </script>
126 124
 

+ 15
- 9
src/components/timeshare/resort/unit/tabSection.vue Переглянути файл

@@ -10,7 +10,8 @@
10 10
           role="tab"
11 11
           aria-controls="home"
12 12
           aria-selected="true"
13
-          ><h2>Facilities</h2>
13
+        >
14
+          <h2>Facilities</h2>
14 15
         </a>
15 16
       </li>
16 17
       <li class="nav-item">
@@ -22,7 +23,8 @@
22 23
           role="tab"
23 24
           aria-controls="profile"
24 25
           aria-selected="false"
25
-          ><h2>Directions</h2>
26
+        >
27
+          <h2>Directions</h2>
26 28
         </a>
27 29
       </li>
28 30
       <li class="nav-item">
@@ -34,7 +36,8 @@
34 36
           role="tab"
35 37
           aria-controls="contact"
36 38
           aria-selected="false"
37
-          ><h2>Layout</h2>
39
+        >
40
+          <h2>Layout</h2>
38 41
         </a>
39 42
       </li>
40 43
       <li class="nav-item">
@@ -46,7 +49,8 @@
46 49
           role="tab"
47 50
           aria-controls="contact"
48 51
           aria-selected="false"
49
-          ><h2>Media</h2>
52
+        >
53
+          <h2>Media</h2>
50 54
         </a>
51 55
       </li>
52 56
     </ul>
@@ -67,7 +71,7 @@
67 71
         <gallery :images="layoutImages" :index="index" @close="index = null"></gallery>
68 72
       </div>
69 73
       <div class="tab-pane fade" id="media" role="tabpanel" aria-labelledby="contact-tab">
70
-        ...
74
+        <media :resortCode="resortCode" />
71 75
       </div>
72 76
     </div>
73 77
   </div>
@@ -80,27 +84,29 @@ import directions from "./directions";
80 84
 import gallery from "../../../shared/gallerySlideShow";
81 85
 import AOS from "aos";
82 86
 import "aos/dist/aos.css";
87
+import media from "./media";
83 88
 
84 89
 export default {
85 90
   components: {
86 91
     facilities,
87 92
     directions,
88
-    gallery
93
+    gallery,
94
+    media,
89 95
   },
90 96
   created() {
91 97
     AOS.init();
92 98
   },
93 99
   data() {
94 100
     return {
95
-      index: null
101
+      index: null,
96 102
     };
97 103
   },
98 104
   props: {
99 105
     resortCode: {},
100 106
     resortCoords: {},
101 107
     layoutImages: {},
102
-    resortName: ""
103
-  }
108
+    resortName: "",
109
+  },
104 110
 };
105 111
 </script>
106 112
 

+ 6
- 6
src/components/timeshare/resort/unit/unitPage.vue Переглянути файл

@@ -32,11 +32,11 @@ export default {
32 32
     gallerySection,
33 33
     tabSection,
34 34
     summarySection,
35
-    carouselSection
35
+    carouselSection,
36 36
   },
37 37
   props: {
38 38
     resortCode: {},
39
-    unitNumber: {}
39
+    unitNumber: {},
40 40
   },
41 41
   mounted() {
42 42
     this.initResort(this.resortCode);
@@ -51,7 +51,7 @@ export default {
51 51
     ...mapState("resort", ["resort", "description", "images", "layout"]),
52 52
 
53 53
     ...mapGetters({
54
-      weekById: "weekList/weekById"
54
+      weekById: "weekList/weekById",
55 55
     }),
56 56
     week() {
57 57
       return this.weekById(this.resortCode, this.unitNumber);
@@ -60,7 +60,7 @@ export default {
60 60
       var layouts = [];
61 61
       layouts.push(this.layout);
62 62
       return layouts;
63
-    }
63
+    },
64 64
     // ...mapState('week', ['currentWeek']),
65 65
   },
66 66
   methods: {
@@ -73,8 +73,8 @@ export default {
73 73
         return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
74 74
       }
75 75
       return "";
76
-    }
77
-  }
76
+    },
77
+  },
78 78
 };
79 79
 </script>
80 80
 

+ 12
- 1
src/store/modules/timeshare/resort.js Переглянути файл

@@ -9,7 +9,8 @@ export default {
9 9
     resort: {},
10 10
     images: [],
11 11
     layout: "",
12
-    description: ""
12
+    description: "",
13
+    resortMedia: undefined
13 14
   },
14 15
   mutations: {
15 16
     setResort(state, resort) {
@@ -31,6 +32,9 @@ export default {
31 32
     },
32 33
     setResorts(state, list) {
33 34
       state.resorts = list;
35
+    },
36
+    setResortMedia(state, media) {
37
+      state.resortMedia = media;
34 38
     }
35 39
   },
36 40
   getters: {},
@@ -123,6 +127,13 @@ export default {
123 127
           })
124 128
           .catch(error => reject(new Error(error.message)));
125 129
       });
130
+    },
131
+    getResortMedia({ commit }, resortCode) {
132
+      axios
133
+        .get(
134
+          `https://www.tradeunipoint.com/unibackend/seam/resource/rest/products/social/${resortCode}`
135
+        )
136
+        .then(result => commit("setResortMedia", result.data));
126 137
     }
127 138
   }
128 139
 };

Завантаження…
Відмінити
Зберегти