Browse Source

Added description

master
Kobus 5 years ago
parent
commit
c5c5e21243

+ 9
- 2
src/components/timeshare/resort/resortPage.vue View File

@@ -133,7 +133,7 @@
133 133
               <div class="btn btn-primary" @click="routerGoTo('/timeshare/buy')">Back to Region</div>
134 134
               <hr />
135 135
             </div>
136
-            {{resort.prNotes}}
136
+            {{description}}
137 137
             <hr />
138 138
             <div class="row mb-4">
139 139
               <div class="col-md-4">
@@ -225,7 +225,14 @@ export default {
225 225
     this.initResort(this.resortCode);
226 226
   },
227 227
   computed: {
228
-    ...mapState('resort', ['resort', 'image1', 'image2', 'image3', 'layout']),
228
+    ...mapState('resort', [
229
+      'resort',
230
+      'description',
231
+      'image1',
232
+      'image2',
233
+      'image3',
234
+      'layout',
235
+    ]),
229 236
     mapUrl() {
230 237
       return this.resort
231 238
         ? 'http://maps.google.com/maps?q='

+ 16
- 0
src/store/modules/timeshare/resort.js View File

@@ -10,11 +10,15 @@ export default {
10 10
     image2: '',
11 11
     image3: '',
12 12
     layout: '',
13
+    description: '',
13 14
   },
14 15
   mutations: {
15 16
     setResort(state, resort) {
16 17
       state.resort = resort;
17 18
     },
19
+    setDescription(state, description) {
20
+      state.description = description;
21
+    },
18 22
     clear(state) {
19 23
       state.resort = {};
20 24
       state.image1 = '';
@@ -43,11 +47,23 @@ export default {
43 47
     }, resortCode) {
44 48
       commit('clear');
45 49
       dispatch('getResort', resortCode);
50
+      dispatch('getDescription', resortCode);
46 51
       dispatch('getImage1', resortCode);
47 52
       dispatch('getImage2', resortCode);
48 53
       dispatch('getImage3', resortCode);
49 54
       dispatch('getLayout', resortCode);
50 55
     },
56
+    getDescription({
57
+      commit,
58
+    }, resortCode) {
59
+      axios.get(
60
+        `https://www.tradeunipoint.com/unibackend/seam/resource/rest/products/${resortCode}/dsc`,
61
+      )
62
+        .then((result) => {
63
+          commit('setDescription', result.data);
64
+        })
65
+        .catch(console.error);
66
+    },
51 67
     getResort({
52 68
       commit,
53 69
     }, resortCode) {

Loading…
Cancel
Save