|
@@ -1,8 +1,12 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div>
|
3
|
3
|
<!-- <carouselSection :propertyImages="propertyImages" @Loaded="CarouselDone" /> -->
|
4
|
|
- <main id="main" style="margin-top:20px">
|
5
|
|
- <contentSection :property="property" :propertyImages="propertyImages" @Loaded="ContentDone" />
|
|
4
|
+ <main id="main" style="margin-top: 20px">
|
|
5
|
+ <contentSection
|
|
6
|
+ :property="property"
|
|
7
|
+ :propertyImages="propertyImages"
|
|
8
|
+ @Loaded="ContentDone"
|
|
9
|
+ />
|
6
|
10
|
</main>
|
7
|
11
|
<div v-if="Wait" id="preloader"></div>
|
8
|
12
|
</div>
|
|
@@ -13,15 +17,14 @@
|
13
|
17
|
|
14
|
18
|
import { mapState, mapActions } from "vuex";
|
15
|
19
|
import makeOffer from "../../../processFlow/makeOffer";
|
16
|
|
-import carouselSection from "./carouselSection";
|
|
20
|
+//import carouselSection from "./carouselSection";
|
17
|
21
|
import contentSection from "./contentSection";
|
18
|
22
|
|
19
|
23
|
export default {
|
20
|
24
|
name: "property",
|
21
|
25
|
components: {
|
22
|
26
|
makeOffer,
|
23
|
|
- carouselSection,
|
24
|
|
- contentSection
|
|
27
|
+ contentSection,
|
25
|
28
|
},
|
26
|
29
|
data() {
|
27
|
30
|
return {
|
|
@@ -29,34 +32,23 @@ export default {
|
29
|
32
|
date: new Date(),
|
30
|
33
|
boolLoaded: false,
|
31
|
34
|
wait: false,
|
32
|
|
- carouselLoaded: false,
|
33
|
|
- contentloaded: false
|
|
35
|
+ contentloaded: false,
|
34
|
36
|
};
|
35
|
37
|
},
|
36
|
|
- async mounted() {
|
37
|
|
- this.wait = true;
|
38
|
|
- this.carouselLoaded = false;
|
39
|
|
- this.contentloaded = false;
|
|
38
|
+ mounted() {
|
40
|
39
|
this.clearPropertyImages();
|
41
|
|
- await this.getDisplayProperty(this.$route.params.id);
|
42
|
|
-
|
43
|
|
- // await this.getPropertyImages(this.$route.params.id);
|
44
|
|
- // setTimeout(() => {
|
45
|
|
- // if (this.propertyImages.length > 0) {
|
46
|
|
- // this.boolLoaded = true;
|
47
|
|
- // }
|
48
|
|
- // }, 100);
|
49
|
|
-
|
50
|
|
- //this.mayEditProperty(this.$route.params.id);
|
|
40
|
+ this.getDisplayProperty(this.$route.params.id).then((data) => {
|
|
41
|
+ this.wait = false;
|
|
42
|
+ });
|
51
|
43
|
},
|
52
|
44
|
computed: {
|
53
|
45
|
...mapState("property", ["property", "propertyImages"]),
|
54
|
46
|
Wait() {
|
55
|
|
- if (this.wait && !this.carouselLoaded && !this.contentloaded) {
|
|
47
|
+ if (this.wait && !this.contentloaded) {
|
56
|
48
|
return true;
|
57
|
49
|
}
|
58
|
50
|
return false;
|
59
|
|
- }
|
|
51
|
+ },
|
60
|
52
|
},
|
61
|
53
|
methods: {
|
62
|
54
|
...mapActions("property", ["getDisplayProperty", "clearPropertyImages"]),
|
|
@@ -77,11 +69,11 @@ export default {
|
77
|
69
|
},
|
78
|
70
|
ContentDone() {
|
79
|
71
|
this.contentloaded = true;
|
80
|
|
- }
|
|
72
|
+ },
|
81
|
73
|
},
|
82
|
74
|
beforeDestroy() {
|
83
|
75
|
this.clearPropertyImages();
|
84
|
|
- }
|
|
76
|
+ },
|
85
|
77
|
};
|
86
|
78
|
</script>
|
87
|
79
|
|