浏览代码

Small Fixes and Changes

master
30117125 4 年前
父节点
当前提交
37029d6c8f

+ 5
- 0
package-lock.json 查看文件

12315
       "integrity": "sha512-TigfiZUs7SN3Z6uxKilqJUtYxte8vp0F4QxabCli6hkKPqU97JzAZc3P7AL6omkRAd2DMI26fOrIGjuALTvXww==",
12315
       "integrity": "sha512-TigfiZUs7SN3Z6uxKilqJUtYxte8vp0F4QxabCli6hkKPqU97JzAZc3P7AL6omkRAd2DMI26fOrIGjuALTvXww==",
12316
       "dev": true
12316
       "dev": true
12317
     },
12317
     },
12318
+    "vue-currency-input": {
12319
+      "version": "1.22.1",
12320
+      "resolved": "https://registry.npmjs.org/vue-currency-input/-/vue-currency-input-1.22.1.tgz",
12321
+      "integrity": "sha512-5cdMt5lHFx+YFeljAAp8r2gI5S6oykywER5xiFsryk4XSSklezdv+v4VnKCgWaYyZmQ69x0Qs5qqrxindoFjTg=="
12322
+    },
12318
     "vue-disable-autocomplete": {
12323
     "vue-disable-autocomplete": {
12319
       "version": "0.0.4",
12324
       "version": "0.0.4",
12320
       "resolved": "https://registry.npmjs.org/vue-disable-autocomplete/-/vue-disable-autocomplete-0.0.4.tgz",
12325
       "resolved": "https://registry.npmjs.org/vue-disable-autocomplete/-/vue-disable-autocomplete-0.0.4.tgz",

+ 1
- 0
package.json 查看文件

28
     "v-file-upload": "^3.1.7",
28
     "v-file-upload": "^3.1.7",
29
     "vue": "^2.6.11",
29
     "vue": "^2.6.11",
30
     "vue-carousel": "^0.18.0",
30
     "vue-carousel": "^0.18.0",
31
+    "vue-currency-input": "^1.22.1",
31
     "vue-disable-autocomplete": "0.0.4",
32
     "vue-disable-autocomplete": "0.0.4",
32
     "vue-eva-icons": "^1.1.1",
33
     "vue-eva-icons": "^1.1.1",
33
     "vue-js-modal": "^1.3.33",
34
     "vue-js-modal": "^1.3.33",

+ 1
- 0
public/css/newStyle.css 查看文件

952
 #contact {
952
 #contact {
953
   padding: 10px 0;
953
   padding: 10px 0;
954
   background-color: #efefef;
954
   background-color: #efefef;
955
+  scroll-behavior: smooth;
955
 }
956
 }
956
 
957
 
957
 #contact p {
958
 #contact p {

+ 5
- 2
src/components/home/carouselSection.vue 查看文件

274
 /* Small devices (portrait tablets and large phones, 600px and up) */
274
 /* Small devices (portrait tablets and large phones, 600px and up) */
275
 @media only screen and (min-width: 600px) {
275
 @media only screen and (min-width: 600px) {
276
   .introContentAdjust {
276
   .introContentAdjust {
277
-    margin-top: -15px !important;
277
+    margin-top: 60px !important;
278
   }
278
   }
279
 }
279
 }
280
 
280
 
281
 /* Medium devices (landscape tablets, 768px and up) */
281
 /* Medium devices (landscape tablets, 768px and up) */
282
 @media only screen and (min-width: 768px) {
282
 @media only screen and (min-width: 768px) {
283
+  .introContentAdjust {
284
+    margin-top: 90px !important;
285
+  }
283
 }
286
 }
284
 
287
 
285
 /* Large devices (laptops/desktops, 992px and up) */
288
 /* Large devices (laptops/desktops, 992px and up) */
292
 /* Extra large devices (large laptops and desktops, 1200px and up) */
295
 /* Extra large devices (large laptops and desktops, 1200px and up) */
293
 @media only screen and (min-width: 1200px) {
296
 @media only screen and (min-width: 1200px) {
294
   .introContentAdjust {
297
   .introContentAdjust {
295
-    margin-top: 0px !important;
298
+    margin-top: 80px !important;
296
   }
299
   }
297
 }
300
 }
298
 </style>
301
 </style>

+ 14
- 46
src/components/misc/bondCaclculator.vue 查看文件

2
   <div>
2
   <div>
3
     <h2 id="modal-bondcal">Bond Calculator</h2>
3
     <h2 id="modal-bondcal">Bond Calculator</h2>
4
     <p>Calculate the value of the property you could buy</p>
4
     <p>Calculate the value of the property you could buy</p>
5
-    <input
6
-      type="text"
7
-      class="form-control mb-2"
8
-      name="income"
9
-      id="gross-income"
10
-      placeholder="Gross Monthly Household Income"
11
-      v-model="amount"
12
-      @input="displayValue()"
13
-    />
14
-    <input
15
-      type="text"
16
-      class="form-control mb-2"
17
-      name="deposit"
18
-      id="deposit"
19
-      placeholder="Deposit Amount – May be Required"
20
-      v-model="deposit"
21
-      @input="displayDeposit()"
22
-    />
5
+    <currency-input :value="amount" @input="amount = $event" class="form-control mb-2" />
6
+    <currency-input :value="deposit" @input="deposit = $event" class="form-control mb-2" />
23
     <div class="slidecontainer mt-4">
7
     <div class="slidecontainer mt-4">
24
       <input type="range" min="5" max="30" value="10" class="slider" id="myRange" v-model="term" />
8
       <input type="range" min="5" max="30" value="10" class="slider" id="myRange" v-model="term" />
25
     </div>
9
     </div>
26
     <p>{{ term }} Years</p>
10
     <p>{{ term }} Years</p>
11
+    <div class="percent uniSelectLabel" style="right:65px;"></div>
27
     <input
12
     <input
28
-      type="text"
13
+      type="number"
29
       class="form-control mb-2"
14
       class="form-control mb-2"
15
+      style="width:260px"
30
       name="interest"
16
       name="interest"
31
       id="interest"
17
       id="interest"
32
       placeholder="Interest Rate (Percent)"
18
       placeholder="Interest Rate (Percent)"
60
 export default {
46
 export default {
61
   data() {
47
   data() {
62
     return {
48
     return {
63
-      amount: "R1000000",
64
-      deposit: "R0",
49
+      amount: 1000000,
50
+      deposit: 0,
65
       term: 10,
51
       term: 10,
66
       rate: 7,
52
       rate: 7,
67
       isInputActive: false
53
       isInputActive: false
70
   props: ["value"],
56
   props: ["value"],
71
   methods: {
57
   methods: {
72
     calculate() {
58
     calculate() {
73
-      var rate = this.calcRate();
59
+      var rate = this.rate / 100 / 12;
74
       var years = this.term * 12;
60
       var years = this.term * 12;
75
       var topPart = rate * Math.pow(1 + rate, years);
61
       var topPart = rate * Math.pow(1 + rate, years);
76
       var bottomPart = Math.pow(1 + rate, years) - 1;
62
       var bottomPart = Math.pow(1 + rate, years) - 1;
77
       var netAmnt = this.amount - this.deposit;
63
       var netAmnt = this.amount - this.deposit;
78
       var bond = (netAmnt * topPart) / bottomPart;
64
       var bond = (netAmnt * topPart) / bottomPart;
79
-    },
80
-    calcRate() {
81
-      var answer = this.rate / 100 / 12;
82
-      return answer;
83
-    },
84
-    displayValue() {
85
-      const formatter = new Intl.NumberFormat("en-US", {
86
-        minimumFractionDigits: 2
87
-      });
88
-      if (this.amount.charAt(0) !== "R") {
89
-        this.amount = "R" + formatter.format(this.amount);
90
-        if (this.amount < 1) {
91
-          this.amount = "R" + 0;
92
-        }
93
-      }
94
-    },
95
-    displayDeposit() {
96
-      if (this.deposit.charAt(0) !== "R") {
97
-        if (this.deposit < 1) {
98
-          this.deposit = "R" + 0;
99
-        }
100
-      }
101
     }
65
     }
102
   },
66
   },
103
   computed: {
67
   computed: {
107
       var topPart = rate * Math.pow(1 + rate, years);
71
       var topPart = rate * Math.pow(1 + rate, years);
108
       var bottomPart = Math.pow(1 + rate, years) - 1;
72
       var bottomPart = Math.pow(1 + rate, years) - 1;
109
 
73
 
110
-      var netAmnt = parseFloat(this.amount.substring(1)) - parseFloat(this.deposit.substring(1));
74
+      var netAmnt = parseFloat(this.amount) - parseFloat(this.deposit);
111
       var bond = (netAmnt * topPart) / bottomPart;
75
       var bond = (netAmnt * topPart) / bottomPart;
112
       if (isNaN(bond)) {
76
       if (isNaN(bond)) {
113
         return 0;
77
         return 0;
126
 };
90
 };
127
 </script>
91
 </script>
128
 
92
 
129
-<style lang="scss" scoped></style>
93
+<style lang="scss" scoped>
94
+.percent::after {
95
+  content: "%";
96
+}
97
+</style>

+ 3
- 1
src/components/propertyManagement/rentalManagement/contentSection.vue 查看文件

19
       <div class="row">
19
       <div class="row">
20
         <div class="col-md-6"></div>
20
         <div class="col-md-6"></div>
21
         <div class="col-md-6">
21
         <div class="col-md-6">
22
-          <h4>Contact us for a quote</h4>
22
+          <button @click="$vuetify.goTo('#contact', { duration: 2000, easing: 'easeInOutCubic' })">
23
+            <h4>Contact us for a quote</h4>
24
+          </button>
23
         </div>
25
         </div>
24
       </div>
26
       </div>
25
 
27
 

+ 14
- 2
src/components/propertyManagement/sectionalTitle/ourServicesSection.vue 查看文件

18
       <div class="row mt-2">
18
       <div class="row mt-2">
19
         <div class="col-md-6"></div>
19
         <div class="col-md-6"></div>
20
         <div class="col-md-6">
20
         <div class="col-md-6">
21
-          <h4>Contact us for a quote</h4>
21
+          <button @click="$vuetify.goTo('#contact', { duration: 2000, easing: 'easeInOutCubic' })">
22
+            <h4>Contact us for a quote</h4>
23
+          </button>
22
         </div>
24
         </div>
23
       </div>
25
       </div>
24
       <div class="row">
26
       <div class="row">
213
 </template>
215
 </template>
214
 
216
 
215
 <script>
217
 <script>
216
-export default {};
218
+/* eslint-disable */
219
+
220
+export default {
221
+  methods: {
222
+    scrollToAnchor() {
223
+      var element = document.getElementById("contact");
224
+      var top = element.offsetTop;
225
+      window.scrollTo(0, top, { easing: "ease-in-out" });
226
+    }
227
+  }
228
+};
217
 </script>
229
 </script>
218
 
230
 
219
 <style lang="scss" scoped>
231
 <style lang="scss" scoped>

+ 1
- 0
src/components/shared/footerSection.vue 查看文件

2
   <div>
2
   <div>
3
     <section
3
     <section
4
       id="contact"
4
       id="contact"
5
+      ref="contactFooter"
5
       data-aos="fade-up"
6
       data-aos="fade-up"
6
       data-aos-anchor-placement="top-bottom"
7
       data-aos-anchor-placement="top-bottom"
7
       data-aos-delay="150"
8
       data-aos-delay="150"

+ 25
- 5
src/components/shared/navBar.vue 查看文件

79
                       </li>
79
                       </li>
80
                       <hr />
80
                       <hr />
81
                       <li>
81
                       <li>
82
-                        <a @click="routerGoTo('/property/commercial/new/Sale')">To Sell</a>
82
+                        <a href="#" @click="routerGoTo('/property/commercial/new/Sale')">To Sell</a>
83
                       </li>
83
                       </li>
84
                       <li>
84
                       <li>
85
-                        <a @click="routerGoTo('/property/commercial/new/Rental')">To Rent</a>
85
+                        <a href="#" @click="routerGoTo('/property/commercial/new/Rental')"
86
+                          >To Rent</a
87
+                        >
86
                       </li>
88
                       </li>
87
                     </ul>
89
                     </ul>
88
                   </li>
90
                   </li>
100
                       </li>
102
                       </li>
101
                       <hr />
103
                       <hr />
102
                       <li>
104
                       <li>
103
-                        <a @click="routerGoTo('/property/residential/new/Sale')">To Sell</a>
105
+                        <a href="#" @click="routerGoTo('/property/residential/new/Sale')"
106
+                          >To Sell</a
107
+                        >
104
                       </li>
108
                       </li>
105
                       <li>
109
                       <li>
106
-                        <a @click="routerGoTo('/property/residential/new/Rental')">To Rent</a>
110
+                        <a href="#" @click="routerGoTo('/property/residential/new/Rental')"
111
+                          >To Rent</a
112
+                        >
107
                       </li>
113
                       </li>
108
                     </ul>
114
                     </ul>
109
                   </li>
115
                   </li>
383
 
389
 
384
 /* Small devices (portrait tablets and large phones, 600px and up) */
390
 /* Small devices (portrait tablets and large phones, 600px and up) */
385
 @media only screen and (min-width: 600px) {
391
 @media only screen and (min-width: 600px) {
392
+  .phoneIconDetail {
393
+    display: none;
394
+  }
395
+
396
+  .bondCalculatorDetail {
397
+    display: none;
398
+  }
386
   #header {
399
   #header {
387
-    min-height: 145px;
400
+    min-height: 175px;
388
   }
401
   }
389
 }
402
 }
390
 
403
 
391
 /* Medium devices (landscape tablets, 768px and up) */
404
 /* Medium devices (landscape tablets, 768px and up) */
392
 @media only screen and (min-width: 768px) {
405
 @media only screen and (min-width: 768px) {
406
+  .phoneIconDetail {
407
+    display: initial;
408
+  }
409
+
410
+  .bondCalculatorDetail {
411
+    display: initial;
412
+  }
393
   #header {
413
   #header {
394
     min-height: 120px;
414
     min-height: 120px;
395
   }
415
   }

+ 79
- 74
src/components/timeshare/buy/carouselSection.vue 查看文件

3
     <div class="container">
3
     <div class="container">
4
       <div class="row">
4
       <div class="row">
5
         <div align="left" class="col-sm-12 col-md-8">
5
         <div align="left" class="col-sm-12 col-md-8">
6
-          <div class="intro-content box" style="margin-top:-5px">
7
-            <h2>Find your Timeshare</h2>
8
-            <p>
9
-              Please specify one or more details to view the available weeks and then select the
10
-              weeks that interest you on the resort page.
11
-            </p>
12
-            <div class="row">
13
-              <div class="form-group col-md-6">
14
-                <div class="input-group">
15
-                  <label v-if="!searchParams.region" class="uniSelectLabel" for="region">REGION</label>
16
-                  <select
17
-                    class="form-control uniSelect"
18
-                    name="region"
19
-                    id="region"
20
-                    v-model="searchParams.region"
21
-                    @change="regionChange"
22
-                  >
23
-                    <option v-for="(region, r) in regions" :key="r">{{ region.regionName }}</option>
24
-                  </select>
6
+          <div class="intro-content box" style="margin-top:55px">
7
+            <div style="margin-top:-30px">
8
+              <h2>Find your Timeshare</h2>
9
+              <p>
10
+                Please specify one or more details to view the available weeks and then select the
11
+                weeks that interest you on the resort page.
12
+              </p>
13
+              <div class="row">
14
+                <div class="form-group col-md-6">
15
+                  <div class="input-group">
16
+                    <label v-if="!searchParams.region" class="uniSelectLabel" for="region"
17
+                      >REGION</label
18
+                    >
19
+                    <select
20
+                      class="form-control uniSelect"
21
+                      name="region"
22
+                      id="region"
23
+                      v-model="searchParams.region"
24
+                      @change="regionChange"
25
+                    >
26
+                      <option v-for="(region, r) in regions" :key="r">{{
27
+                        region.regionName
28
+                      }}</option>
29
+                    </select>
30
+                  </div>
31
+                  <br />
32
+                  <label>DATE FROM</label>
33
+                  <input
34
+                    type="date"
35
+                    name="arrival-to"
36
+                    class="form-control my-1 uniSelect"
37
+                    id="arrival-to"
38
+                    placeholder="Date From"
39
+                    v-model="filter.date"
40
+                  />
25
                 </div>
41
                 </div>
26
-                <br />
27
-                <label>DATE FROM</label>
28
-                <input
29
-                  type="date"
30
-                  name="arrival-to"
31
-                  class="form-control my-1 uniSelect"
32
-                  id="arrival-to"
33
-                  placeholder="Date From"
34
-                  v-model="filter.date"
35
-                />
36
-              </div>
37
-              <div class="form-group col-md-6">
38
-                <div class="input-group">
39
-                  <label
40
-                    v-if="!searchParams.resort"
41
-                    class="uniSelectLabel"
42
-                    for="weekInfoResortSelect"
43
-                  >RESORT</label>
44
-                  <select
45
-                    id="weekInfoResortSelect"
46
-                    class="form-control uniSelect"
47
-                    v-model="searchParams.resort"
48
-                  >
49
-                    <option
50
-                      v-for="(resort, r) in filteredResort"
51
-                      :key="r"
52
-                      :value="resort"
53
-                      @change="resortChange"
42
+                <div class="form-group col-md-6">
43
+                  <div class="input-group">
44
+                    <label
45
+                      v-if="!searchParams.resort"
46
+                      class="uniSelectLabel"
47
+                      for="weekInfoResortSelect"
48
+                      >RESORT</label
49
+                    >
50
+                    <select
51
+                      id="weekInfoResortSelect"
52
+                      class="form-control uniSelect"
53
+                      v-model="searchParams.resort"
54
                     >
54
                     >
55
-                      {{
56
-                      resort.resortName
57
-                      }}
58
-                    </option>
59
-                  </select>
55
+                      <option
56
+                        v-for="(resort, r) in filteredResort"
57
+                        :key="r"
58
+                        :value="resort"
59
+                        @change="resortChange"
60
+                      >
61
+                        {{ resort.resortName }}
62
+                      </option>
63
+                    </select>
64
+                  </div>
65
+                  <br />
66
+                  <label>DATE TO</label>
67
+                  <input
68
+                    type="date"
69
+                    name="arrival-to"
70
+                    class="form-control my-1 uniSelect"
71
+                    id="arrival-to"
72
+                    placeholder="Date To"
73
+                    v-model="filter.ddate"
74
+                  />
60
                 </div>
75
                 </div>
61
-                <br />
62
-                <label>DATE TO</label>
63
-                <input
64
-                  type="date"
65
-                  name="arrival-to"
66
-                  class="form-control my-1 uniSelect"
67
-                  id="arrival-to"
68
-                  placeholder="Date To"
69
-                  v-model="filter.ddate"
70
-                />
71
               </div>
76
               </div>
77
+              <button class="btn-solid-blue" @click="Search()">
78
+                <i class="fa fa-search"></i> SEARCH
79
+              </button>
72
             </div>
80
             </div>
73
-            <button class="btn-solid-blue" @click="Search()">
74
-              <i class="fa fa-search"></i> SEARCH
75
-            </button>
76
           </div>
81
           </div>
77
         </div>
82
         </div>
78
       </div>
83
       </div>
107
 import { mapState, mapActions, mapGetters } from "vuex";
112
 import { mapState, mapActions, mapGetters } from "vuex";
108
 export default {
113
 export default {
109
   components: {
114
   components: {
110
-    carousel,
115
+    carousel
111
   },
116
   },
112
   data() {
117
   data() {
113
     return {
118
     return {
116
       region: "",
121
       region: "",
117
       resort: "",
122
       resort: "",
118
       priceMin: undefined,
123
       priceMin: undefined,
119
-      priceMax: undefined,
124
+      priceMax: undefined
120
     };
125
     };
121
   },
126
   },
122
   methods: {
127
   methods: {
123
     ...mapActions("timeshare", ["initTimeshare", "onResortChange", "saveWeek"]),
128
     ...mapActions("timeshare", ["initTimeshare", "onResortChange", "saveWeek"]),
124
     regionChange(item) {
129
     regionChange(item) {
125
-      let reg = this.regions.find((r) => r.regionName === item.target.value);
130
+      let reg = this.regions.find(r => r.regionName === item.target.value);
126
       this.regionObj = reg;
131
       this.regionObj = reg;
127
     },
132
     },
128
     resortChange(item) {
133
     resortChange(item) {
129
-      let res = this.resorts.find((r) => r.resortName === item.target.value);
134
+      let res = this.resorts.find(r => r.resortName === item.target.value);
130
       this.resortObj = res;
135
       this.resortObj = res;
131
     },
136
     },
132
     Search() {
137
     Search() {
142
       }
147
       }
143
 
148
 
144
       this.$router.push(`/resort/${this.searchParams.resort.resortCode}`);
149
       this.$router.push(`/resort/${this.searchParams.resort.resortCode}`);
145
-    },
150
+    }
146
   },
151
   },
147
   computed: {
152
   computed: {
148
     ...mapState("timeshare", ["resorts", "regions", "detailedRegion"]),
153
     ...mapState("timeshare", ["resorts", "regions", "detailedRegion"]),
151
       let list = [];
156
       let list = [];
152
       if (this.searchParams.region && this.searchParams.region !== "") {
157
       if (this.searchParams.region && this.searchParams.region !== "") {
153
         const item = this.detailedRegion.find(
158
         const item = this.detailedRegion.find(
154
-          (region) => region.region.regionCode === this.regionObj.regionCode
159
+          region => region.region.regionCode === this.regionObj.regionCode
155
         );
160
         );
156
         if (item) {
161
         if (item) {
157
           list = item.children;
162
           list = item.children;
159
       } else {
164
       } else {
160
         list = this.resorts;
165
         list = this.resorts;
161
       }
166
       }
162
-      return _.sortBy(list, (x) => x.resortName);
163
-    },
167
+      return _.sortBy(list, x => x.resortName);
168
+    }
164
   },
169
   },
165
   created() {
170
   created() {
166
     this.initTimeshare(this.weekId);
171
     this.initTimeshare(this.weekId);
170
     this.searchParams.resort = null;
175
     this.searchParams.resort = null;
171
     this.filter.date = null;
176
     this.filter.date = null;
172
     this.filter.ddate = null;
177
     this.filter.ddate = null;
173
-  },
178
+  }
174
 };
179
 };
175
 </script>
180
 </script>
176
 
181
 

+ 10
- 12
src/components/timeshare/buy/searchSection.vue 查看文件

2
   <section>
2
   <section>
3
     <div class="container pb-5">
3
     <div class="container pb-5">
4
       <div class="row" id="search">
4
       <div class="row" id="search">
5
-        <div class="col-md-4 panel-left p-5" style="margin-top:-20px">
5
+        <div class="col-md-4 panel-left p-5" style="margin-top:-25px;">
6
           <h2>Find Timeshare</h2>
6
           <h2>Find Timeshare</h2>
7
 
7
 
8
           <div class="input-group">
8
           <div class="input-group">
29
               v-model="selectedResort"
29
               v-model="selectedResort"
30
               @change="resortEvent()"
30
               @change="resortEvent()"
31
             >
31
             >
32
-              <option
33
-                v-for="(resort, i) in selectedRegion.resorts"
34
-                :key="i"
35
-                :value="resort"
36
-              >{{ resort.resortName }}</option>
32
+              <option v-for="(resort, i) in selectedRegion.resorts" :key="i" :value="resort">{{
33
+                resort.resortName
34
+              }}</option>
37
             </select>
35
             </select>
38
           </div>
36
           </div>
39
           <div v-else class="input-group my-1">
37
           <div v-else class="input-group my-1">
137
 export default {
135
 export default {
138
   name: "TimeshareToBuy",
136
   name: "TimeshareToBuy",
139
   components: {
137
   components: {
140
-    Alert,
138
+    Alert
141
   },
139
   },
142
   data() {
140
   data() {
143
     return {
141
     return {
149
       bedrooms: null,
147
       bedrooms: null,
150
       maxPrice: null,
148
       maxPrice: null,
151
       dateFrom: "",
149
       dateFrom: "",
152
-      dateTo: "",
150
+      dateTo: ""
153
     };
151
     };
154
   },
152
   },
155
   mounted() {
153
   mounted() {
163
       return `http://maps.google.com/maps?q=${this.myMap}&z=${this.myZoom}&output=embed`;
161
       return `http://maps.google.com/maps?q=${this.myMap}&z=${this.myZoom}&output=embed`;
164
     },
162
     },
165
     regions() {
163
     regions() {
166
-      return _.sortBy(this.detailedRegion, (r) => r.regionName);
167
-    },
164
+      return _.sortBy(this.detailedRegion, r => r.regionName);
165
+    }
168
   },
166
   },
169
   methods: {
167
   methods: {
170
     ...mapActions("region", ["init", "getAvail", "getRegions", "getResort"]),
168
     ...mapActions("region", ["init", "getAvail", "getRegions", "getResort"]),
201
       if (this.selectedResort) {
199
       if (this.selectedResort) {
202
         this.$router.push(`/resort/${this.selectedResort.resortCode}`);
200
         this.$router.push(`/resort/${this.selectedResort.resortCode}`);
203
       }
201
       }
204
-    },
205
-  },
202
+    }
203
+  }
206
 };
204
 };
207
 </script>
205
 </script>
208
 
206
 

+ 9
- 1
src/main.js 查看文件

7
 import router from "./router";
7
 import router from "./router";
8
 import store from "./store";
8
 import store from "./store";
9
 import * as VueGoogleMaps from "vue2-google-maps";
9
 import * as VueGoogleMaps from "vue2-google-maps";
10
+import Vuetify from "vuetify";
11
+import "vuetify/dist/vuetify.min.css";
12
+import VueCurrencyInput from "vue-currency-input";
10
 
13
 
11
 Vue.use(EvaIcons);
14
 Vue.use(EvaIcons);
15
+Vue.use(Vuetify);
12
 Vue.use(VueGoogleMaps, {
16
 Vue.use(VueGoogleMaps, {
13
   load: {
17
   load: {
14
     key: "AIzaSyD8k_Kwml_C8IDfs-gX8JFV8acli3L9cAE",
18
     key: "AIzaSyD8k_Kwml_C8IDfs-gX8JFV8acli3L9cAE",
21
     // v: '3.26',
25
     // v: '3.26',
22
   }
26
   }
23
 });
27
 });
28
+const pluginOptions = {
29
+  /* see config reference */
30
+  globalOptions: { currency: ["ZAR", null, { prefix: "R" }][2], locale: "en-us" }
31
+};
24
 Vue.config.productionTip = false;
32
 Vue.config.productionTip = false;
25
 //axios.defaults.baseURL = "http://localhost:57260";
33
 //axios.defaults.baseURL = "http://localhost:57260";
26
 axios.defaults.baseURL = "http://training.provision-sa.com:82";
34
 axios.defaults.baseURL = "http://training.provision-sa.com:82";
33
 if (token) {
41
 if (token) {
34
   Vue.prototype.$http.defaults.headers.common.Authorization = token;
42
   Vue.prototype.$http.defaults.headers.common.Authorization = token;
35
 }
43
 }
36
-
44
+Vue.use(VueCurrencyInput, pluginOptions);
37
 router.beforeEach((to, from, next) => {
45
 router.beforeEach((to, from, next) => {
38
   if (to.matched.some(record => record.meta.requiresAuth)) {
46
   if (to.matched.some(record => record.meta.requiresAuth)) {
39
     if (store.getters.isLoggedIn) {
47
     if (store.getters.isLoggedIn) {

+ 9
- 4
src/router/index.js 查看文件

1
 /* eslint-disable import/prefer-default-export */
1
 /* eslint-disable import/prefer-default-export */
2
+/* eslint-disable */
2
 import Vue from "vue";
3
 import Vue from "vue";
3
 import Router from "vue-router";
4
 import Router from "vue-router";
4
 
5
 
84
 export default new Router({
85
 export default new Router({
85
   // eslint-disable-next-line no-unused-vars
86
   // eslint-disable-next-line no-unused-vars
86
   scrollBehavior(to, from, savedPosition) {
87
   scrollBehavior(to, from, savedPosition) {
87
-    return {
88
-      x: 0,
89
-      y: 0
90
-    };
88
+    if (to.hash) {
89
+      return { selector: to.hash };
90
+    } else {
91
+      return {
92
+        x: 0,
93
+        y: 0
94
+      };
95
+    }
91
   },
96
   },
92
   routes: [
97
   routes: [
93
     {
98
     {

正在加载...
取消
保存