瀏覽代碼

API Post Merge Conflict

master
LeneS 5 年之前
父節點
當前提交
034aec1981
共有 33 個文件被更改,包括 1405 次插入863 次删除
  1. 二進制
      public/img/Contact-us.jpg
  2. 二進制
      public/img/Listings.jpg
  3. 二進制
      public/img/Pretoria-South-Africa.jpg
  4. 0
    1
      src/components/admin/property/propertyTypeEdit.vue
  5. 4
    3
      src/components/admin/property/propertyTypeList.vue
  6. 8
    7
      src/components/admin/property/userDefinedField.vue
  7. 210
    136
      src/components/admin/property/userDefinedGroupPage.vue
  8. 31
    7
      src/components/admin/property/userDefinedGroupsPage.vue
  9. 1
    0
      src/components/home/propertySection.vue
  10. 163
    132
      src/components/misc/contactUs.vue
  11. 116
    63
      src/components/property/propertyCard.vue
  12. 22
    7
      src/components/property/propertyImage.vue
  13. 29
    12
      src/components/property/propertyList.vue
  14. 10
    2
      src/components/property/propertyPage.vue
  15. 40
    22
      src/components/property/propertySearchPage.vue
  16. 0
    1
      src/components/property/propertyUserField.vue
  17. 87
    36
      src/components/property/propertyeditPage.vue
  18. 2
    2
      src/components/shared/navBar.vue
  19. 56
    47
      src/components/timeshare/searchTimeshare.vue
  20. 9
    7
      src/components/timeshare/sell/sellPage.vue
  21. 46
    35
      src/components/user/loginPage.vue
  22. 62
    34
      src/components/user/registerAgencySection.vue
  23. 142
    86
      src/components/user/registerPage.vue
  24. 0
    2
      src/main.js
  25. 158
    163
      src/router/index.js
  26. 92
    17
      src/store/modules/property/property.js
  27. 96
    19
      src/store/modules/property/propertyAdmin.js
  28. 1
    1
      src/store/modules/property/propertyLists.js
  29. 5
    5
      src/store/modules/property/propertyTypes.js
  30. 3
    3
      src/store/modules/searchTab.js
  31. 3
    4
      src/store/modules/timeshare/status.js
  32. 8
    8
      src/store/modules/user/register.js
  33. 1
    1
      vue.config.js

二進制
public/img/Contact-us.jpg 查看文件


二進制
public/img/Listings.jpg 查看文件


二進制
public/img/Pretoria-South-Africa.jpg 查看文件


+ 0
- 1
src/components/admin/property/propertyTypeEdit.vue 查看文件

36
                 >
36
                 >
37
                   <option value="0">Residential</option>
37
                   <option value="0">Residential</option>
38
                   <option value="1">Commercial</option>
38
                   <option value="1">Commercial</option>
39
-                  <option value="2">Both</option>
40
                 </select>
39
                 </select>
41
               </div>
40
               </div>
42
             </div>
41
             </div>

+ 4
- 3
src/components/admin/property/propertyTypeList.vue 查看文件

24
             <th>Description</th>
24
             <th>Description</th>
25
             <th>Property Type</th>
25
             <th>Property Type</th>
26
             <th></th>
26
             <th></th>
27
+            <th></th>
27
           </tr>
28
           </tr>
28
         </thead>
29
         </thead>
29
         <tbody>
30
         <tbody>
30
           <tr v-for="(item, i) in propertyTypes" :key="i">
31
           <tr v-for="(item, i) in propertyTypes" :key="i">
31
             <td>{{ item.description }}</td>
32
             <td>{{ item.description }}</td>
32
             <td v-if="item.usageType === 0">Residential</td>
33
             <td v-if="item.usageType === 0">Residential</td>
33
-            <td v-else-if="item.usageType === 1">Commercial</td>
34
-            <td v-else>Both</td>
34
+            <td v-else>Commercial</td>
35
             <td>
35
             <td>
36
               <button
36
               <button
37
                 type="button"
37
                 type="button"
39
                 class="btn btn-b-n"
39
                 class="btn btn-b-n"
40
                 style="width: 85px; height:40px;"
40
                 style="width: 85px; height:40px;"
41
               >Edit</button>
41
               >Edit</button>
42
-              |
42
+            </td>
43
+            <td>
43
               <button
44
               <button
44
                 type="button"
45
                 type="button"
45
                 @click="Delete(item.id)"
46
                 @click="Delete(item.id)"

src/components/admin/property/userDefinedFieldPage.vue → src/components/admin/property/userDefinedField.vue 查看文件

66
 <script>
66
 <script>
67
 export default {
67
 export default {
68
   name: 'UserField',
68
   name: 'UserField',
69
+  props: {
70
+    field: {},
71
+  },
69
   data() {
72
   data() {
70
     return {
73
     return {
71
-      userField: {
72
-        fieldName: '',
73
-        fieldType: '',
74
-        rank: 0,
75
-      },
74
+      userField: {},
76
     };
75
     };
77
   },
76
   },
78
   mounted() {
77
   mounted() {
79
-    this.userField = this.$route.query.field;
78
+    if (this.field) {
79
+      this.userField = this.field;
80
+    }
80
   },
81
   },
81
   methods: {
82
   methods: {
82
     SubmitData() {
83
     SubmitData() {
83
-      //this.$emit();
84
+      this.$emit('UpdateUserField', this.userField);
84
     },
85
     },
85
   },
86
   },
86
 };
87
 };

+ 210
- 136
src/components/admin/property/userDefinedGroupPage.vue 查看文件

1
 <template>
1
 <template>
2
+  <!-- eslint-disable max-len -->
2
   <div>
3
   <div>
3
-    <section class="intro-single">
4
-      <div class="container">
5
-        <div class="row">
6
-          <div class="col-md-12 col-lg-8">
7
-            <div class="title-single-box">
8
-              <h2 class="title-single">User Defined Group</h2>
4
+    <div v-if="showField === false">
5
+      <section class="intro-single">
6
+        <div class="container">
7
+          <div class="row">
8
+            <div class="col-md-12 col-lg-8">
9
+              <div class="title-single-box">
10
+                <h2 class="title-single">User Defined Group</h2>
11
+              </div>
9
             </div>
12
             </div>
10
           </div>
13
           </div>
11
         </div>
14
         </div>
12
-      </div>
13
-    </section>
14
-    <div class="container">
15
-      <div class="row mb-3">
16
-        <div class="col-md-12">
17
-          <form id="mainForm">
18
-            <div v-if="userDefinedGroup" class="form-group row">
19
-              <div class="col-md-4">
20
-                <label>Description</label>
21
-                <input
22
-                  class="form-control"
23
-                  type="text"
24
-                  name="description"
25
-                  id="description"
26
-                  v-model="userDefinedGroup.description"
27
-                />
28
-              </div>
29
-              <div class="col-md-4">
30
-                <label>Property Type</label>
31
-                <select
32
-                  class="form-control"
33
-                  name="UsageType"
34
-                  id="UsageType"
35
-                  v-model="userDefinedGroup.usageType"
36
-                >
37
-                  <option value="0">Residential</option>
38
-                  <option value="1">Commercial</option>
39
-                  <option value="2">Both</option>
40
-                </select>
41
-              </div>
42
-              <div class="col-md-4">
43
-                <label>Order</label>
44
-                <input
45
-                  class="form-control"
46
-                  type="number"
47
-                  name="rank"
48
-                  id="rank"
49
-                  v-model="userDefinedGroup.rank"
50
-                />
51
-              </div>
52
-            </div>
53
-            <div v-if="!userDefinedGroup" class="form-group row">
54
-              <div class="col-md-4">
55
-                <label>Description</label>
56
-                <input
57
-                  class="form-control"
58
-                  type="text"
59
-                  name="description"
60
-                  id="description"
61
-                  v-model="group.description"
62
-                />
63
-              </div>
64
-              <div class="col-md-4">
65
-                <label>Property Type</label>
66
-                <select
67
-                  class="form-control"
68
-                  name="UsageType"
69
-                  id="UsageType"
70
-                  v-model="group.usageType"
71
-                >
72
-                  <option value="0">Residential</option>
73
-                  <option value="1">Commercial</option>
74
-                  <option value="2">Both</option>
75
-                </select>
15
+      </section>
16
+      <div class="container">
17
+        <div class="row mb-3">
18
+          <div class="col-md-12">
19
+            <form id="mainForm">
20
+              <div v-if="userDefinedGroup" class="form-group row">
21
+                <div class="col-md-4">
22
+                  <label>Description</label>
23
+                  <input
24
+                    class="form-control"
25
+                    type="text"
26
+                    name="description"
27
+                    id="description"
28
+                    v-model="userDefinedGroup.description"
29
+                  />
30
+                </div>
31
+                <div class="col-md-4">
32
+                  <label>Property Type</label>
33
+                  <select
34
+                    class="form-control"
35
+                    name="UsageType"
36
+                    id="UsageType"
37
+                    v-model="userDefinedGroup.usageType"
38
+                  >
39
+                    <option value="0">Residential</option>
40
+                    <option value="1">Commercial</option>
41
+                    <option value="2">Both</option>
42
+                  </select>
43
+                </div>
44
+                <div class="col-md-4">
45
+                  <label>Order</label>
46
+                  <input
47
+                    class="form-control"
48
+                    type="number"
49
+                    name="rank"
50
+                    id="rank"
51
+                    v-model="userDefinedGroup.rank"
52
+                  />
53
+                </div>
76
               </div>
54
               </div>
77
-              <div class="col-md-4">
78
-                <label>Order</label>
79
-                <input
80
-                  class="form-control"
81
-                  type="number"
82
-                  name="rank"
83
-                  id="rank"
84
-                  v-model="group.rank"
85
-                />
55
+              <div v-if="!userDefinedGroup" class="form-group row">
56
+                <div class="col-md-4">
57
+                  <label>Description</label>
58
+                  <input
59
+                    class="form-control"
60
+                    type="text"
61
+                    name="description"
62
+                    id="description"
63
+                    v-model="group.description"
64
+                  />
65
+                </div>
66
+                <div class="col-md-4">
67
+                  <label>Property Type</label>
68
+                  <select
69
+                    class="form-control"
70
+                    name="UsageType"
71
+                    id="UsageType"
72
+                    v-model="group.usageType"
73
+                  >
74
+                    <option value="0">Residential</option>
75
+                    <option value="1">Commercial</option>
76
+                    <option value="2">Both</option>
77
+                  </select>
78
+                </div>
79
+                <div class="col-md-4">
80
+                  <label>Order</label>
81
+                  <input
82
+                    class="form-control"
83
+                    type="number"
84
+                    name="rank"
85
+                    id="rank"
86
+                    v-model="group.rank"
87
+                  />
88
+                </div>
86
               </div>
89
               </div>
87
-            </div>
88
-          </form>
90
+            </form>
91
+          </div>
89
         </div>
92
         </div>
90
       </div>
93
       </div>
91
-    </div>
92
-    <div class="container">
94
+      <div class="container">
95
+        <button
96
+          type="button"
97
+          @click="newItem()"
98
+          class="btn btn-b-n"
99
+          style="width: 85px; height:40px;"
100
+        >New</button>
101
+        <br />
102
+        <table class="table table-bordered">
103
+          <thead>
104
+            <tr>
105
+              <th>Field Name</th>
106
+              <th>Field Type</th>
107
+              <th>Order</th>
108
+              <th></th>
109
+              <th></th>
110
+            </tr>
111
+          </thead>
112
+          <tbody>
113
+            <tr v-for="(item, i) in userFields" :key="i">
114
+              <td>{{item.fieldName}}</td>
115
+              <td v-if="item.fieldType === 'text'">Text</td>
116
+              <td v-else-if="item.fieldType === 'number'">Number</td>
117
+              <td v-else>Yes / No</td>
118
+              <td>{{item.rank}}</td>
119
+              <td>
120
+                <button
121
+                  type="button"
122
+                  @click="Edit(item)"
123
+                  class="btn btn-b-n"
124
+                  style="width: 85px; height:40px;"
125
+                >Edit</button>
126
+              </td>
127
+              <td>
128
+                <button
129
+                  type="button"
130
+                  @click="Delete(item)"
131
+                  class="btn btn-b-n"
132
+                  style="width: 85px; height:40px;"
133
+                >Delete</button>
134
+              </td>
135
+            </tr>
136
+          </tbody>
137
+        </table>
138
+      </div>
139
+      <button
140
+        type="button"
141
+        @click="SubmitData()"
142
+        class="btn btn-b-n"
143
+        style="width: 85px; height:40px;"
144
+      >Save</button>
93
       <button
145
       <button
94
         type="button"
146
         type="button"
95
-        @click="newItem()"
147
+        @click="Close()"
96
         class="btn btn-b-n"
148
         class="btn btn-b-n"
97
         style="width: 85px; height:40px;"
149
         style="width: 85px; height:40px;"
98
-      >New</button>
99
-      <br />
100
-      <table class="table table-bordered">
101
-        <thead>
102
-          <tr>
103
-            <th>Field Name</th>
104
-            <th>Field Type</th>
105
-            <th>Order</th>
106
-            <th></th>
107
-          </tr>
108
-        </thead>
109
-        <tbody>
110
-          <tr v-for="(item, i) in userFields" :key="i">
111
-            <td>{{item.fieldName}}</td>
112
-            <td>{{item.fieldType}}</td>
113
-            <td>{{item.rank}}</td>
114
-            <td>
115
-              <router-link :to="{ name: 'UserDefinedField', query: { field: item }}">Edit</router-link>
116
-              <!-- <router-link :to="`/userField`">Edit</router-link>| Delete -->
117
-            </td>
118
-          </tr>
119
-        </tbody>
120
-      </table>
150
+      >Close</button>
151
+    </div>
152
+    <div v-else>
153
+      <userFields @UpdateUserField="UpdateUserField" :field="item" />
121
     </div>
154
     </div>
122
-    <button
123
-      type="button"
124
-      @click="SubmitData()"
125
-      class="btn btn-b-n"
126
-      style="width: 85px; height:40px;"
127
-    >Save</button>
128
   </div>
155
   </div>
129
 </template>
156
 </template>
130
 
157
 
131
 <script>
158
 <script>
132
 import { mapState, mapActions } from 'vuex';
159
 import { mapState, mapActions } from 'vuex';
160
+import userFields from './userDefinedField.vue';
133
 
161
 
134
 export default {
162
 export default {
135
   name: 'UserDefinedGroup',
163
   name: 'UserDefinedGroup',
164
+  components: {
165
+    userFields,
166
+  },
136
   data() {
167
   data() {
137
     return {
168
     return {
138
-      group: {
139
-        description: '',
140
-        usageType: 0,
141
-        rank: 0,
142
-      },
169
+      item: {},
170
+      showField: false,
143
     };
171
     };
144
   },
172
   },
145
   mounted() {
173
   mounted() {
174
+    this.clearUserFields();
175
+    this.clearUserGroup();
176
+
146
     if (this.$route.params.id > 0) {
177
     if (this.$route.params.id > 0) {
147
-      this.getUserDefinedGroup(
148
-        Object.assign({}, { id: this.$route.params.id }),
149
-      );
150
-      this.getUserFields(Object.assign({}, { groupId: this.$route.params.id }));
178
+      this.getUserDefinedGroup(this.$route.params.id);
179
+      this.getUserFields(this.$route.params.id);
151
     }
180
     }
152
   },
181
   },
153
   computed: {
182
   computed: {
154
-    ...mapState('propertyAdmin', ['userDefinedGroup', 'userFields']),
183
+    ...mapState('propertyAdmin', [
184
+      'userDefinedGroup',
185
+      'userFields',
186
+      'userField',
187
+    ]),
155
   },
188
   },
156
   methods: {
189
   methods: {
157
     ...mapActions('propertyAdmin', [
190
     ...mapActions('propertyAdmin', [
159
       'getUserFields',
192
       'getUserFields',
160
       'saveUserDefinedGroup',
193
       'saveUserDefinedGroup',
161
       'updateUserDefinedGroup',
194
       'updateUserDefinedGroup',
195
+      'clearUserGroup',
196
+      'clearUserFields',
197
+      'clearUserField',
198
+      'saveUserField',
199
+      'updateUserField',
200
+      'deleteUserField',
162
     ]),
201
     ]),
163
     SubmitData() {
202
     SubmitData() {
203
+      this.userDefinedGroup.fields = [];
204
+      let reload = false;
164
       if (this.$route.params.id > 0) {
205
       if (this.$route.params.id > 0) {
165
-        this.updateUserDefinedGroup(
166
-          Object.assign({}, { group: this.userDefinedGroup }),
167
-        );
206
+        this.updateUserDefinedGroup(this.userDefinedGroup);
207
+        this.userFields.forEach((fieldData) => {
208
+          if (fieldData.id === 0) {
209
+            fieldData.groupId = this.userDefinedGroup.id;
210
+            this.saveUserField(fieldData);
211
+          } else {
212
+            this.updateUserField(fieldData);
213
+          }
214
+        });
168
       } else {
215
       } else {
169
-        this.saveUserDefinedGroup(Object.assign({}, { group: this.group }));
216
+        reload = true;
217
+        this.userFields.forEach((fieldData) => {
218
+          this.userDefinedGroup.fields.push({
219
+            fieldName: fieldData.fieldName,
220
+            fieldType: fieldData.fieldType,
221
+            rank: fieldData.rank,
222
+          });
223
+        });
224
+        this.saveUserDefinedGroup(this.userDefinedGroup);
170
       }
225
       }
171
       this.$router.push('/userDefinedGroups/list');
226
       this.$router.push('/userDefinedGroups/list');
227
+      // this.$router.push({
228
+      //   path: '/userDefinedGroups/list',
229
+      //   query: { reload },
230
+      // });
172
     },
231
     },
173
     newItem() {
232
     newItem() {
174
-      const newField = {
175
-        fieldName: '',
176
-        fieldType: 'Text',
177
-        rank: 0,
178
-      };
179
-      this.$router.push({
180
-        path: '/userField',
181
-        query: { field: newField },
182
-      });
233
+      this.clearUserField();
234
+      this.item = this.userField;
235
+      this.item.groupId = this.userDefinedGroup.id;
236
+      this.showField = true;
237
+    },
238
+    Edit(item) {
239
+      this.item = item;
240
+      this.showField = true;
241
+    },
242
+    Close() {
243
+      this.$router.push('/userDefinedGroups/list');
244
+    },
245
+    UpdateUserField(item) {
246
+      if (item.id === 0) {
247
+        this.userFields.push(item);
248
+      }
249
+      this.showField = false;
250
+    },
251
+    Delete(item) {
252
+      if (item.id === 0) {
253
+        this.userFields.pop(this.userFields.find(p => p.id === item.id));
254
+      } else {
255
+        this.deleteUserField(item.id);
256
+      }
183
     },
257
     },
184
   },
258
   },
185
 };
259
 };

+ 31
- 7
src/components/admin/property/userDefinedGroupsPage.vue 查看文件

1
 <template>
1
 <template>
2
+  <!-- eslint-disable max-len -->
2
   <div>
3
   <div>
3
     <section class="intro-single">
4
     <section class="intro-single">
4
       <div class="container">
5
       <div class="container">
12
       </div>
13
       </div>
13
     </section>
14
     </section>
14
     <div class="container">
15
     <div class="container">
15
-      <router-link :to="`/userDefinedGroups/userDefinedGroup`">New</router-link>
16
+      <button type="button" @click="New()" class="btn btn-b-n" style="width: 85px; height:40px;">New</button>
16
       <table class="table table-bordered">
17
       <table class="table table-bordered">
17
         <thead>
18
         <thead>
18
           <tr>
19
           <tr>
31
             <td v-else>Both</td>
32
             <td v-else>Both</td>
32
             <td>{{item.rank}}</td>
33
             <td>{{item.rank}}</td>
33
             <td>
34
             <td>
34
-              <router-link :to="`/userDefinedGroups/userDefinedGroup/${item.id}`">Edit</router-link>
35
+              <button
36
+                type="button"
37
+                @click="Edit(item.id)"
38
+                class="btn btn-b-n"
39
+                style="width: 85px; height:40px;"
40
+              >Edit</button>
35
             </td>
41
             </td>
36
             <td>
42
             <td>
37
-              <button>Delete</button>
43
+              <button
44
+                type="button"
45
+                @click="Delete(item)"
46
+                class="btn btn-b-n"
47
+                style="width: 85px; height:40px;"
48
+              >Delete</button>
38
             </td>
49
             </td>
39
           </tr>
50
           </tr>
40
         </tbody>
51
         </tbody>
47
 
58
 
48
 export default {
59
 export default {
49
   name: 'UserDefinedGroup',
60
   name: 'UserDefinedGroup',
50
-  created() {
61
+  mounted() {
51
     this.getUserDefinedGroups();
62
     this.getUserDefinedGroups();
52
   },
63
   },
53
   computed: {
64
   computed: {
54
     ...mapState('propertyAdmin', ['userDefinedGroups']),
65
     ...mapState('propertyAdmin', ['userDefinedGroups']),
55
   },
66
   },
56
   methods: {
67
   methods: {
57
-    ...mapActions('propertyAdmin', ['getUserDefinedGroups']),
68
+    ...mapActions('propertyAdmin', [
69
+      'getUserDefinedGroups',
70
+      'deleteUserDefinedGroup',
71
+    ]),
72
+    New() {
73
+      this.$router.push('/userDefinedGroups/userDefinedGroup');
74
+    },
75
+    Edit(id) {
76
+      this.$router.push(`/userDefinedGroups/userDefinedGroup/${id}`);
77
+    },
78
+    Delete(item) {
79
+      if (item.id === 0) {
80
+        this.userDefinedGroups.pop(item);
81
+      }
82
+      this.deleteUserDefinedGroup(item.id);
83
+    },
58
   },
84
   },
59
 };
85
 };
60
 </script>
86
 </script>
61
-<style>
62
-</style>

+ 1
- 0
src/components/home/propertySection.vue 查看文件

15
           v-if="latestProperties.length > 0"
15
           v-if="latestProperties.length > 0"
16
           name="propertyholder"
16
           name="propertyholder"
17
           :properties="latestProperties"
17
           :properties="latestProperties"
18
+          :showSort="false"
18
         />
19
         />
19
       </div>
20
       </div>
20
     </section>
21
     </section>

+ 163
- 132
src/components/misc/contactUs.vue 查看文件

1
 <template>
1
 <template>
2
+  <!-- eslint-disable max-len -->
2
   <div class="container">
3
   <div class="container">
3
-    <section class="intro-single">
4
-      <div class="container">
5
-        <div class="row">
6
-          <div class="col-md-12 col-lg-8">
7
-            <div class="title-single-box">
8
-              <h1 class="title-single" style="text-align:left;">Contact Us</h1>
9
-            </div>
10
-          </div>
4
+    <div class="row">
5
+      <div class="col-sm-12">
6
+        <div class="faq-img-box">
7
+          <img
8
+            src="img/contact-us.jpg"
9
+            alt="Frequently Asked Questions"
10
+            class="img-fluid"
11
+            style="width:800px;height:400px;"
12
+          />
13
+        </div>
14
+        <div class="sinse-box">
15
+          <h3 class="sinse-title">
16
+            Contact Us
17
+            <span></span>
18
+          </h3>
11
         </div>
19
         </div>
12
       </div>
20
       </div>
13
-    </section>
14
-    <div class="map-wrapper">
15
-      <div class="map-canvas" id="map-canvas"></div>
16
-      <a
17
-        href="https://www.google.com/maps/dir/-25.8228224,28.3344896/vacation+recreational+services/@-25.8231034,28.3341882,16z/data=!3m1!4b1!4m9!4m8!1m1!4e1!1m5!1m1!1s0x1e955dadbb47bacd:0x3d299aff0be5b416!2m2!1d28.3426415!2d-25.8229739"
18
-        target="_blank"
19
-      ></a>
20
-      <iframe
21
-        src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d1216.2235430439846!2d28.360457474768342!3d-25.79363191616322!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x445462e3d06f67fc!2sLombardy+Business+Park!5e0!3m2!1sen!2sza!4v1566222826763!5m2!1sen!2sza"
22
-        width="1100"
23
-        height="450"
24
-        frameborder="0"
25
-        style="border:0"
26
-        allowfullscreen
27
-      ></iframe>
28
-      <br />
29
-      <br />
30
-    </div>
21
+      <div class="container col-md-10">
22
+        <br />
23
+        <div class="map-wrapper">
24
+          <div class="map-canvas" id="map-canvas"></div>
25
+          <a
26
+            href="https://www.google.com/maps/dir/-25.8228224,28.3344896/vacation+recreational+services/@-25.8231034,28.3341882,16z/data=!3m1!4b1!4m9!4m8!1m1!4e1!1m5!1m1!1s0x1e955dadbb47bacd:0x3d299aff0be5b416!2m2!1d28.3426415!2d-25.8229739"
27
+            target="_blank"
28
+          ></a>
29
+          <iframe
30
+            src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d1216.2235430439846!2d28.360457474768342!3d-25.79363191616322!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x445462e3d06f67fc!2sLombardy+Business+Park!5e0!3m2!1sen!2sza!4v1566222826763!5m2!1sen!2sza"
31
+            width="900"
32
+            height="450"
33
+            frameborder="0"
34
+            style="border:0"
35
+            allowfullscreen
36
+          ></iframe>
37
+          <br />
38
+          <br />
39
+        </div>
31
 
40
 
32
-    <div class="row mb-8">
33
-      <div class="col-md-6">
34
-        <form action="mailto:info@univateproperties.co.za" method="post" enctype="text/plain">
35
-          <div class="form-group row">
36
-            <div class="col-md-6">
37
-              <label for="yourname"></label>
38
-              <input
39
-                id="yourname"
40
-                name="yourname"
41
-                placeholder="Your Name"
42
-                type="text"
43
-                required="required"
44
-                class="form-control"
45
-              />
46
-            </div>
47
-            <div class="col-md-6">
48
-              <label for="youremail"></label>
49
-              <input
50
-                id="youremail"
51
-                name="youremail"
52
-                placeholder="Your Email"
53
-                type="text"
54
-                required="required"
55
-                class="form-control"
56
-              />
57
-            </div>
58
-          </div>
59
-          <div class="form-group row">
60
-            <div class="col-md-12">
61
-              <label for="subject"></label>
62
-              <input
63
-                id="subject"
64
-                name="subject"
65
-                placeholder="Subject"
66
-                type="text"
67
-                class="form-control"
68
-                required="required"
69
-              />
70
-            </div>
41
+        <div class="row mb-8">
42
+          <div class="col-md-6">
43
+            <form action="mailto:info@univateproperties.co.za" method="post" enctype="text/plain">
44
+              <div class="form-group row">
45
+                <div class="col-md-6">
46
+                  <div class="input-group-prepend">
47
+                    <span class="input-group-text">
48
+                      <eva-icon name="person" fill="#60CBEB"></eva-icon>
49
+                    </span>
50
+                    <label for="yourname"></label>
51
+                    <input
52
+                      id="yourname"
53
+                      name="yourname"
54
+                      placeholder="Your Name"
55
+                      type="text"
56
+                      required="required"
57
+                      class="form-control"
58
+                    />
59
+                  </div>
60
+                </div>
61
+                <div class="col-md-6">
62
+                  <div class="input-group-prepend">
63
+                    <span class="input-group-text">
64
+                      <eva-icon name="email" fill="#60CBEB"></eva-icon>
65
+                    </span>
66
+                    <label for="youremail"></label>
67
+                    <input
68
+                      id="youremail"
69
+                      name="youremail"
70
+                      placeholder="Your Email"
71
+                      type="text"
72
+                      required="required"
73
+                      class="form-control"
74
+                    />
75
+                  </div>
76
+                </div>
77
+              </div>
78
+              <div class="form-group row">
79
+                <div class="col-md-12">
80
+                  <div class="input-group-prepend">
81
+                    <span class="input-group-text">
82
+                      <eva-icon name="bookmark-outline" fill="#60CBEB"></eva-icon>
83
+                    </span>
84
+                    <label for="subject"></label>
85
+                    <input
86
+                      id="subject"
87
+                      name="subject"
88
+                      placeholder="Subject"
89
+                      type="text"
90
+                      class="form-control"
91
+                      required="required"
92
+                    />
93
+                  </div>
94
+                </div>
95
+              </div>
96
+              <div class="form-group row">
97
+                <div class="col-md-12">
98
+                  <div class="input-group-prepend">
99
+                    <span class="input-group-text">
100
+                      <eva-icon name="message-square-outline" fill="#60CBEB"></eva-icon>
101
+                    </span>
102
+                    <label for="message"></label>
103
+                    <textarea
104
+                      id="message"
105
+                      name="message"
106
+                      placeholder="Message"
107
+                      cols="40"
108
+                      rows="8"
109
+                      class="form-control"
110
+                      required="required"
111
+                    ></textarea>
112
+                  </div>
113
+                </div>
114
+              </div>
115
+              <div class="form-group row">
116
+                <div class="col-md-1">
117
+                  <button name="submit" type="submit" class="btn btn-b-n">Send Message</button>
118
+                </div>
119
+              </div>
120
+            </form>
71
           </div>
121
           </div>
72
-          <div class="form-group row">
73
-            <div class="col-md-12">
74
-              <label for="message"></label>
75
-              <textarea
76
-                id="message"
77
-                name="message"
78
-                placeholder="Message"
79
-                cols="40"
80
-                rows="6"
81
-                class="form-control"
82
-                required="required"
83
-              ></textarea>
84
-            </div>
122
+          <div class="col-md-6">
123
+            <eva-icon name="pin-outline" fill="#60CBEB"></eva-icon>
124
+            <a style="font-size: 25px">Find us in</a>
125
+            <p></p>
126
+            <p>
127
+              105 Lombardy Business Park
128
+              <br />Cnr. Graham and Cole Rd.
129
+              <br />Shere, Pretoria, 0084
130
+            </p>
131
+            <br />
132
+            <eva-icon name="paper-plane-outline" fill="#60CBEB"></eva-icon>
133
+            <a style="font-size: 25px">Say Hello</a>
134
+            <p></p>
135
+            <p>
136
+              <eva-icon name="email-outline" fill="#60CBEB"></eva-icon>
137
+              <a href="mailto:info@univateproperties.co.za">info@univateproperties.co.za</a>
138
+              <br />
139
+              <eva-icon name="phone-call-outline" fill="#60CBEB"></eva-icon>
140
+              <a href="tel:+27124921238">+27 (0) 12 492 1238</a>
141
+            </p>
142
+            <br />
143
+            <eva-icon name="share-outline" fill="#60CBEB"></eva-icon>
144
+            <a style="font-size: 25px">Social Networks</a>
145
+            <p>
146
+              <a href="https://www.facebook.com/univateproperties/">
147
+                <eva-icon name="facebook-outline" fill="#60CBEB"></eva-icon>
148
+              </a>
149
+            </p>
85
           </div>
150
           </div>
86
-          <div class="form-group row">
87
-            <div class="col-md-1">
88
-              <button name="submit" type="submit" class="btn btn-b-n">Send Message</button>
151
+        </div>
152
+        <div
153
+          class="modal fade"
154
+          id="thankYouModal"
155
+          tabindex="-1"
156
+          role="dialog"
157
+          aria-labelledby="contactModalLabel"
158
+          aria-hidden="true"
159
+        >
160
+          <div class="modal-dialog" role="document">
161
+            <div class="modal-content px-0 px-md-4">
162
+              <div class="modal-header">
163
+                <h5 class="modal-title" id="contactModalLabel">Thank you</h5>
164
+                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
165
+                  <span aria-hidden="true">&times;</span>
166
+                </button>
167
+              </div>
168
+              <div class="modal-body">
169
+                <p>Thank you for contacting us. We will contact you as soon as possible.</p>
170
+              </div>
89
             </div>
171
             </div>
90
           </div>
172
           </div>
91
-        </form>
92
-      </div>
93
-      <div class="col-md-6">
94
-        <eva-icon name="pin-outline" fill="#60CBEB"></eva-icon>
95
-        <a style="font-size: 25px">Find us in</a>
96
-        <p></p>
97
-        <p>
98
-          105 Lombardy Business Park
99
-          <br />Cnr. Graham and Cole Rd.
100
-          <br />Shere, Pretoria, 0084
101
-        </p>
102
-        <br />
103
-        <eva-icon name="paper-plane-outline" fill="#60CBEB"></eva-icon>
104
-        <a style="font-size: 25px">Say Hello</a>
105
-        <p></p>
106
-        <p>
107
-          <eva-icon name="email-outline" fill="#60CBEB"></eva-icon>
108
-          <a href="mailto:info@univateproperties.co.za">info@univateproperties.co.za</a>
109
-          <br />
110
-          <eva-icon name="phone-call-outline" fill="#60CBEB"></eva-icon>
111
-          <a href="tel:+27124921238">+27 (0) 12 492 1238</a>
112
-        </p>
113
-        <br />
114
-        <eva-icon name="share-outline" fill="#60CBEB"></eva-icon>
115
-        <a style="font-size: 25px">Social Networks</a>
116
-        <p>
117
-          <a href="https://www.facebook.com/univateproperties/">
118
-            <eva-icon name="facebook-outline" fill="#60CBEB"></eva-icon>
119
-          </a>
120
-        </p>
121
-      </div>
122
-    </div>
123
-    <div
124
-      class="modal fade"
125
-      id="thankYouModal"
126
-      tabindex="-1"
127
-      role="dialog"
128
-      aria-labelledby="contactModalLabel"
129
-      aria-hidden="true"
130
-    >
131
-      <div class="modal-dialog" role="document">
132
-        <div class="modal-content px-0 px-md-4">
133
-          <div class="modal-header">
134
-            <h5 class="modal-title" id="contactModalLabel">Thank you</h5>
135
-            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
136
-              <span aria-hidden="true">&times;</span>
137
-            </button>
138
-          </div>
139
-          <div class="modal-body">
140
-            <p>Thank you for contacting us. We will contact you as soon as possible.</p>
141
-          </div>
142
         </div>
173
         </div>
143
       </div>
174
       </div>
144
     </div>
175
     </div>

+ 116
- 63
src/components/property/propertyCard.vue 查看文件

1
 <template>
1
 <template>
2
-  <div class="form-group row">
3
-    <div class="col-md-4" v-for="currentProperty in properties" :key="currentProperty.id">
4
-      <div class="card-box-a card-shadow">
5
-        <div class="img-box-a">
6
-          <img
7
-            :src="currentProperty.displayImage"
8
-            alt
9
-            class="img-a img-fluid"
10
-            style="height:466px; width:350px; object-fit: cover;"
11
-          />
12
-        </div>
13
-        <div class="card-overlay">
14
-          <div class="card-overlay-a-content">
15
-            <div class="card-header-a">
16
-              <h4 class="card-title-a">
17
-                <router-link
18
-                  :to="`/property/property/${currentProperty.id}`"
19
-                  class="link-a"
20
-                >{{ currentProperty.shortDescription }}</router-link>
21
-              </h4>
22
-              <h4 class="card-title-c">
2
+  <div>
3
+    <div class="form-group row" v-if="showSort">
4
+      <button
5
+        type="button"
6
+        class="btn btn-link font-weight-bold color-b"
7
+        style="width: 150px; height:40px;"
8
+        @click="sortNewest()"
9
+      >Newest</button>
10
+      <button
11
+        type="button"
12
+        class="btn btn-link font-weight-bold color-b"
13
+        style="width: 150px; height:40px;"
14
+        @click="sortLowPrice()"
15
+      >Lowest Price</button>
16
+      <button
17
+        type="button"
18
+        class="btn btn-link font-weight-bold color-b"
19
+        style="width: 150px; height:40px;"
20
+        @click="sortHighPrice()"
21
+      >Highest Price</button>
22
+      <hr />
23
+    </div>
24
+    <div class="form-group row">
25
+      <div class="col-md-4" v-for="currentProperty in properties" :key="currentProperty.id">
26
+        <div class="card-box-a card-shadow">
27
+          <div class="img-box-a">
28
+            <img
29
+              :src="currentProperty.displayImage"
30
+              alt
31
+              class="img-a img-fluid"
32
+              style="height:466px; width:350px; object-fit: cover;"
33
+            />
34
+          </div>
35
+          <div class="card-overlay">
36
+            <div class="card-overlay-a-content">
37
+              <div class="card-header-a">
38
+                <h4 class="card-title-a">
39
+                  <router-link
40
+                    :to="`/property/property/${currentProperty.id}`"
41
+                    class="link-a"
42
+                  >{{ currentProperty.shortDescription }}</router-link>
43
+                </h4>
44
+                <h4 class="card-title-c">
45
+                  <router-link :to="`/property/property/${currentProperty.id}`" class="link-a">
46
+                    {{ currentProperty.province }}
47
+                    <br />
48
+                    {{ currentProperty.city }}
49
+                    <br />
50
+                    {{ currentProperty.suburb }}
51
+                  </router-link>
52
+                </h4>
53
+              </div>
54
+              <div class="card-body-a">
55
+                <div class="price-box d-flex">
56
+                  <span
57
+                    v-if="currentProperty.isSale"
58
+                    class="price-a"
59
+                  >sale | {{ currentProperty.displayPrice }}</span>
60
+                  <span
61
+                    v-if="!currentProperty.isSale"
62
+                    class="price-a"
63
+                  >rent | {{ currentProperty.displayPrice }}</span>
64
+                </div>
23
                 <router-link :to="`/property/property/${currentProperty.id}`" class="link-a">
65
                 <router-link :to="`/property/property/${currentProperty.id}`" class="link-a">
24
-                  {{ currentProperty.province }}
25
-                  <br />
26
-                  {{ currentProperty.city }}
27
-                  <br />
28
-                  {{ currentProperty.suburb }}
66
+                  Click here to view
67
+                  <span class="ion-ios-arrow-forward"></span>
29
                 </router-link>
68
                 </router-link>
30
-              </h4>
31
-            </div>
32
-            <div class="card-body-a">
33
-              <div class="price-box d-flex">
34
-                <span
35
-                  v-if="currentProperty.isSale"
36
-                  class="price-a"
37
-                >sale | {{ currentProperty.displayPrice }}</span>
38
-                <span
39
-                  v-if="!currentProperty.isSale"
40
-                  class="price-a"
41
-                >rent | {{ currentProperty.displayPrice }}</span>
42
               </div>
69
               </div>
43
-              <router-link :to="`/property/property/${currentProperty.id}`" class="link-a">
44
-                Click here to view
45
-                <span class="ion-ios-arrow-forward"></span>
46
-              </router-link>
47
-            </div>
48
-            <div class="card-footer-a" v-if="currentProperty.showFooter">
49
-              <ul class="card-info d-flex justify-content-around">
50
-                <li v-if="currentProperty.area !== null">
51
-                  <h4 class="card-info-title">Area</h4>
52
-                  <span v-html="currentProperty.area"></span>
53
-                </li>
54
-                <li v-if="currentProperty.beds !== null">
55
-                  <h4 class="card-info-title">Beds</h4>
56
-                  <span>{{ currentProperty.beds }}</span>
57
-                </li>
58
-                <li v-if="currentProperty.baths !== null">
59
-                  <h4 class="card-info-title">Baths</h4>
60
-                  <span>{{ currentProperty.baths }}</span>
61
-                </li>
62
-                <li v-if="currentProperty.garages !== null">
63
-                  <h4 class="card-info-title">Garages</h4>
64
-                  <span>{{ currentProperty.garages }}</span>
65
-                </li>
66
-              </ul>
70
+              <div class="card-footer-a" v-if="currentProperty.showFooter">
71
+                <ul class="card-info d-flex justify-content-around">
72
+                  <li v-if="currentProperty.area !== null">
73
+                    <h4 class="card-info-title">Area</h4>
74
+                    <span v-html="currentProperty.area"></span>
75
+                  </li>
76
+                  <li v-if="currentProperty.beds !== null">
77
+                    <h4 class="card-info-title">Beds</h4>
78
+                    <span>{{ currentProperty.beds }}</span>
79
+                  </li>
80
+                  <li v-if="currentProperty.baths !== null">
81
+                    <h4 class="card-info-title">Baths</h4>
82
+                    <span>{{ currentProperty.baths }}</span>
83
+                  </li>
84
+                  <li v-if="currentProperty.garages !== null">
85
+                    <h4 class="card-info-title">Garages</h4>
86
+                    <span>{{ currentProperty.garages }}</span>
87
+                  </li>
88
+                </ul>
89
+              </div>
67
             </div>
90
             </div>
68
           </div>
91
           </div>
69
         </div>
92
         </div>
93
+        <br />
70
       </div>
94
       </div>
71
-      <br />
72
     </div>
95
     </div>
73
   </div>
96
   </div>
74
 </template>
97
 </template>
77
 export default {
100
 export default {
78
   props: {
101
   props: {
79
     properties: { type: Array, default: () => [] },
102
     properties: { type: Array, default: () => [] },
103
+    showSort: { type: Boolean, default: true },
104
+  },
105
+  methods: {
106
+    sortHighPrice() {
107
+      function compare(a, b) {
108
+        if (a.price < b.price) return 1;
109
+        if (a.price > b.price) return -1;
110
+        return 0;
111
+      }
112
+
113
+      return this.properties.sort(compare);
114
+    },
115
+    sortLowPrice() {
116
+      function compare(a, b) {
117
+        if (a.price < b.price) return -1;
118
+        if (a.price > b.price) return 1;
119
+        return 0;
120
+      }
121
+
122
+      return this.properties.sort(compare);
123
+    },
124
+    sortNewest() {
125
+      function compare(a, b) {
126
+        if (a.dateCreated < b.dateCreated) return 1;
127
+        if (a.dateCreated > b.dateCreated) return -1;
128
+        return 0;
129
+      }
130
+
131
+      return this.properties.sort(compare);
132
+    },
80
   },
133
   },
81
 };
134
 };
82
 </script>
135
 </script>

+ 22
- 7
src/components/property/propertyImage.vue 查看文件

16
     <br />
16
     <br />
17
     <div class="form-group row">
17
     <div class="form-group row">
18
       <div v-for="(img, i) in image" class="col-md-2" :key="i">
18
       <div v-for="(img, i) in image" class="col-md-2" :key="i">
19
+        <input type="checkbox" id="checkbox" v-model="imagesDefault[i]" @change="updateList(i)" />
20
+        <label for="checkbox" style="margin: 10px;">Main Image</label>
19
         <img :src="img" style="height:200px; width:150px; object-fit: cover;" />
21
         <img :src="img" style="height:200px; width:150px; object-fit: cover;" />
20
         <br />
22
         <br />
21
         <a class="fa fa-times del" @click="removeImage(key)" />
23
         <a class="fa fa-times del" @click="removeImage(key)" />
29
 export default {
31
 export default {
30
   props: {
32
   props: {
31
     loadedImages: Function,
33
     loadedImages: Function,
32
-    savedImages: { type: Array, default: () => [] },
33
   },
34
   },
34
   data() {
35
   data() {
35
     return {
36
     return {
36
       images: {},
37
       images: {},
37
       image: [],
38
       image: [],
39
+      imagesDefault: [],
38
     };
40
     };
39
   },
41
   },
40
-  mounted() {
41
-    if (this.savedImages.length > 0) {
42
-      this.image = this.savedImages;
43
-    }
44
-  },
42
+  // Commented out for now.
43
+  // created() {
44
+  //   if (this.savedImages && this.savedImages.length > 0) {
45
+  //     this.savedImages.forEach((element) => {
46
+  //       this.images.push(element);
47
+  //     });
48
+  //   }
49
+  // },
45
   methods: {
50
   methods: {
46
     imagesAdd(e) {
51
     imagesAdd(e) {
47
       const files = e.target.files || e.dataTransfer.files;
52
       const files = e.target.files || e.dataTransfer.files;
61
 
66
 
62
         reader.onload = (e) => {
67
         reader.onload = (e) => {
63
           vm.image.push(e.target.result);
68
           vm.image.push(e.target.result);
64
-          console.log(vm.image);
65
         };
69
         };
66
         reader.readAsDataURL(file[i]);
70
         reader.readAsDataURL(file[i]);
67
       }
71
       }
75
         this.$refs.im.value = '';
79
         this.$refs.im.value = '';
76
       }
80
       }
77
     },
81
     },
82
+
83
+    updateList(index) {
84
+      if (this.imagesDefault) {
85
+        for (let i = 0; i < this.imagesDefault.length; i++) {
86
+          if (i !== index) {
87
+            this.imagesDefault[i] = false;
88
+          }
89
+        }
90
+        this.$emit('DefaultImage', index);
91
+      }
92
+    },
78
   },
93
   },
79
 };
94
 };
80
 </script>
95
 </script>

+ 29
- 12
src/components/property/propertyList.vue 查看文件

26
             <th>Type</th>
26
             <th>Type</th>
27
             <th>Publish</th>
27
             <th>Publish</th>
28
             <th>Status</th>
28
             <th>Status</th>
29
-            <th>Edit</th>
30
-            <th>Delete</th>
29
+            <th></th>
30
+            <th></th>
31
           </tr>
31
           </tr>
32
         </thead>
32
         </thead>
33
         <tbody>
33
         <tbody>
34
           <tr v-for="(item, i) in properties" :key="i">
34
           <tr v-for="(item, i) in properties" :key="i">
35
-            <td v-if="item.propertyType.usageType === 1">{{item.propertyName}}</td>
36
-            <td v-else>{{ item.shortDescription }}</td>
37
-            <td>{{item.id}}</td>
38
-            <td></td>
35
+            <td>{{ item.name }}</td>
36
+            <td>{{ item.id }}</td>
37
+            <td v-html="item.size" />
39
             <td>{{ item.price }}</td>
38
             <td>{{ item.price }}</td>
40
-            <td>{{ item.propertyType.description }}</td>
39
+            <td>{{ item.type }}</td>
41
             <td>{{ item.publish }}</td>
40
             <td>{{ item.publish }}</td>
42
-            <td>Publish</td>
41
+            <td>{{ item.status }}</td>
43
             <td>
42
             <td>
44
-              <router-link :to="`/property/${item.id}`">Edit</router-link>
43
+              <button
44
+                type="button"
45
+                @click="Edit(item)"
46
+                class="btn btn-b-n"
47
+                style="width: 85px; height:40px;"
48
+              >Edit</button>
49
+            </td>
50
+            <td>
51
+              <button type="button" class="btn btn-b-n" style="width: 85px; height:40px;">Delete</button>
45
             </td>
52
             </td>
46
-            <td>Delete</td>
47
           </tr>
53
           </tr>
48
         </tbody>
54
         </tbody>
49
       </table>
55
       </table>
64
   },
70
   },
65
   methods: {
71
   methods: {
66
     ...mapActions('propertyList', ['getProperties']),
72
     ...mapActions('propertyList', ['getProperties']),
73
+    Edit(item) {
74
+      const salesType = item.isSale ? 'Sale' : 'Rental';
75
+      this.$router.push({
76
+        path: `/property/${this.propertyType}/${salesType}`,
77
+        query: { id: item.id },
78
+      });
79
+    },
67
   },
80
   },
68
   mounted() {
81
   mounted() {
69
     this.propertyType = this.$route.params.propertyType;
82
     this.propertyType = this.$route.params.propertyType;
70
     this.user = this.$route.params.user;
83
     this.user = this.$route.params.user;
71
 
84
 
85
+    if (this.user === 'MyListings') {
86
+      this.user = 'GeorgeW';
87
+    }
88
+
72
     this.getProperties(
89
     this.getProperties(
73
       Object.assign(
90
       Object.assign(
74
         {},
91
         {},
75
         {
92
         {
76
-          propertyType: this.$route.params.propertyType,
77
-          user: this.$route.params.user,
93
+          propertyType: this.propertyType,
94
+          user: this.user,
78
         },
95
         },
79
       ),
96
       ),
80
     );
97
     );

+ 10
- 2
src/components/property/propertyPage.vue 查看文件

36
                     </div>
36
                     </div>
37
                   </div>
37
                   </div>
38
                 </div>
38
                 </div>
39
-                <div class="property-description" v-html="property ? property.description : ''" />
39
+                <div class="property-description" v-html="property.description" />
40
                 <div v-for="display in property.displayData" :key="display.id">
40
                 <div v-for="display in property.displayData" :key="display.id">
41
                   <div class="row section-t3">
41
                   <div class="row section-t3">
42
                     <div class="col-sm-12">
42
                     <div class="col-sm-12">
63
                     </div>
63
                     </div>
64
                     <div class="card-title-c align-self-center">
64
                     <div class="card-title-c align-self-center">
65
                       <h5 class="title-c">{{ formatPrice(property.price) }}</h5>
65
                       <h5 class="title-c">{{ formatPrice(property.price) }}</h5>
66
+                      <h6 v-if="property.pricePer">Per {{property.pricePer}}</h6>
66
                     </div>
67
                     </div>
67
                   </div>
68
                   </div>
68
                 </div>
69
                 </div>
245
     ...mapState('property', ['property', 'propertyImages']),
246
     ...mapState('property', ['property', 'propertyImages']),
246
   },
247
   },
247
   methods: {
248
   methods: {
248
-    ...mapActions('property', ['getProperty', 'getPropertyImages']),
249
+    ...mapActions('property', [
250
+      'getProperty',
251
+      'getPropertyImages',
252
+      'clearPropertyImages',
253
+    ]),
249
     formatPrice(value) {
254
     formatPrice(value) {
250
       const val = (value / 1).toFixed(2);
255
       const val = (value / 1).toFixed(2);
251
       return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
256
       return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
257
       return '';
262
       return '';
258
     },
263
     },
259
   },
264
   },
265
+  beforeDestroy() {
266
+    this.clearPropertyImages();
267
+  },
260
 };
268
 };
261
 </script>
269
 </script>
262
 
270
 

+ 40
- 22
src/components/property/propertySearchPage.vue 查看文件

1
 <template>
1
 <template>
2
   <!-- eslint-disable max-len -->
2
   <!-- eslint-disable max-len -->
3
   <div class="container">
3
   <div class="container">
4
-    <div class="col-sm-12">
5
-      <div class="about-img-box">
6
-        <img
7
-          src="img/Johannesburg-south-africa-1.jpg"
8
-          alt="Property Listing"
9
-          class="img-fluid"
10
-          style="width:800px;height:400px;"
11
-        />
12
-      </div>
13
-      <div class="sinse-box">
14
-        <h3 class="sinse-title">
15
-          Property Listing
16
-          <span></span>
17
-        </h3>
4
+    <div class="container col-md-12" v-if="propertyType === 'Residential'">
5
+      <div class="col-sm-12">
6
+        <div class="about-img-box">
7
+          <img
8
+            src="img/Pretoria-South-Africa.jpg"
9
+            alt="Property Listing"
10
+            class="img-fluid"
11
+            style="width:800px;height:400px;"
12
+          />
13
+        </div>
14
+        <div class="sinse-box">
15
+          <h3 class="sinse-title">
16
+            Property Listing
17
+            <span></span>
18
+          </h3>
19
+        </div>
18
       </div>
20
       </div>
19
-    </div>
20
-    <br />
21
-    <div class="container col-md-10" v-if="propertyType === 'Residential'">
21
+      <br />
22
       <div class="row">
22
       <div class="row">
23
         <div class="col-md-12">
23
         <div class="col-md-12">
24
           <h1 class="my-4">About Residential Properties</h1>
24
           <h1 class="my-4">About Residential Properties</h1>
25
         </div>
25
         </div>
26
-        <div class="col-md-8 text-left">
26
+        <div class="container col-md-6 text-left">
27
           <p>
27
           <p>
28
             Uni-Vate Properties understands the necessity in property-seekers
28
             Uni-Vate Properties understands the necessity in property-seekers
29
             to find that perfect fit;
29
             to find that perfect fit;
48
             <router-link to="/property/Residential/Sale">Click Here</router-link>
48
             <router-link to="/property/Residential/Sale">Click Here</router-link>
49
           </p>
49
           </p>
50
         </div>
50
         </div>
51
-        <div class="col-md-4 text-center">
51
+        <div class="col-md-4">
52
           <p>
52
           <p>
53
             <img class="img-fluid" src="./../../../public/img/residential.jpg" alt="About Resale" />
53
             <img class="img-fluid" src="./../../../public/img/residential.jpg" alt="About Resale" />
54
           </p>
54
           </p>
70
       </div>
70
       </div>
71
       <br />
71
       <br />
72
     </div>
72
     </div>
73
-    <div class="container col-md-10" v-if="propertyType === 'Commercial'">
73
+
74
+    <div class="container col-md-12" v-if="propertyType === 'Commercial'">
75
+      <div class="col-sm-12">
76
+        <div class="about-img-box">
77
+          <img
78
+            src="img/Johannesburg-south-africa-1.jpg"
79
+            alt="Property Listing"
80
+            class="img-fluid"
81
+            style="width:800px;height:400px;"
82
+          />
83
+        </div>
84
+        <div class="sinse-box">
85
+          <h3 class="sinse-title">
86
+            Property Listing
87
+            <span></span>
88
+          </h3>
89
+        </div>
90
+      </div>
91
+      <br />
74
       <div class="row">
92
       <div class="row">
75
         <div class="col-md-12">
93
         <div class="col-md-12">
76
           <h1 class="my-4">About Commercial Properties</h1>
94
           <h1 class="my-4">About Commercial Properties</h1>
77
         </div>
95
         </div>
78
-        <div class="col-md-8 text-left">
96
+        <div class="container col-md-6 text-left">
79
           <p>
97
           <p>
80
             Commercial properties are characteristically any larger properties that
98
             Commercial properties are characteristically any larger properties that
81
             generate profit through leasing or rental activities. These properties
99
             generate profit through leasing or rental activities. These properties
98
             <router-link to="/property/Commercial/Sale">Click Here</router-link>
116
             <router-link to="/property/Commercial/Sale">Click Here</router-link>
99
           </p>
117
           </p>
100
         </div>
118
         </div>
101
-        <div class="col-md-4 text-center">
119
+        <div class="col-md-4">
102
           <p>
120
           <p>
103
             <img class="img-fluid" src="./../../../public/img/commercial.jpg" alt="About Resale" />
121
             <img class="img-fluid" src="./../../../public/img/commercial.jpg" alt="About Resale" />
104
           </p>
122
           </p>

+ 0
- 1
src/components/property/propertyUserField.vue 查看文件

40
   name: 'UserDefinedField',
40
   name: 'UserDefinedField',
41
   props: {
41
   props: {
42
     fields: { type: Array, default: () => [] },
42
     fields: { type: Array, default: () => [] },
43
-    SetFieldValue: Function,
44
   },
43
   },
45
   data() {
44
   data() {
46
     return {
45
     return {

+ 87
- 36
src/components/property/propertyeditPage.vue 查看文件

170
                   class="form-control"
170
                   class="form-control"
171
                   name="propertyType"
171
                   name="propertyType"
172
                   id="propertyType"
172
                   id="propertyType"
173
-                  v-model="property.per"
173
+                  v-model="property.pricePer"
174
                 >
174
                 >
175
                   <option value>Please select</option>
175
                   <option value>Please select</option>
176
-                  <option value="month">Month</option>
177
-                  <option value="day">Day</option>
176
+                  <option value="Month">Month</option>
177
+                  <option value="Day">Day</option>
178
                 </select>
178
                 </select>
179
               </div>
179
               </div>
180
             </div>
180
             </div>
196
               v-if="propertyType === 'Residential' & propertyOverviewFields.length > 0"
196
               v-if="propertyType === 'Residential' & propertyOverviewFields.length > 0"
197
               :fields="propertyOverviewFields[0].fields"
197
               :fields="propertyOverviewFields[0].fields"
198
               @UpdateUserDefinedFields="UpdateUserDefinedFields"
198
               @UpdateUserDefinedFields="UpdateUserDefinedFields"
199
+              :id="1"
199
             ></UserField>
200
             ></UserField>
200
             <div class="form-group row" />
201
             <div class="form-group row" />
201
-            <div v-for="item in propertyFields" :key="item.id">
202
+            <div v-for="(item, i) in propertyFields" :key="item.id">
202
               <div class="row">
203
               <div class="row">
203
                 <div class="col-sm-12">
204
                 <div class="col-sm-12">
204
                   <div class="title-box-d">
205
                   <div class="title-box-d">
208
               </div>
209
               </div>
209
               <UserField
210
               <UserField
210
                 :fields="item.fields"
211
                 :fields="item.fields"
211
-                :id="item.id"
212
+                :id="item.name"
212
                 @UpdateUserDefinedFields="UpdateUserDefinedFields"
213
                 @UpdateUserDefinedFields="UpdateUserDefinedFields"
213
               />
214
               />
214
             </div>
215
             </div>
222
             </div>
223
             </div>
223
             <ImageLoad :loadedImages="loadedImages" :savedImages="propertyImages" />
224
             <ImageLoad :loadedImages="loadedImages" :savedImages="propertyImages" />
224
             <button
225
             <button
226
+              v-if="!wait"
225
               type="button"
227
               type="button"
226
               @click="SubmitData()"
228
               @click="SubmitData()"
227
               class="btn btn-b-n"
229
               class="btn btn-b-n"
228
               style="width: 85px; height:40px;"
230
               style="width: 85px; height:40px;"
229
-            >Save</button>
231
+            >
232
+              <!-- <span class="spinner-border" role="status" aria-hidden="true"></span>
233
+              <span class="sr-only">Loading...</span>-->
234
+              Save
235
+            </button>
236
+            <label v-if="wait">Please wait...</label>
230
           </form>
237
           </form>
231
         </div>
238
         </div>
232
       </div>
239
       </div>
255
       selectedCity: '',
262
       selectedCity: '',
256
       images: [],
263
       images: [],
257
       propertyFieldValues: [],
264
       propertyFieldValues: [],
265
+      defaultImage: 0,
266
+      wait: false,
258
     };
267
     };
259
   },
268
   },
260
   methods: {
269
   methods: {
266
       'saveProperty',
275
       'saveProperty',
267
       'getProperty',
276
       'getProperty',
268
       'getPropertyImages',
277
       'getPropertyImages',
278
+      'clearProperty',
279
+      'clearPropertyImages',
280
+      'getPropertyEditDisplay',
281
+      'getPropertySavedOverviewFields',
282
+      'getPropertySavedFields',
283
+      'getSavedPropertyData',
269
     ]),
284
     ]),
270
     SubmitData() {
285
     SubmitData() {
271
-      let isDefault = true;
272
-      this.images.forEach((imagedata) => {
286
+      this.wait = true;
287
+      for (let i = 0; i < this.images.length; i++) {
288
+        let setAsDefault = false;
289
+        if (i === this.defaultImage) {
290
+          setAsDefault = true;
291
+        }
273
         this.property.propertyImages.push({
292
         this.property.propertyImages.push({
274
-          image: imagedata,
275
-          isDefault,
293
+          image: this.images[i],
294
+          isDefault: setAsDefault,
276
         });
295
         });
277
-        isDefault = false;
278
-      });
279
-      this.property.propertyUserFields = this.propertyFieldValues;
296
+      }
297
+      this.property.createdBy = 'GeorgeW';
280
 
298
 
281
       this.saveProperty(this.property);
299
       this.saveProperty(this.property);
282
 
300
 
283
-      this.$router.push({
284
-        path: '/property/search',
285
-        query: { type: this.salesType, propertyType: this.propertyType },
286
-      });
301
+      setTimeout(
302
+        () => this.$router.push({
303
+            path: '/property/search',
304
+            query: { type: this.salesType, propertyType: this.propertyType },
305
+          }),
306
+        3000,
307
+      );
287
     },
308
     },
288
     ProvinceSelected(item) {
309
     ProvinceSelected(item) {
289
       if (item.target.options.selectedIndex > 0) {
310
       if (item.target.options.selectedIndex > 0) {
321
         this.propertyFieldValues.push(item);
342
         this.propertyFieldValues.push(item);
322
       }
343
       }
323
     },
344
     },
345
+    UpdateDefaultImage(item) {
346
+      this.defaultImage = item;
347
+    },
324
   },
348
   },
325
   mounted() {
349
   mounted() {
350
+    this.wait = false;
351
+    this.clearProperty();
352
+    this.clearPropertyImages();
353
+    this.images = [];
354
+    this.defaultImage = 0;
355
+
356
+    if (this.propertyOverviewFields.length > 0) {
357
+      this.propertyOverviewFields = [];
358
+    }
359
+    if (this.propertyFields.length > 0) {
360
+      this.propertyFields = [];
361
+    }
362
+
326
     this.propertyType = this.$route.params.propType;
363
     this.propertyType = this.$route.params.propType;
327
     this.salesType = this.$route.params.saleType;
364
     this.salesType = this.$route.params.saleType;
328
 
365
 
329
-    this.getProvince();
330
     this.getPropertyTypes(this.$route.params.propType);
366
     this.getPropertyTypes(this.$route.params.propType);
331
-    this.getPropertyOverviewFields();
332
-    this.getPropertyFields(this.$route.params.propType);
333
 
367
 
368
+    this.getProvince();
369
+    if (this.$route.query.id) {
370
+      // this.getCities(Object.assign({}, { province: this.selectedProvince }));
371
+      this.getSavedPropertyData(
372
+        Object.assign({}, { id: this.$route.query.id, type: this.propertyType }),
373
+      );
374
+    } else {
375
+      this.getPropertyOverviewFields();
376
+      this.getPropertyFields(this.$route.params.propType);
377
+    }
334
     // if (this.$route.params.id) {
378
     // if (this.$route.params.id) {
379
+    //   this.getPropertyEditDisplay(4); // (this.$route.params.id);
380
+    //   this.propertyType = 'Residential'; // this.propertyEditDisplay.propertyType;
381
+    //   this.salesType = 'Rental'; // this.propertyEditDisplay.saleType;
382
+
383
+    //   this.getProvince();
384
+    //   this.getPropertyTypes('Residential');
385
+    //   this.getPropertySavedOverviewFields(4);
386
+    //   this.getPropertySavedFields(
387
+    //     Object.assign(
388
+    //       {},
389
+    //       {
390
+    //         type: 'Residential',
391
+    //         id: 4,
392
+    //       },
393
+    //     ),
394
+    //   );
395
+
335
     //   this.getProperty(this.$route.params.id);
396
     //   this.getProperty(this.$route.params.id);
336
-    //   this.getPropertyImages(this.$route.params.id);
397
+    // } else {
398
+
337
     // }
399
     // }
338
-    /*
339
-    if (this.$route.params.id) {
340
-      this.getProperty(this.$route.params.id);
341
-      this.getPropertyImages(this.$route.params.id);
342
-      if (this.property.propertyType.usageType === 0) {
343
-        this.propertyType = 'Residential';
344
-      } else {
345
-        this.propertyType = 'Commercial';
346
-      }
347
-      this.salesType = this.property.isSale ? 'Sale' : 'Rental';
348
-    } */
349
   },
400
   },
350
   computed: {
401
   computed: {
351
     ...mapState('searchTab', ['provinces', 'cities', 'suburbs']),
402
     ...mapState('searchTab', ['provinces', 'cities', 'suburbs']),
361
       this.propertyType = this.$route.params.propType;
412
       this.propertyType = this.$route.params.propType;
362
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
413
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
363
       this.salesType = this.$route.params.saleType;
414
       this.salesType = this.$route.params.saleType;
364
-
365
-      this.getPropertyTypes(this.$route.params.propType);
366
-
367
-      this.getPropertyFields(this.$route.params.propType);
415
+      if (!this.$route.query.id) {
416
+        this.getPropertyTypes(this.$route.params.propType);
417
+        this.getPropertyFields(this.$route.params.propType);
418
+      }
368
 
419
 
369
       return this.propertyType;
420
       return this.propertyType;
370
     },
421
     },

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

96
               >To Sell</div>
96
               >To Sell</div>
97
               <div
97
               <div
98
                 class="dropdown-item cursor-pointer"
98
                 class="dropdown-item cursor-pointer"
99
-                @click="routerGoTo('/property/list/Residential/GeorgeW')"
99
+                @click="routerGoTo('/property/list/Residential/MyListings')"
100
               >My Residential Properties</div>
100
               >My Residential Properties</div>
101
               <div
101
               <div
102
                 class="dropdown-item cursor-pointer"
102
                 class="dropdown-item cursor-pointer"
129
               >To Sell</a>
129
               >To Sell</a>
130
               <a
130
               <a
131
                 class="dropdown-item cursor-pointer"
131
                 class="dropdown-item cursor-pointer"
132
-                @click="routerGoTo('/property/list/Commercial/GeorgeW')"
132
+                @click="routerGoTo('/property/list/Commercial/MyListings')"
133
               >My Commercial Properties</a>
133
               >My Commercial Properties</a>
134
               <a
134
               <a
135
                 class="dropdown-item cursor-pointer"
135
                 class="dropdown-item cursor-pointer"

+ 56
- 47
src/components/timeshare/searchTimeshare.vue 查看文件

1
 <template>
1
 <template>
2
-  <div>
2
+  <div class="container">
3
     <form
3
     <form
4
       id="mainForm"
4
       id="mainForm"
5
       method="POST"
5
       method="POST"
7
       accept-charset="UTF-8"
7
       accept-charset="UTF-8"
8
       enctype="multipart/form-data"
8
       enctype="multipart/form-data"
9
     >
9
     >
10
-      <div class="form-group">
10
+      <div class="form-group text-left">
11
+        <label>Region</label>
11
         <select class="form-control" name="region" id="region" v-model="selectedRegion">
12
         <select class="form-control" name="region" id="region" v-model="selectedRegion">
12
           <option v-for="(item, i) in regions" :key="i">{{item.regionName}}</option>
13
           <option v-for="(item, i) in regions" :key="i">{{item.regionName}}</option>
13
         </select>
14
         </select>
14
       </div>
15
       </div>
15
-      <div class="form-group">
16
+      <div class="form-group text-left">
17
+        <label>Resort Name</label>
16
         <select class="form-control" name="resort" id="resort" v-model="selectedResort">
18
         <select class="form-control" name="resort" id="resort" v-model="selectedResort">
17
           <option v-for="(item, i) in filteredResorts" :key="i">{{item.resortName}}</option>
19
           <option v-for="(item, i) in filteredResorts" :key="i">{{item.resortName}}</option>
18
         </select>
20
         </select>
19
       </div>
21
       </div>
20
-      <div class="form-group">
21
-        <select class="form-control" id="resort" name="resort">
22
-          <option value>Resort</option>
23
-        </select>
24
-      </div>
25
-      <div class="form-group">
26
-        <select class="form-control" name="season">
27
-          <option value>
28
-            <span style="color:white;">Season</span>
29
-          </option>
30
-        </select>
31
-      </div>
32
-      <div class="form-group">
33
-        <select class="form-control" name="bedrooms">
34
-          <option value>Bedrooms</option>
22
+      <div class="form-group text-left">
23
+        <label>Bedrooms</label>
24
+        <select class="form-control" name="bedrooms" v-model="sellItem.bedrooms">
25
+          <option v-for="(item, i) in resortBedrooms" :key="i">{{item}}</option>
35
         </select>
26
         </select>
36
       </div>
27
       </div>
37
-
38
-      <div class="form-group">
39
-        <input
40
-          class="form-control"
41
-          type="number"
42
-          step="any"
43
-          id="minPrice"
44
-          name="minPrice"
45
-          placeholder="Minimum Price"
46
-        />
47
-      </div>
28
+      <hr />
48
       <div class="form-group">
29
       <div class="form-group">
49
-        <input
50
-          class="form-control"
51
-          type="number"
52
-          step="any"
53
-          id="maxPrice"
54
-          name="maxPrice"
55
-          placeholder="Maximum Price"
56
-        />
30
+        <div class="row">
31
+          <div class="col-md-6 text-left">
32
+            <label>Minimum Price</label>
33
+            <div class="input-group mb-3">
34
+              <div class="input-group-prepend">
35
+                <span class="input-group-text">R</span>
36
+              </div>
37
+              <input
38
+                class="form-control"
39
+                type="number"
40
+                step="any"
41
+                id="minPrice"
42
+                name="minPrice"
43
+                placeholder="Minimum Price"
44
+              />
45
+            </div>
46
+          </div>
47
+          <div class="col-md-6 text-left">
48
+            <label>Maximum Price</label>
49
+            <div class="input-group mb-3">
50
+              <div class="input-group-prepend">
51
+                <span class="input-group-text">R</span>
52
+              </div>
53
+              <input
54
+                class="form-control"
55
+                type="number"
56
+                step="any"
57
+                id="maxPrice"
58
+                name="maxPrice"
59
+                placeholder="Maximum Price"
60
+              />
61
+            </div>
62
+          </div>
63
+        </div>
57
       </div>
64
       </div>
65
+      <hr />
58
       <div class="form-group">
66
       <div class="form-group">
59
-        <label>Filter Arrival Date From</label>
60
-        <input type="date" class="form-control" name="arrivaldate" value />
67
+        <div class="row">
68
+          <div class="col-md-6 text-left">
69
+            <label>Filter Arrival Date From</label>
70
+            <input type="date" class="form-control" name="arrivaldate" value />
71
+          </div>
72
+          <div class="col-md-6 text-left">
73
+            <label>Filter Arrival Date To</label>
74
+            <input type="date" class="form-control" name="arrivaldate" value />
75
+          </div>
76
+        </div>
61
       </div>
77
       </div>
62
-      <div class="form-group">
63
-        <label>Filter Arrival Date To</label>
64
-        <input type="date" class="form-control" name="arrivaldate" value />
65
-      </div>
66
-
67
-      <br />
68
-
69
-      <button class="btn btn-b-n" type="submit">Search</button>
70
     </form>
78
     </form>
71
   </div>
79
   </div>
72
 </template>
80
 </template>
73
 
81
 
74
 <script>
82
 <script>
75
 import { mapState, mapActions } from 'vuex';
83
 import { mapState, mapActions } from 'vuex';
84
+import _ from 'lodash';
76
 
85
 
77
 export default {
86
 export default {
78
   data() {
87
   data() {

+ 9
- 7
src/components/timeshare/sell/sellPage.vue 查看文件

34
         <hr />
34
         <hr />
35
       </div>
35
       </div>
36
     </div>
36
     </div>
37
-    <div v-for="(item, i) in sellItem" :key="i">{{item}}</div>
38
     <div class="row mb-4">
37
     <div class="row mb-4">
39
       <div class="container col-md-10">
38
       <div class="container col-md-10">
40
         <form
39
         <form
345
             <div class="col-md-4">
344
             <div class="col-md-4">
346
               <div class="input-group mb-3">
345
               <div class="input-group mb-3">
347
                 <div class="input-group-prepend">
346
                 <div class="input-group-prepend">
348
-                  <span class="input-group-text">R</span>
347
+                  <span class="input-group-text" style="color: #60CBEB">
348
+                    <b>R</b>
349
+                  </span>
349
                 </div>
350
                 </div>
350
                 <input
351
                 <input
351
                   class="form-control"
352
                   class="form-control"
352
                   type="number"
353
                   type="number"
353
                   step="any"
354
                   step="any"
354
                   name="purchasePrice"
355
                   name="purchasePrice"
355
-                  placeholder="R"
356
                   v-model="sellItem.originalPurchasePrice"
356
                   v-model="sellItem.originalPurchasePrice"
357
                 />
357
                 />
358
               </div>
358
               </div>
396
             <div class="col-md-4">
396
             <div class="col-md-4">
397
               <div class="input-group mb-3">
397
               <div class="input-group mb-3">
398
                 <div class="input-group-prepend">
398
                 <div class="input-group-prepend">
399
-                  <span class="input-group-text">R</span>
399
+                  <span class="input-group-text" style="color: #60CBEB">
400
+                    <b>R</b>
401
+                  </span>
400
                 </div>
402
                 </div>
401
                 <input
403
                 <input
402
                   class="form-control"
404
                   class="form-control"
403
                   type="number"
405
                   type="number"
404
                   step="any"
406
                   step="any"
405
                   name="sellingPrice"
407
                   name="sellingPrice"
406
-                  placeholder="R"
407
                   v-model="sellItem.sellingPrice"
408
                   v-model="sellItem.sellingPrice"
408
                 />
409
                 />
409
               </div>
410
               </div>
421
             <div class="col-md-4">
422
             <div class="col-md-4">
422
               <div class="input-group mb-3">
423
               <div class="input-group mb-3">
423
                 <div class="input-group-prepend">
424
                 <div class="input-group-prepend">
424
-                  <span class="input-group-text">R</span>
425
+                  <span class="input-group-text" style="color: #60CBEB">
426
+                    <b>R</b>
427
+                  </span>
425
                 </div>
428
                 </div>
426
                 <input
429
                 <input
427
                   class="form-control"
430
                   class="form-control"
428
                   type="number"
431
                   type="number"
429
                   step="any"
432
                   step="any"
430
                   name="commission"
433
                   name="commission"
431
-                  placeholder="R"
432
                   v-model="sellItem.agentCommission"
434
                   v-model="sellItem.agentCommission"
433
                 />
435
                 />
434
               </div>
436
               </div>

+ 46
- 35
src/components/user/loginPage.vue 查看文件

8
             <h4>Login</h4>
8
             <h4>Login</h4>
9
           </div>
9
           </div>
10
           <div class="row">
10
           <div class="row">
11
-            <div>
12
-              <eva-icon name="lock-outline" fill="#60CBEB"></eva-icon>
13
-            </div>
14
-            <div class="col-md-11">
15
-              <input
16
-                class="form-control"
17
-                v-model="username"
18
-                placeholder="Username"
19
-                type="text"
20
-                name="username"
21
-                value
22
-              />
23
-            </div>
24
-            <div>
25
-              <eva-icon
26
-                v-if="!showPassword"
27
-                name="eye-off"
28
-                fill="#60CBEB"
29
-                @click="togglePassword()"
30
-              ></eva-icon>
31
-              <eva-icon v-else name="eye" fill="#60CBEB" @click="passwordToggled()"></eva-icon>
32
-            </div>
33
-            <div class="col-md-11">
34
-              <input
35
-                class="form-control"
36
-                :type="isPasswordShown"
37
-                v-model="password"
38
-                id="password"
39
-                placeholder="Password"
40
-                name="password"
41
-                value
42
-              />
11
+            <div class="col-md-11" style="margin-bottom: 1em">
12
+              <div class="input-group mb-3">
13
+                <div class="input-group-prepend">
14
+                  <span class="input-group-text">
15
+                    <eva-icon name="person" fill="#60CBEB"></eva-icon>
16
+                  </span>
17
+                  <input
18
+                    class="form-control"
19
+                    type="text"
20
+                    name="username"
21
+                    placeholder="Username"
22
+                    value
23
+                  />
24
+                </div>
25
+              </div>
26
+              <div class="input-group mb-3">
27
+                <div class="input-group-prepend">
28
+                  <span class="input-group-text">
29
+                    <eva-icon name="lock" fill="#60CBEB"></eva-icon>
30
+                  </span>
31
+                  <input
32
+                    class="form-control"
33
+                    :type="isPasswordShown"
34
+                    v-model="password"
35
+                    id="password"
36
+                    placeholder="Password"
37
+                    name="password"
38
+                    value
39
+                  />
40
+                  <div class="input-group-append">
41
+                    <span class="input-group-text">
42
+                      <eva-icon
43
+                        v-if="!showPassword"
44
+                        name="eye-off"
45
+                        fill="#60CBEB"
46
+                        @click="togglePassword()"
47
+                      ></eva-icon>
48
+                      <eva-icon v-else name="eye" fill="#60CBEB" @click="passwordToggled()"></eva-icon>
49
+                    </span>
50
+                  </div>
51
+                </div>
52
+              </div>
43
             </div>
53
             </div>
44
           </div>
54
           </div>
45
           <div class="form-group row"></div>
55
           <div class="form-group row"></div>
53
           <h5>Trouble signing in?</h5>
63
           <h5>Trouble signing in?</h5>
54
           <div>
64
           <div>
55
             <div class="row">
65
             <div class="row">
56
-              <eva-icon name="email" fill="#60CBEB"></eva-icon>
57
-
58
-              <div class="col-md-11">
66
+              <div class="input-group-prepend">
67
+                <span class="input-group-text">
68
+                  <eva-icon name="email" fill="#60CBEB"></eva-icon>
69
+                </span>
59
                 <input class="form-control" placeholder="Your Email" type="text" name="email" value />
70
                 <input class="form-control" placeholder="Your Email" type="text" name="email" value />
60
               </div>
71
               </div>
61
             </div>
72
             </div>

+ 62
- 34
src/components/user/registerAgencySection.vue 查看文件

5
       <div class="reg-page">
5
       <div class="reg-page">
6
         <div class="regform" style="text-align:left">
6
         <div class="regform" style="text-align:left">
7
           <h4>Agency Details</h4>
7
           <h4>Agency Details</h4>
8
-          <div class="col-md-8" style="margin-bottom: 1em">
9
-            <eva-icon name="people" fill="#60CBEB"></eva-icon>
10
-            <input
11
-              class="form-control"
12
-              type="text"
13
-              name="agencyname"
14
-              placeholder="Agency Name"
15
-              v-model="registerAgency.name"
16
-            />
17
-          </div>
18
-          <div class="col-md-8" style="margin-bottom: 1em">
19
-            <eva-icon name="book" fill="#60CBEB"></eva-icon>
20
-            <input
21
-              class="form-control"
22
-              type="text"
23
-              name="eaabffcnumber"
24
-              placeholder="EAAB FFC Number"
25
-              v-model="registerAgency.eaabeffcNumber"
26
-            />
27
-          </div>
28
-          <div class="col-md-8">
29
-            <eva-icon name="clipboard" fill="#60CBEB"></eva-icon>
30
-            <input
31
-              class="form-control"
32
-              type="text"
33
-              name="companyregnumber"
34
-              placeholder="Company Registration Number"
35
-              v-model="registerAgency.companyRegNumber"
36
-            />
8
+          <div class="row" style="text-align:left">
9
+            <div class="col-md-8" style="margin-bottom: 1em">
10
+              <div class="input-group-prepend">
11
+                <span class="input-group-text">
12
+                  <eva-icon name="people" fill="#60CBEB"></eva-icon>
13
+                </span>
14
+                <input
15
+                  class="form-control"
16
+                  type="text"
17
+                  name="agencyname"
18
+                  placeholder="Agency Name"
19
+                  v-model="registerAgency.name"
20
+                />
21
+              </div>
22
+            </div>
23
+            <div class="col-md-8" style="margin-bottom: 1em">
24
+              <div class="input-group-prepend">
25
+                <span class="input-group-text">
26
+                  <eva-icon name="book" fill="#60CBEB"></eva-icon>
27
+                </span>
28
+                <input
29
+                  class="form-control"
30
+                  type="text"
31
+                  name="eaabffcnumber"
32
+                  placeholder="EAAB FFC Number"
33
+                  v-model="registerAgency.eaabeffcNumber"
34
+                />
35
+              </div>
36
+            </div>
37
+            <div class="col-md-8">
38
+              <div class="input-group-prepend">
39
+                <span class="input-group-text">
40
+                  <eva-icon name="clipboard" fill="#60CBEB"></eva-icon>
41
+                </span>
42
+                <input
43
+                  class="form-control"
44
+                  type="text"
45
+                  name="companyregnumber"
46
+                  placeholder="Company Registration Number"
47
+                  v-model="registerAgency.companyRegNumber"
48
+                />
49
+              </div>
50
+            </div>
37
           </div>
51
           </div>
38
           <hr />
52
           <hr />
39
           <div class="col-md-10" style="text-align:left">
53
           <div class="col-md-10" style="text-align:left">
40
             <h5 style="margin-bottom: 1em">Agency Administrator</h5>
54
             <h5 style="margin-bottom: 1em">Agency Administrator</h5>
41
             <div class="row" style="text-align:left">
55
             <div class="row" style="text-align:left">
42
-              <div class="col-md-6" style="margin-bottom: 1em">
56
+              <div class="input-group mb-3">
43
                 <div class="input-group-prepend">
57
                 <div class="input-group-prepend">
44
                   <span class="input-group-text">
58
                   <span class="input-group-text">
45
                     <eva-icon name="person" fill="#60CBEB"></eva-icon>
59
                     <eva-icon name="person" fill="#60CBEB"></eva-icon>
54
                 </div>
68
                 </div>
55
               </div>
69
               </div>
56
 
70
 
57
-              <div class="col-md-6" style="margin-bottom: 1em">
71
+              <div class="input-group mb-3">
58
                 <div class="input-group-prepend">
72
                 <div class="input-group-prepend">
59
                   <span class="input-group-text">
73
                   <span class="input-group-text">
60
                     <eva-icon name="person" fill="#60CBEB"></eva-icon>
74
                     <eva-icon name="person" fill="#60CBEB"></eva-icon>
93
                   </span>
107
                   </span>
94
                   <input
108
                   <input
95
                     class="form-control"
109
                     class="form-control"
96
-                    type="text"
110
+                    type="number"
97
                     name="cellnumber"
111
                     name="cellnumber"
98
-                    placeholder="Contact Number"
112
+                    placeholder="Cellphone Number"
99
                     v-model="registerAgency.user.cellNumber"
113
                     v-model="registerAgency.user.cellNumber"
100
                   />
114
                   />
101
                 </div>
115
                 </div>
102
               </div>
116
               </div>
117
+              <div class="input-group mb-3">
118
+                <div class="input-group-prepend">
119
+                  <span class="input-group-text">
120
+                    <eva-icon name="phone-outline" fill="#60CBEB"></eva-icon>
121
+                  </span>
122
+                  <input
123
+                    class="form-control"
124
+                    type="number"
125
+                    name="landlinenumber"
126
+                    placeholder="Landline Number"
127
+                    v-model="registerAgency.user.telephone"
128
+                  />
129
+                </div>
130
+              </div>
103
             </div>
131
             </div>
104
-
132
+            <hr />
105
             <div class="row">
133
             <div class="row">
106
               <div class="input-group mb-3">
134
               <div class="input-group mb-3">
107
                 <div class="input-group-prepend">
135
                 <div class="input-group-prepend">

+ 142
- 86
src/components/user/registerPage.vue 查看文件

1
 <template>
1
 <template>
2
+  <!-- eslint-disable max-len -->
2
   <form>
3
   <form>
3
-    <!-- eslint-disable max-len -->
4
     <div class="reg-page">
4
     <div class="reg-page">
5
       <div class="regform">
5
       <div class="regform">
6
         <div class="col-md-10" style="text-align:left">
6
         <div class="col-md-10" style="text-align:left">
7
-          <h5 style="margin-bottom: 1em">{{ Header }}</h5>
7
+          <h4>Private Individual</h4>
8
           <div class="row" style="text-align:left">
8
           <div class="row" style="text-align:left">
9
-            <div class="col-md-6" style="margin-bottom: 1em">
10
-              <eva-icon name="person" fill="#60CBEB"></eva-icon>
11
-              <input
12
-                class="form-control"
13
-                type="text"
14
-                name="name"
15
-                placeholder="Name"
16
-                v-model="registerIndividual.name"
17
-              />
9
+            <div class="col-md-8" style="margin-bottom: 1em">
10
+              <div class="input-group-prepend">
11
+                <span class="input-group-text">
12
+                  <eva-icon name="people" fill="#60CBEB"></eva-icon>
13
+                </span>
14
+                <input
15
+                  class="form-control"
16
+                  type="text"
17
+                  name="name"
18
+                  placeholder="Name"
19
+                  v-model="registerIndividual.name"
20
+                />
21
+              </div>
18
             </div>
22
             </div>
19
-            <div class="col-md-6" style="margin-bottom: 1em">
20
-              <eva-icon name="person" fill="#60CBEB"></eva-icon>
21
-              <input
22
-                class="form-control"
23
-                type="text"
24
-                name="surname"
25
-                placeholder="Surname"
26
-                v-model="registerIndividual.surname"
27
-              />
23
+            <div class="col-md-8" style="margin-bottom: 1em">
24
+              <div class="input-group-prepend">
25
+                <span class="input-group-text">
26
+                  <eva-icon name="book" fill="#60CBEB"></eva-icon>
27
+                </span>
28
+                <input
29
+                  class="form-control"
30
+                  type="text"
31
+                  name="surname"
32
+                  placeholder="Surname"
33
+                  v-model="registerIndividual.surname"
34
+                />
35
+              </div>
28
             </div>
36
             </div>
29
           </div>
37
           </div>
30
 
38
 
31
           <div class="row" style="text-align:left">
39
           <div class="row" style="text-align:left">
32
-            <div class="col-md-8">
33
-              <eva-icon name="email" fill="#60CBEB"></eva-icon>
34
-              <input
35
-                class="form-control"
36
-                type="text"
37
-                name="email"
38
-                placeholder="Email Address"
39
-                v-model="registerIndividual.email"
40
-              />
41
-              <div class="form-group row"></div>
40
+            <div class="col-md-7" style="text-align:left">
41
+              <div class="input-group mb-3">
42
+                <div class="input-group-prepend">
43
+                  <span class="input-group-text">
44
+                    <eva-icon name="email" fill="#60CBEB"></eva-icon>
45
+                  </span>
46
+                  <input
47
+                    class="form-control"
48
+                    type="text"
49
+                    name="email"
50
+                    placeholder="Email Address"
51
+                    v-model="registerIndividual.email"
52
+                  />
53
+                  <div class="form-group row"></div>
54
+                </div>
55
+              </div>
42
             </div>
56
             </div>
43
 
57
 
44
-            <div class="col-md-6" style="text-align:left">
45
-              <eva-icon name="smartphone" fill="#60CBEB"></eva-icon>
46
-              <input
47
-                class="form-control"
48
-                type="text"
49
-                name="cellnumber"
50
-                placeholder="Contact Number"
51
-                v-model="registerIndividual.cellNumber"
52
-              />
58
+            <div class="col-md-8" style="text-align:left">
59
+              <div class="input-group mb-3">
60
+                <div class="input-group-prepend">
61
+                  <span class="input-group-text">
62
+                    <eva-icon name="smartphone" fill="#60CBEB"></eva-icon>
63
+                  </span>
64
+                  <input
65
+                    class="form-control"
66
+                    type="number"
67
+                    name="cellnumber"
68
+                    placeholder="Cellphone Number"
69
+                    v-model="registerIndividual.cellNumber"
70
+                  />
71
+                </div>
72
+              </div>
73
+              <div class="input-group mb-3">
74
+                <div class="input-group-prepend">
75
+                  <span class="input-group-text">
76
+                    <eva-icon name="phone-outline" fill="#60CBEB"></eva-icon>
77
+                  </span>
78
+                  <input
79
+                    class="form-control"
80
+                    type="number"
81
+                    name="landline"
82
+                    placeholder="Landline Number"
83
+                    v-model="registerIndividual.telephone"
84
+                  />
85
+                </div>
86
+              </div>
53
             </div>
87
             </div>
54
           </div>
88
           </div>
55
           <hr />
89
           <hr />
56
           <div class="row">
90
           <div class="row">
57
-            <div class="col-md-7" style="margin-bottom: 1em">
58
-              <eva-icon name="person" fill="#60CBEB"></eva-icon>
59
-              <input
60
-                class="form-control"
61
-                type="text"
62
-                name="username"
63
-                placeholder="Username"
64
-                v-model="registerIndividual.username"
65
-              />
91
+            <div class="col-md-8" style="margin-bottom: 1em">
92
+              <div class="input-group mb-3">
93
+                <div class="input-group-prepend">
94
+                  <span class="input-group-text">
95
+                    <eva-icon name="person" fill="#60CBEB"></eva-icon>
96
+                  </span>
97
+                  <input
98
+                    class="form-control"
99
+                    type="text"
100
+                    name="username"
101
+                    placeholder="Username"
102
+                    v-model="registerIndividual.username"
103
+                  />
104
+                </div>
105
+              </div>
66
             </div>
106
             </div>
67
-            <div class="col-md-7" style="margin-bottom: 1em">
68
-              <eva-icon name="lock" fill="#60CBEB"></eva-icon>
69
-              <input
70
-                class="form-control"
71
-                :type="isPasswordShown"
72
-                v-model="registerIndividual.password"
73
-                id="password"
74
-                placeholder="Password"
75
-                name="password"
76
-                value
77
-              />
107
+            <div class="col-md-8" style="margin-bottom: 1em">
108
+              <div class="input-group mb-3">
109
+                <div class="input-group-prepend">
110
+                  <span class="input-group-text">
111
+                    <eva-icon name="lock" fill="#60CBEB"></eva-icon>
112
+                  </span>
113
+                  <input
114
+                    class="form-control"
115
+                    :type="isPasswordShown"
116
+                    v-model="registerIndividual.password"
117
+                    id="password"
118
+                    placeholder="Password"
119
+                    name="password"
120
+                    value
121
+                  />
122
+                </div>
123
+              </div>
78
             </div>
124
             </div>
79
-            <div class="col-md-7" style="margin-bottom: 1em">
80
-              <eva-icon name="lock" fill="#60CBEB"></eva-icon>
81
-              <input
82
-                class="form-control"
83
-                :type="isPasswordShown"
84
-                v-model="registerIndividual.password"
85
-                id="password"
86
-                placeholder="Confirm Password"
87
-                name="confirmpassword"
88
-                value
89
-              />
90
-              <div>
91
-                <eva-icon
92
-                  v-if="!showPassword"
93
-                  name="eye-off"
94
-                  fill="#60CBEB"
95
-                  @click="togglePassword()"
96
-                ></eva-icon>
97
-                <eva-icon v-else name="eye" fill="#60CBEB" @click="passwordToggled()"></eva-icon>
125
+            <div class="col-md-8" style="margin-bottom: 1em">
126
+              <div class="input-group mb-3">
127
+                <div class="input-group-prepend">
128
+                  <span class="input-group-text">
129
+                    <eva-icon name="lock" fill="#60CBEB"></eva-icon>
130
+                  </span>
131
+                  <input
132
+                    class="form-control"
133
+                    :type="isPasswordShown"
134
+                    v-model="registerIndividual.password"
135
+                    id="password"
136
+                    placeholder="Confirm Password"
137
+                    name="confirmpassword"
138
+                    value
139
+                  />
140
+                  <div>
141
+                    <div class="input-group-append">
142
+                      <span class="input-group-text">
143
+                        <eva-icon
144
+                          v-if="!showPassword"
145
+                          name="eye-off"
146
+                          fill="#60CBEB"
147
+                          @click="togglePassword()"
148
+                        ></eva-icon>
149
+                        <eva-icon v-else name="eye" fill="#60CBEB" @click="passwordToggled()"></eva-icon>
150
+                      </span>
151
+                    </div>
152
+                  </div>
153
+                </div>
98
               </div>
154
               </div>
99
             </div>
155
             </div>
100
           </div>
156
           </div>
101
-        </div>
102
-        <div class="form-group row"></div>
103
-        <div class="row offset-md-1">
104
-          <div class="col-md-2">
105
-            <button @click="SubmitData()" class="btn btn-b-n" type="submit">Submit</button>
106
-          </div>
107
-          <div class="col-md-2 offset-md-1">
108
-            <button @click="Cancel()" class="btn btn-b-n" type="submit">Cancel</button>
157
+          <div class="form-group row"></div>
158
+          <div class="row offset-md-1">
159
+            <div class="col-md-2">
160
+              <button @click="SubmitData()" class="btn btn-b-n" type="submit">Submit</button>
161
+            </div>
162
+            <div class="col-md-2 offset-md-1">
163
+              <button @click="Cancel()" class="btn btn-b-n" type="submit">Cancel</button>
164
+            </div>
109
           </div>
165
           </div>
110
         </div>
166
         </div>
111
       </div>
167
       </div>

+ 0
- 2
src/main.js 查看文件

1
 import Vue from 'vue';
1
 import Vue from 'vue';
2
 import EvaIcons from 'vue-eva-icons';
2
 import EvaIcons from 'vue-eva-icons';
3
-import FileUpload from 'v-file-upload';
4
 import App from './App.vue';
3
 import App from './App.vue';
5
 import router from './router';
4
 import router from './router';
6
 import store from './store';
5
 import store from './store';
7
 
6
 
8
 Vue.use(EvaIcons);
7
 Vue.use(EvaIcons);
9
-Vue.use(FileUpload);
10
 
8
 
11
 Vue.config.productionTip = false;
9
 Vue.config.productionTip = false;
12
 
10
 

+ 158
- 163
src/router/index.js 查看文件

19
 import PropertyType from '../components/admin/property/propertyTypeEdit.vue';
19
 import PropertyType from '../components/admin/property/propertyTypeEdit.vue';
20
 import UserDefinedGroups from '../components/admin/property/userDefinedGroupsPage.vue';
20
 import UserDefinedGroups from '../components/admin/property/userDefinedGroupsPage.vue';
21
 import UserDefinedGroup from '../components/admin/property/userDefinedGroupPage.vue';
21
 import UserDefinedGroup from '../components/admin/property/userDefinedGroupPage.vue';
22
-import UserField from '../components/admin/property/userDefinedFieldPage.vue';
23
 
22
 
24
 import AboutUs from '../components/about/aboutUsPage.vue';
23
 import AboutUs from '../components/about/aboutUsPage.vue';
25
 import AboutTimeshare from '../components/about/aboutTimeshare.vue';
24
 import AboutTimeshare from '../components/about/aboutTimeshare.vue';
40
 Vue.use(Router);
39
 Vue.use(Router);
41
 
40
 
42
 export default new Router({
41
 export default new Router({
43
-  routes: [{
44
-    path: '/',
45
-    name: 'Home',
46
-    component: HomePage,
47
-  },
48
-  {
49
-    path: '/about/us',
50
-    name: 'aboutus',
51
-    component: AboutUs,
52
-  },
53
-  {
54
-    path: '/about/timeshare',
55
-    name: 'abouttimeshare',
56
-    component: AboutTimeshare,
57
-  },
58
-  {
59
-    path: '/timeshare/sell',
60
-    name: 'TimeshareSell',
61
-    component: TimeshareSell,
62
-  },
63
-  {
64
-    path: '/timeshare/buy',
65
-    name: 'TimeshareBuy',
66
-    component: TimeshareBuy,
67
-  },
68
-  {
69
-    path: '/timeshare/faq',
70
-    name: 'TimeshareFAQ',
71
-    component: TimeshareFAQ,
72
-  },
73
-  {
74
-    path: '/user/login',
75
-    name: 'Login',
76
-    component: Login,
77
-  },
78
-  {
79
-    path: '/user/register',
80
-    name: 'PrivateIndividual',
81
-    component: PrivateIndividual,
82
-  },
83
-  {
84
-    path: '/user/registeragency',
85
-    name: 'Agency',
86
-    component: Agency,
87
-  },
88
-  {
89
-    path: '/property/property/:id',
90
-    name: 'PropertyPage',
91
-    component: PropertyPage,
92
-  },
93
-  {
94
-    path: '/property/:propertyType/search',
95
-    name: 'PropertySearch',
96
-    component: PropertySearch,
97
-  },
98
-  {
99
-    path: '/property/search',
100
-    name: 'PropertySearchTab',
101
-    component: PropertySearch,
102
-  },
103
-  {
104
-    path: '/property/:propType/:saleType',
105
-    name: 'PropertyNew',
106
-    component: PropertyEdit,
107
-  },
108
-  {
109
-    path: '/property/:id',
110
-    name: 'PropertyEdit',
111
-    component: PropertyEdit,
112
-  },
113
-  {
114
-    path: '/property/list/:propertyType/:user',
115
-    name: 'PropertyList',
116
-    component: PropertyList,
117
-  },
118
-  {
119
-    path: '/propertyTypes/list',
120
-    name: 'PropertyTypeList',
121
-    component: PropertyTypeList,
122
-  },
123
-  {
124
-    path: '/propertyType/new',
125
-    name: 'PropertyTypeNew',
126
-    component: PropertyType,
127
-  },
128
-  {
129
-    path: '/propertyType/:id',
130
-    name: 'PropertyTypeEdit',
131
-    component: PropertyType,
132
-  },
133
-  {
134
-    path: '/userDefinedGroups/list',
135
-    name: 'UserDefinedGroupsList',
136
-    component: UserDefinedGroups,
137
-  },
138
-  {
139
-    path: '/userDefinedGroups/userDefinedGroup/:id',
140
-    name: 'UserDefinedGroupEdit',
141
-    component: UserDefinedGroup,
142
-  },
143
-  {
144
-    path: '/userDefinedGroups/userDefinedGroup',
145
-    name: 'UserDefinedGroupNew',
146
-    component: UserDefinedGroup,
147
-  },
148
-  {
149
-    path: '/userField',
150
-    name: 'UserDefinedField',
151
-    component: UserField,
152
-  },
153
-  {
154
-    path: '/status/list',
155
-    name: 'StatusList',
156
-    component: Status,
157
-  },
158
-  {
159
-    path: '/status/timeshareAdmin',
160
-    name: 'TimeshareAdmin',
161
-    component: timeshareAdminPage,
162
-  },
163
-  {
164
-    path: '/status/tenderWeekAdmin',
165
-    name: 'TenderWeekAdmin',
166
-    component: tenderWeekAdminPage,
167
-  },
168
-  {
169
-    path: '/status/userManagementPage',
170
-    name: 'userManagementPage',
171
-    component: userManagementPage,
172
-  },
173
-  {
174
-    path: '/status/changeLogPage',
175
-    name: 'changeLogPage',
176
-    component: changeLogPage,
177
-  },
178
-  {
179
-    path: '/unitConfiguration/list',
180
-    name: 'UnitConfiguration',
181
-    component: UnitConfiguration,
182
-  },
183
-  {
184
-    path: '/contactus',
185
-    name: 'ContactUs',
186
-    component: ContactUs,
187
-  },
188
-  {
189
-    path: '/privacypolicy',
190
-    name: 'PrivacyPolicy',
191
-    component: PrivacyPolicy,
192
-  },
193
-  {
194
-    path: '/resort/:resortCode',
195
-    name: 'ResortPage',
196
-    component: ResortPage,
197
-    props: true,
198
-  },
199
-  {
200
-    path: '/resort/:resortCode/:weekId',
201
-    name: 'UnitPage',
202
-    component: UnitPage,
203
-    props: true,
204
-  },
42
+  routes: [
43
+    {
44
+      path: '/',
45
+      name: 'Home',
46
+      component: HomePage,
47
+    },
48
+    {
49
+      path: '/about/us',
50
+      name: 'aboutus',
51
+      component: AboutUs,
52
+    },
53
+    {
54
+      path: '/about/timeshare',
55
+      name: 'abouttimeshare',
56
+      component: AboutTimeshare,
57
+    },
58
+    {
59
+      path: '/timeshare/sell',
60
+      name: 'TimeshareSell',
61
+      component: TimeshareSell,
62
+    },
63
+    {
64
+      path: '/timeshare/buy',
65
+      name: 'TimeshareBuy',
66
+      component: TimeshareBuy,
67
+    },
68
+    {
69
+      path: '/timeshare/faq',
70
+      name: 'TimeshareFAQ',
71
+      component: TimeshareFAQ,
72
+    },
73
+    {
74
+      path: '/user/login',
75
+      name: 'Login',
76
+      component: Login,
77
+    },
78
+    {
79
+      path: '/user/register',
80
+      name: 'PrivateIndividual',
81
+      component: PrivateIndividual,
82
+    },
83
+    {
84
+      path: '/user/registeragency',
85
+      name: 'Agency',
86
+      component: Agency,
87
+    },
88
+    {
89
+      path: '/property/property/:id',
90
+      name: 'PropertyPage',
91
+      component: PropertyPage,
92
+    },
93
+    {
94
+      path: '/property/:propertyType/search',
95
+      name: 'PropertySearch',
96
+      component: PropertySearch,
97
+    },
98
+    {
99
+      path: '/property/search',
100
+      name: 'PropertySearchTab',
101
+      component: PropertySearch,
102
+    },
103
+    {
104
+      path: '/property/:propType/:saleType',
105
+      name: 'PropertyNew',
106
+      component: PropertyEdit,
107
+    },
108
+    {
109
+      path: '/property/edit/:id/:propType/:saleType',
110
+      name: 'PropertyEdit',
111
+      component: PropertyEdit,
112
+    },
113
+    {
114
+      path: '/property/list/:propertyType/:user',
115
+      name: 'PropertyList',
116
+      component: PropertyList,
117
+    },
118
+    {
119
+      path: '/propertyTypes/list',
120
+      name: 'PropertyTypeList',
121
+      component: PropertyTypeList,
122
+    },
123
+    {
124
+      path: '/propertyType/new',
125
+      name: 'PropertyTypeNew',
126
+      component: PropertyType,
127
+    },
128
+    {
129
+      path: '/propertyType/:id',
130
+      name: 'PropertyTypeEdit',
131
+      component: PropertyType,
132
+    },
133
+    {
134
+      path: '/userDefinedGroups/list',
135
+      name: 'UserDefinedGroupsList',
136
+      component: UserDefinedGroups,
137
+    },
138
+    {
139
+      path: '/userDefinedGroups/userDefinedGroup/:id',
140
+      name: 'UserDefinedGroupEdit',
141
+      component: UserDefinedGroup,
142
+    },
143
+    {
144
+      path: '/userDefinedGroups/userDefinedGroup',
145
+      name: 'UserDefinedGroupNew',
146
+      component: UserDefinedGroup,
147
+    },
148
+    {
149
+      path: '/status/list',
150
+      name: 'StatusList',
151
+      component: Status,
152
+    },
153
+    {
154
+      path: '/status/timeshareAdmin',
155
+      name: 'TimeshareAdmin',
156
+      component: timeshareAdminPage,
157
+    },
158
+    {
159
+      path: '/status/tenderWeekAdmin',
160
+      name: 'TenderWeekAdmin',
161
+      component: tenderWeekAdminPage,
162
+    },
163
+    {
164
+      path: '/status/userManagementPage',
165
+      name: 'userManagementPage',
166
+      component: userManagementPage,
167
+    },
168
+    {
169
+      path: '/status/changeLogPage',
170
+      name: 'changeLogPage',
171
+      component: changeLogPage,
172
+    },
173
+    {
174
+      path: '/unitConfiguration/list',
175
+      name: 'UnitConfiguration',
176
+      component: UnitConfiguration,
177
+    },
178
+    {
179
+      path: '/contactus',
180
+      name: 'ContactUs',
181
+      component: ContactUs,
182
+    },
183
+    {
184
+      path: '/privacypolicy',
185
+      name: 'PrivacyPolicy',
186
+      component: PrivacyPolicy,
187
+    },
188
+    {
189
+      path: '/resort/:resortCode',
190
+      name: 'ResortPage',
191
+      component: ResortPage,
192
+      props: true,
193
+    },
194
+    {
195
+      path: '/resort/:resortCode/:weekId',
196
+      name: 'UnitPage',
197
+      component: UnitPage,
198
+      props: true,
199
+    },
205
   ],
200
   ],
206
 });
201
 });

+ 92
- 17
src/store/modules/property/property.js 查看文件

4
   namespaced: true,
4
   namespaced: true,
5
   state: {
5
   state: {
6
     property: {
6
     property: {
7
-      id: 0,
7
+      createdBy: '',
8
       propertyTypeId: 0,
8
       propertyTypeId: 0,
9
       propertyName: '',
9
       propertyName: '',
10
       unit: '',
10
       unit: '',
11
+      operationalCosts: 0.0,
12
+      price: 0,
13
+      pricePer: '',
14
+      isSale: false,
15
+      description: '',
16
+      shortDescription: '',
11
       addressLine1: '',
17
       addressLine1: '',
12
       addressLine2: '',
18
       addressLine2: '',
13
       addressLine3: '',
19
       addressLine3: '',
14
       suburbId: 0,
20
       suburbId: 0,
15
       cityId: 0,
21
       cityId: 0,
16
       provinceId: 0,
22
       provinceId: 0,
17
-      price: '',
18
-      per: '',
19
-      description: '',
20
-      isSale: false,
23
+      published: false,
21
       propertyUserFields: [],
24
       propertyUserFields: [],
22
       propertyImages: [],
25
       propertyImages: [],
26
+      id: 0,
23
     },
27
     },
24
     propertyImages: [],
28
     propertyImages: [],
25
     propertyTypes: [],
29
     propertyTypes: [],
61
     setLatestProperties(state, properties) {
65
     setLatestProperties(state, properties) {
62
       state.latestProperties = properties;
66
       state.latestProperties = properties;
63
     },
67
     },
68
+    clearProperty(state) {
69
+      state.property = {
70
+        createdBy: '',
71
+        propertyTypeId: 0,
72
+        propertyName: '',
73
+        unit: '',
74
+        operationalCosts: 0.0,
75
+        price: 0,
76
+        pricePer: '',
77
+        isSale: false,
78
+        description: '',
79
+        shortDescription: '',
80
+        addressLine1: '',
81
+        addressLine2: '',
82
+        addressLine3: '',
83
+        suburbId: 0,
84
+        cityId: 0,
85
+        provinceId: 0,
86
+        published: false,
87
+        propertyUserFields: [],
88
+        propertyImages: [],
89
+        id: 0,
90
+      };
91
+    },
92
+    clearPropertyImages(state) {
93
+      state.propertyImages = [];
94
+    },
95
+    setProperties(state, properties) {
96
+      state.properties = properties;
97
+    },
64
   },
98
   },
65
   getters: {},
99
   getters: {},
66
   actions: {
100
   actions: {
67
     getProperty({ commit }, id) {
101
     getProperty({ commit }, id) {
68
-      console.log(id);
69
       axios
102
       axios
70
-        .get(`http://localhost:57260/Property/Property/${id}`)
103
+        .get(`/api/Property/${id}`)
71
         .then(result => commit('setProperty', result.data))
104
         .then(result => commit('setProperty', result.data))
72
         .catch(console.error);
105
         .catch(console.error);
73
     },
106
     },
74
     getPropertyImages({ commit }, id) {
107
     getPropertyImages({ commit }, id) {
75
       axios
108
       axios
76
-        .get(`http://localhost:57260/property/PropertyImage/getpropertyimages/${id}`)
109
+        .get(`/api/PropertyImage/getPropertyImages/${id}`)
77
         .then(result => commit('setPropertyImages', result.data))
110
         .then(result => commit('setPropertyImages', result.data))
78
         .catch(console.error);
111
         .catch(console.error);
79
     },
112
     },
80
     getPropertyTypes({ commit }, propertyType) {
113
     getPropertyTypes({ commit }, propertyType) {
81
       axios
114
       axios
82
-        .get(`http://localhost:57260/Property/PropertyType/type/${propertyType}`)
115
+        .get(`/api/PropertyType/type/${propertyType}`)
83
         .then(result => commit('setPropertyTypes', result.data))
116
         .then(result => commit('setPropertyTypes', result.data))
84
         .catch(console.error);
117
         .catch(console.error);
85
     },
118
     },
86
     getPropertyTypesRes({ commit }) {
119
     getPropertyTypesRes({ commit }) {
87
       axios
120
       axios
88
-        .get('http://localhost:57260/Property/PropertyType/type/Residential')
121
+        .get('/api/PropertyType/type/Residential')
89
         .then(result => commit('setPropertyTypesRes', result.data))
122
         .then(result => commit('setPropertyTypesRes', result.data))
90
         .catch(console.error);
123
         .catch(console.error);
91
     },
124
     },
92
     getPropertyTypesCom({ commit }) {
125
     getPropertyTypesCom({ commit }) {
93
       axios
126
       axios
94
-        .get('http://localhost:57260/Property/PropertyType/type/Commercial')
127
+        .get('/api/PropertyType/type/Commercial')
95
         .then(result => commit('setPropertyTypesCom', result.data))
128
         .then(result => commit('setPropertyTypesCom', result.data))
96
         .catch(console.error);
129
         .catch(console.error);
97
     },
130
     },
98
     getPropertyOverviewFields({ commit }) {
131
     getPropertyOverviewFields({ commit }) {
99
       axios
132
       axios
100
-        .get('http://localhost:57260/Property/PropertyFields/Property Overview')
133
+        .get('/api/PropertyFields/Property Overview')
101
         .then(response => commit('setPropertyOverviewFields', response.data));
134
         .then(response => commit('setPropertyOverviewFields', response.data));
102
     },
135
     },
103
     getPropertyFields({ commit }, propertyType) {
136
     getPropertyFields({ commit }, propertyType) {
104
       axios
137
       axios
105
-        .get(`http://localhost:57260/property/propertyfields/Propertytype/${propertyType}`)
138
+        .get(`/api/propertyFields/PropertyType/${propertyType}`)
106
         .then(response => commit('setPropertyFields', response.data));
139
         .then(response => commit('setPropertyFields', response.data));
107
     },
140
     },
141
+    getPropertySavedOverviewFields({ commit }, id) {
142
+      axios
143
+        .get(`/api/PropertyFields/GetSavedValues/Residential/Property Overview/${id}`)
144
+        .then(response => commit('setPropertyOverviewFields', response.data))
145
+        .catch(console.error);
146
+    },
147
+    getPropertySavedFields({ commit }, item) {
148
+      axios
149
+        .get(`/api/PropertyFields/GetSavedValues/${item.type}/All/${item.id}`)
150
+        .then(response => commit('setPropertyFields', response.data))
151
+        .catch(console.error);
152
+    },
108
     saveProperty({ commit }, item) {
153
     saveProperty({ commit }, item) {
109
       axios
154
       axios
110
-        .post('http://localhost:57260/Property/Property', item)
155
+        .post('/api/Property', item)
111
         .then(result => commit('updateCurrentProperty', result.data))
156
         .then(result => commit('updateCurrentProperty', result.data))
112
         .catch(console.error);
157
         .catch(console.error);
113
     },
158
     },
114
     searchPropertiesParams({ commit }, item) {
159
     searchPropertiesParams({ commit }, item) {
115
       axios
160
       axios
116
         .get(
161
         .get(
117
-          `http://localhost:57260/Property/Property/Search/${item.type}/${item.propertyType}/${item.province}/${item.city}/${item.suburb}/${item.propType}`,
162
+          `/api/property/search/${item.type}/${item.propertyType}/${item.province}/${item.city}/${item.suburb}/${item.propType}`,
118
         )
163
         )
119
         .then(response => commit('updateSearch', response.data))
164
         .then(response => commit('updateSearch', response.data))
120
         .catch(console.error);
165
         .catch(console.error);
121
     },
166
     },
122
     searchPropertiesKeyword({ commit }, item) {
167
     searchPropertiesKeyword({ commit }, item) {
123
       axios
168
       axios
124
-        .get(`http://localhost:57260/Property/Property/Search/${item.keyword}`)
169
+        .get(`/api/Property/Search/${item.keyword}`)
125
         .then(response => commit('updateSearch', response.data))
170
         .then(response => commit('updateSearch', response.data))
126
         .catch(console.error);
171
         .catch(console.error);
127
     },
172
     },
128
     searchLatestProperties({ commit }) {
173
     searchLatestProperties({ commit }) {
129
       axios
174
       axios
130
-        .get('http://localhost:57260/property/property/latestProperties')
175
+        .get('/api/property/latestProperties')
131
         .then(response => commit('setLatestProperties', response.data))
176
         .then(response => commit('setLatestProperties', response.data))
132
         .catch(console.error);
177
         .catch(console.error);
133
     },
178
     },
179
+    clearProperty({ commit }) {
180
+      commit('clearProperty');
181
+    },
182
+    clearPropertyImages({ commit }) {
183
+      commit('clearPropertyImages');
184
+    },
185
+    getSavedPropertyData({ commit }, item) {
186
+      commit('clearProperty');
187
+      commit('clearPropertyImages');
188
+
189
+      axios
190
+        .get(`/api/Property/${item.id}`)
191
+        .then(result => commit('setProperty', result.data))
192
+        .catch(console.error);
193
+
194
+      axios
195
+        .get(`/api/PropertyImage/getPropertyImages/${item.id}`)
196
+        .then(result => commit('setPropertyImages', result.data))
197
+        .catch(console.error);
198
+
199
+      axios
200
+        .get(`/api/PropertyFields/GetSavedValues/Residential/Property Overview/${item.id}`)
201
+        .then(response => commit('setPropertyOverviewFields', response.data))
202
+        .catch(console.error);
203
+
204
+      axios
205
+        .get(`/api/PropertyFields/GetSavedValues/${item.type}/All/${item.id}`)
206
+        .then(response => commit('setPropertyFields', response.data))
207
+        .catch(console.error);
208
+    },
134
   },
209
   },
135
 };
210
 };

+ 96
- 19
src/store/modules/property/propertyAdmin.js 查看文件

4
   namespaced: true,
4
   namespaced: true,
5
   state: {
5
   state: {
6
     userDefinedGroups: [],
6
     userDefinedGroups: [],
7
-    userDefinedGroup: null,
7
+    userDefinedGroup: {
8
+      id: 0,
9
+      description: '',
10
+      usageType: 0,
11
+      rank: 0,
12
+      fields: [],
13
+    },
8
     userFields: [],
14
     userFields: [],
9
-    userField: null,
15
+    userField: {
16
+      id: 0,
17
+      groupId: 0,
18
+      fieldName: '',
19
+      fieldType: '',
20
+      rank: 0,
21
+    },
10
   },
22
   },
11
   mutations: {
23
   mutations: {
12
     setUserDefinedGroups(state, groups) {
24
     setUserDefinedGroups(state, groups) {
21
     setUserField(state, field) {
33
     setUserField(state, field) {
22
       state.userField = field;
34
       state.userField = field;
23
     },
35
     },
24
-    updateUserDefinedGroups(state, field) {
36
+    addUserDefinedGroups(state, field) {
25
       state.userDefinedGroups.push(field);
37
       state.userDefinedGroups.push(field);
26
     },
38
     },
39
+    updateUserDefinedGroups(state, field) {
40
+      state.userDefinedGroups.find(item => item.id === field.id).description = field.description;
41
+      state.userDefinedGroups.find(item => item.id === field.id).usageType = field.usageType;
42
+      state.userDefinedGroups.find(item => item.id === field.id).rank = field.rank;
43
+    },
44
+    addUserField(state, field) {
45
+      state.userFields.push(field);
46
+    },
47
+    updateUserFields(state, field) {
48
+      state.userFields.find(item => item.id === field.id).fieldName = field.fieldName;
49
+      state.userFields.find(item => item.id === field.id).fieldType = field.fieldType;
50
+      state.userFields.find(item => item.id === field.id).rank = field.rank;
51
+    },
52
+    removeUserDefinedGroup(state, id) {
53
+      state.userDefinedGroups.pop(state.userDefinedGroups.find(p => p.id === id));
54
+    },
55
+    removeUserField(state, id) {
56
+      state.userFields.pop(state.userFields.find(p => p.id === id));
57
+    },
58
+    clearUserGroup(state) {
59
+      state.userDefinedGroup = {
60
+        id: 0,
61
+        description: '',
62
+        usageType: 0,
63
+        rank: 0,
64
+      };
65
+    },
66
+    clearUserField(state) {
67
+      state.userField = {
68
+        id: 0,
69
+        fieldName: '',
70
+        fieldType: '',
71
+        rank: 0,
72
+      };
73
+    },
74
+    clearUserFields(state) {
75
+      state.userFields = [];
76
+    },
27
   },
77
   },
28
   getters: {},
78
   getters: {},
29
   actions: {
79
   actions: {
30
     getUserDefinedGroups({ commit }) {
80
     getUserDefinedGroups({ commit }) {
31
       axios
81
       axios
32
-        .get('http://localhost:57260/Property/UserDefinedGroup')
82
+        .get('/api/UserDefinedGroup')
33
         .then(result => commit('setUserDefinedGroups', result.data))
83
         .then(result => commit('setUserDefinedGroups', result.data))
34
         .catch(console.error);
84
         .catch(console.error);
35
     },
85
     },
36
-    getUserDefinedGroup({ commit }, item) {
86
+    getUserDefinedGroup({ commit }, id) {
37
       axios
87
       axios
38
-        .get(`http://localhost:57260/Property/UserDefinedGroup/${item.id}`)
88
+        .get(`/api/UserDefinedGroup/${id}`)
39
         .then(result => commit('setUserDefinedGroup', result.data))
89
         .then(result => commit('setUserDefinedGroup', result.data))
40
         .catch(console.error);
90
         .catch(console.error);
41
     },
91
     },
42
-    getUserFields({ commit }, item) {
92
+    getUserFields({ commit }, groupId) {
43
       axios
93
       axios
44
-        .get(`http://localhost:57260/Property/UserDefinedField/group/${item.groupId}`)
94
+        .get(`/api/UserDefinedField/group/${groupId}`)
45
         .then(result => commit('setUserFields', result.data))
95
         .then(result => commit('setUserFields', result.data))
46
         .catch(console.error);
96
         .catch(console.error);
47
     },
97
     },
48
-    getUserField({ commit }, item) {
98
+    getUserField({ commit }, id) {
49
       axios
99
       axios
50
-        .get(`http://localhost:57260/Property/UserDefinedField/${item.id}`)
100
+        .get(`/api/UserDefinedField/${id}`)
51
         .then(result => commit('setUserField', result.data))
101
         .then(result => commit('setUserField', result.data))
52
         .catch(console.error);
102
         .catch(console.error);
53
     },
103
     },
54
     saveUserDefinedGroup({ commit }, item) {
104
     saveUserDefinedGroup({ commit }, item) {
55
       axios
105
       axios
56
-        .post('http://localhost:57260/Property/UserDefinedGroup', item.group)
57
-        .then(response => commit('updateUserDefinedGroups', response.data))
106
+        .post('/api/UserDefinedGroup', item)
107
+        .then(response => commit('addUserDefinedGroups', response.data))
58
         .catch(console.error);
108
         .catch(console.error);
59
     },
109
     },
60
     updateUserDefinedGroup({ commit }, item) {
110
     updateUserDefinedGroup({ commit }, item) {
61
       axios
111
       axios
62
-        .put('http://localhost:57260/Property/UserDefinedGroup', item.group)
112
+        .put('/api/UserDefinedGroup', item)
63
         .then(response => commit('updateUserDefinedGroups', response.data))
113
         .then(response => commit('updateUserDefinedGroups', response.data))
64
         .catch(console.error);
114
         .catch(console.error);
65
     },
115
     },
66
-    // deleteUserDefinedGroup(item) {
67
-    //   axios
68
-    //     .delete(`http://localhost:57260/Property/UserDefinedField/${item.id}`)
69
-    //     .then((response) => {})
70
-    //     .catch(console.error);
71
-    // },
116
+    saveUserField({ commit }, item) {
117
+      axios
118
+        .post('/api/UserDefinedField', item)
119
+        .then(response => commit('addUserField', response.data))
120
+        .catch(console.error);
121
+    },
122
+    updateUserField({ commit }, item) {
123
+      axios
124
+        .put('/api/UserDefinedField', item)
125
+        .then(response => commit('updateUserFields', response.data))
126
+        .catch(console.error);
127
+    },
128
+    deleteUserDefinedGroup({ commit }, id) {
129
+      axios
130
+        .delete(`/api/UserDefinedGroup/${id}`)
131
+        .then(result => commit('removeUserDefinedGroup', id))
132
+        .catch(console.error);
133
+    },
134
+    deleteUserField({ commit }, id) {
135
+      axios
136
+        .delete(`/api/UserDefinedField/${id}`)
137
+        .then(result => commit('removeUserField', id))
138
+        .catch(console.error);
139
+    },
140
+    clearUserGroup({ commit }) {
141
+      commit('clearUserGroup');
142
+    },
143
+    clearUserField({ commit }) {
144
+      commit('clearUserField');
145
+    },
146
+    clearUserFields({ commit }) {
147
+      commit('clearUserFields');
148
+    },
72
   },
149
   },
73
 };
150
 };

+ 1
- 1
src/store/modules/property/propertyLists.js 查看文件

14
   actions: {
14
   actions: {
15
     getProperties({ commit }, item) {
15
     getProperties({ commit }, item) {
16
       axios
16
       axios
17
-        .get(`http://localhost:57260/Property/property/${item.propertyType}/${item.user}`)
17
+        .get(`/api/property/${item.propertyType}/${item.user}`)
18
         .then(result => commit('setProperties', result.data))
18
         .then(result => commit('setProperties', result.data))
19
         .catch(console.error);
19
         .catch(console.error);
20
     },
20
     },

+ 5
- 5
src/store/modules/property/propertyTypes.js 查看文件

37
   actions: {
37
   actions: {
38
     getPropertyTypes({ commit }) {
38
     getPropertyTypes({ commit }) {
39
       axios
39
       axios
40
-        .get('http://localhost:57260/Property/PropertyType')
40
+        .get('/api/PropertyType')
41
         .then(result => commit('setPropertyTypes', result.data))
41
         .then(result => commit('setPropertyTypes', result.data))
42
         .catch(console.error);
42
         .catch(console.error);
43
     },
43
     },
44
     getPropertyType({ commit }, id) {
44
     getPropertyType({ commit }, id) {
45
       axios
45
       axios
46
-        .get(`http://localhost:57260/Property/PropertyType/${id}`)
46
+        .get(`/api/PropertyType/${id}`)
47
         .then(result => commit('setPropertyType', result.data))
47
         .then(result => commit('setPropertyType', result.data))
48
         .catch(console.error);
48
         .catch(console.error);
49
     },
49
     },
50
     savePropertyType({ commit }, item) {
50
     savePropertyType({ commit }, item) {
51
       axios
51
       axios
52
-        .post('http://localhost:57260/Property/PropertyType', item)
52
+        .post('/api/PropertyType', item)
53
         .then(result => commit('addToPropertyTypes', result.data))
53
         .then(result => commit('addToPropertyTypes', result.data))
54
         .catch(console.error);
54
         .catch(console.error);
55
     },
55
     },
56
     updatePropertyType({ commit }, item) {
56
     updatePropertyType({ commit }, item) {
57
       axios
57
       axios
58
-        .put('http://localhost:57260/Property/PropertyType', item)
58
+        .put('/api/PropertyType', item)
59
         .then(result => commit('updatePropertyTypes', item))
59
         .then(result => commit('updatePropertyTypes', item))
60
         .catch(console.error);
60
         .catch(console.error);
61
     },
61
     },
64
     },
64
     },
65
     deletePropertyType({ commit }, id) {
65
     deletePropertyType({ commit }, id) {
66
       axios
66
       axios
67
-        .delete(`http://localhost:57260/Property/PropertyType/${id}`)
67
+        .delete(`/api/PropertyType/${id}`)
68
         .then(result => commit('removePropertyType', id))
68
         .then(result => commit('removePropertyType', id))
69
         .catch(console.error);
69
         .catch(console.error);
70
     },
70
     },

+ 3
- 3
src/store/modules/searchTab.js 查看文件

22
   actions: {
22
   actions: {
23
     getProvince({ commit }) {
23
     getProvince({ commit }) {
24
       axios
24
       axios
25
-        .get('http://localhost:57260/region/province')
25
+        .get('/api/province')
26
         .then(result => commit('setProvince', result.data))
26
         .then(result => commit('setProvince', result.data))
27
         .catch(console.error);
27
         .catch(console.error);
28
     },
28
     },
29
     getCities({ commit }, item) {
29
     getCities({ commit }, item) {
30
       axios
30
       axios
31
-        .get(`http://localhost:57260/region/city/getby/${item.province}`)
31
+        .get(`/api/city/getBy/${item.province}`)
32
         .then(result => commit('setCities', result.data));
32
         .then(result => commit('setCities', result.data));
33
     },
33
     },
34
     getSuburbs({ commit }, item) {
34
     getSuburbs({ commit }, item) {
35
       axios
35
       axios
36
-        .get(`http://localhost:57260/region/Suburb/${item.province}/${item.city}`)
36
+        .get(`/api/Suburb/${item.province}/${item.city}`)
37
         .then(result => commit('setSuburbs', result.data));
37
         .then(result => commit('setSuburbs', result.data));
38
     },
38
     },
39
   },
39
   },

+ 3
- 4
src/store/modules/timeshare/status.js 查看文件

12
   },
12
   },
13
   getters: {},
13
   getters: {},
14
   actions: {
14
   actions: {
15
-    getStatusList({
16
-      commit,
17
-    }) {
18
-      axios.get('/api/status')
15
+    getStatusList({ commit }) {
16
+      axios
17
+        .get('/api/status')
19
         .then(result => commit('setStatusList', result.data))
18
         .then(result => commit('setStatusList', result.data))
20
         .catch(console.error);
19
         .catch(console.error);
21
     },
20
     },

+ 8
- 8
src/store/modules/user/register.js 查看文件

86
     //   commit,
86
     //   commit,
87
     // }, id) {
87
     // }, id) {
88
     //   axios
88
     //   axios
89
-    //     .get(`http://localhost:57260/api/user/${id}`)
89
+    //     .get(`http://192.168.6.188:5000/api/user/${id}`)
90
     //     .then(result => commit('setIndividual', result.data))
90
     //     .then(result => commit('setIndividual', result.data))
91
     //     .catch(console.error);
91
     //     .catch(console.error);
92
     // },
92
     // },
94
     //   commit,
94
     //   commit,
95
     // }, id) {
95
     // }, id) {
96
     //   axios
96
     //   axios
97
-    //     .get(`http://localhost:57260/api/agency/${id}`)
97
+    //     .get(`http://192.168.6.188:5000/api/agency/${id}`)
98
     //     .then(result => commit('setAgency', result.data))
98
     //     .then(result => commit('setAgency', result.data))
99
     //     .catch(console.error);
99
     //     .catch(console.error);
100
     // },
100
     // },
103
       commit,
103
       commit,
104
     }, item) {
104
     }, item) {
105
       axios
105
       axios
106
-        .post('http://localhost:57260/api/register/register', item)
106
+        .post('http://192.168.6.188:5000/api/register/register', item)
107
         .then(result => commit('addIndividual', result.data))
107
         .then(result => commit('addIndividual', result.data))
108
         .catch(console.error);
108
         .catch(console.error);
109
     },
109
     },
111
       commit,
111
       commit,
112
     }, item) {
112
     }, item) {
113
       axios
113
       axios
114
-        .post('http://localhost:57260/api/register/registeragency', item)
114
+        .post('http://192.168.6.188:5000/api/register/registeragency', item)
115
         .then(result => commit('addAgency', result.data))
115
         .then(result => commit('addAgency', result.data))
116
         .catch(console.error);
116
         .catch(console.error);
117
     },
117
     },
119
     //   commit,
119
     //   commit,
120
     // }, item) {
120
     // }, item) {
121
     //   axios
121
     //   axios
122
-    //     .put('http://localhost:57260/api/individual', item)
122
+    //     .put('http://192.168.6.188:5000/api/individual', item)
123
     //     .then(result => commit('updateIndividual', item))
123
     //     .then(result => commit('updateIndividual', item))
124
     //     .catch(console.error);
124
     //     .catch(console.error);
125
     // },
125
     // },
127
     //   commit,
127
     //   commit,
128
     // }, item) {
128
     // }, item) {
129
     //   axios
129
     //   axios
130
-    //     .put('http://localhost:57260/api/agency', item)
130
+    //     .put('http://192.168.6.188:5000/api/agency', item)
131
     //     .then(result => commit('updateAgency', item))
131
     //     .then(result => commit('updateAgency', item))
132
     //     .catch(console.error);
132
     //     .catch(console.error);
133
     // },
133
     // },
145
     //   commit,
145
     //   commit,
146
     // }, id) {
146
     // }, id) {
147
     //   axios
147
     //   axios
148
-    //     .delete(`http://localhost:57260/api/individual/${id}`)
148
+    //     .delete(`http://192.168.6.188:5000/api/individual/${id}`)
149
     //     .then(result => commit('removeIndividual', id))
149
     //     .then(result => commit('removeIndividual', id))
150
     //     .catch(console.error);
150
     //     .catch(console.error);
151
     // },
151
     // },
153
     //   commit,
153
     //   commit,
154
     // }, id) {
154
     // }, id) {
155
     //   axios
155
     //   axios
156
-    //     .delete(`http://localhost:57260/api/agency/${id}`)
156
+    //     .delete(`http://192.168.6.188:5000/api/agency/${id}`)
157
     //     .then(result => commit('removeAgency', id))
157
     //     .then(result => commit('removeAgency', id))
158
     //     .catch(console.error);
158
     //     .catch(console.error);
159
     // },
159
     // },

+ 1
- 1
vue.config.js 查看文件

2
   devServer: {
2
   devServer: {
3
     proxy: {
3
     proxy: {
4
       '/api': {
4
       '/api': {
5
-        target: 'http://localhost:57260',
5
+        target: 'http://192.168.6.188:5000',
6
         changeOrigin: true,
6
         changeOrigin: true,
7
       },
7
       },
8
     },
8
     },

Loading…
取消
儲存