소스 검색

Login Fix

master
30117125 4 년 전
부모
커밋
a279b52c6c

+ 4
- 7
package-lock.json 파일 보기

@@ -12437,13 +12437,10 @@
12437 12437
       "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.1.5.tgz",
12438 12438
       "integrity": "sha512-BszkPvhl7I9h334GjckCh7sVFyjTPMMJFJ4Bsrem/Ik+B/9gt5tgrk8k4gGLO4ZpdvciVdg7O41gW4DisQWurg=="
12439 12439
     },
12440
-    "vue-share-social": {
12441
-      "version": "0.3.2",
12442
-      "resolved": "https://registry.npmjs.org/vue-share-social/-/vue-share-social-0.3.2.tgz",
12443
-      "integrity": "sha512-8YEm2Kkl756bhqSfXPtQqnOOItz7/DQWU6E4L+vC4dgT4rp0+XnqsgJAr4OXVQRRUNDO7TS8W0W79+zhfvh4pQ==",
12444
-      "requires": {
12445
-        "vue": "^2.5.16"
12446
-      }
12440
+    "vue-social-sharing": {
12441
+      "version": "3.0.0-beta.11",
12442
+      "resolved": "https://registry.npmjs.org/vue-social-sharing/-/vue-social-sharing-3.0.0-beta.11.tgz",
12443
+      "integrity": "sha512-jIATgcKcBGQveAbU4sKjHcsGN7gI/bq/T9fm/5qowtBuZe0I+5CZRWcAGDd6G64HzQfFEyNBLC02GYjMtaovhA=="
12447 12444
     },
12448 12445
     "vue-style-loader": {
12449 12446
       "version": "4.1.2",

+ 1
- 1
package.json 파일 보기

@@ -36,7 +36,7 @@
36 36
     "vue-json-excel": "^0.2.98",
37 37
     "vue-owl-carousel": "^2.0.3",
38 38
     "vue-router": "^3.1.5",
39
-    "vue-share-social": "^0.3.2",
39
+    "vue-social-sharing": "^3.0.0-beta.11",
40 40
     "vue-trix": "^1.1.7",
41 41
     "vue2-editor": "^2.10.2",
42 42
     "vue2-google-maps": "^0.10.7",

+ 18
- 9
src/components/property/residential/singleView/contentSection.vue 파일 보기

@@ -49,9 +49,18 @@
49 49
           </div>
50 50
           <div class="panel-left px-5 pb-5 text-center">
51 51
             <h4 class="text-white">Share this Property</h4>
52
-            <a id="fb_share" href="#" target="_blank"
53
-              ><img src="img/icon-facebook.svg" alt="Share on Facebook" class="col-3 p-1 mx-1"
54
-            /></a>
52
+            <ShareNetwork
53
+              v-if="currentUrl !== ''"
54
+              network="facebook"
55
+              :url="currentUrl"
56
+              title="Uni-Vate Property Listing"
57
+              description="Check out this property on Uni-Vate Properties!"
58
+              quote="The hot reload is so fast it\'s near instant. - Evan You"
59
+              hashtags="vuejs,vite"
60
+            >
61
+              <img src="img/icon-facebook.svg" alt="Share on Facebook" class="col-3 p-1 mx-1" />
62
+            </ShareNetwork>
63
+
55 64
             <a
56 65
               href="mailto:?Subject=Simple Share Buttons&amp;Body=I%20saw%20this%20and%20thought%20of%20you!%20 https://www.univateproperties.co.za/"
57 66
               ><img src="/img/icon-email.svg" alt="Share on email" class="col-3 p-1 mx-1"
@@ -65,6 +74,7 @@
65 74
             /></a>
66 75
           </div>
67 76
         </div>
77
+        <div></div>
68 78
         <div class="col-md-8 p-5 resort-profile">
69 79
           <h2 v-if="property.showAddress">
70 80
             <div style="display:inline" v-if="property.propertyName !== null">
@@ -127,7 +137,7 @@
127 137
 /* eslint-disable */
128 138
 import { mapState, mapActions } from "vuex";
129 139
 import gallery from "../../../shared/gallerySlideShow";
130
-import { ShareFacebook } from "vue-share-social";
140
+import { ShareFacebook } from "vue-social-sharing";
131 141
 export default {
132 142
   components: {
133 143
     gallery,
@@ -139,16 +149,15 @@ export default {
139 149
   },
140 150
   created() {
141 151
     //this.getListsForPropertyEdit(this.property.id);
142
-    console.log(this.property.displayData);
143 152
   },
144
-  mounted() {
145
-    // var facebookShare = document.getElementById("fb_share");
146
-    // facebookShare.href = "http://www.facebook.com/share.php?u=" + encodeURIComponent(location.href);
153
+  async mounted() {
154
+    this.currentUrl = window.location.origin + this.$route.fullPath;
147 155
   },
148 156
   data() {
149 157
     return {
150 158
       index: null,
151
-      date: new Date()
159
+      date: new Date(),
160
+      currentUrl: ""
152 161
     };
153 162
   },
154 163
   methods: {

+ 14
- 3
src/components/shared/navBar.vue 파일 보기

@@ -179,11 +179,12 @@
179 179
                   <li class="mx-1">
180 180
                     <router-link to="/share/contact">Contact Us</router-link>
181 181
                   </li>
182
-                  <li v-if="isLoggedIn" class="menu-has-children mx-1">
182
+                  <li v-if="USER" class="menu-has-children mx-1">
183 183
                     <div
184 184
                       @mouseover="userClass = 'ts-display'"
185 185
                       @mouseleave="userClass = 'no-display'"
186 186
                     ></div>
187
+
187 188
                     <a href="#" class="sf-with-ul">
188 189
                       {{ NAME }}
189 190
                     </a>
@@ -331,13 +332,13 @@
331 332
                     </ul>
332 333
                   </li>
333 334
 
334
-                  <li v-if="!isLoggedIn">
335
+                  <li v-if="!USER">
335 336
                     <router-link class="btn-white-border p-2 ml-1 mr-1" to="/user/login"
336 337
                       >Login</router-link
337 338
                     >
338 339
                   </li>
339 340
 
340
-                  <li v-if="!isLoggedIn">
341
+                  <li v-if="!USER">
341 342
                     <router-link class=" btn-solid-blue pt-2 pb-2" to="/user/register"
342 343
                       >Register</router-link
343 344
                     >
@@ -440,6 +441,16 @@ export default {
440 441
     NAME() {
441 442
       return Log.getPerson().name;
442 443
     },
444
+    USER() {
445
+      var userObj = {};
446
+      if (!this.user) {
447
+        userObj = JSON.parse(localStorage.getItem("user"));
448
+      } else {
449
+        userObj = this.user;
450
+      }
451
+
452
+      return userObj;
453
+    },
443 454
     ROLE() {
444 455
       var userObj = JSON.parse(localStorage.getItem("user"));
445 456
       return userObj.role;

+ 1
- 1
src/components/user/loginPage.vue 파일 보기

@@ -118,7 +118,7 @@ export default {
118 118
     },
119 119
     Login() {
120 120
       this.login({ username: this.username, password: this.password })
121
-        .then(fufilled => {
121
+        .then(() => {
122 122
           this.$router.push("/");
123 123
         })
124 124
         .catch(err => {

+ 2
- 2
src/main.js 파일 보기

@@ -8,11 +8,11 @@ import router from "./router";
8 8
 import store from "./store";
9 9
 import * as VueGoogleMaps from "vue2-google-maps";
10 10
 import Vuetify from "vuetify";
11
-import VueShareSocial from "vue-share-social";
11
+import VueSocialSharing from "vue-social-sharing";
12 12
 import VueCurrencyInput from "vue-currency-input";
13 13
 import VueFloatLabel from "vue-float-label";
14 14
 
15
-Vue.use(VueShareSocial);
15
+Vue.use(VueSocialSharing);
16 16
 Vue.use(EvaIcons);
17 17
 Vue.use(Vuetify);
18 18
 Vue.use(VueFloatLabel);

+ 2
- 0
src/store/modules/user/authentication.js 파일 보기

@@ -76,6 +76,8 @@ export default {
76 76
         method: "POST"
77 77
       });
78 78
       if (response.status === 200) {
79
+        console.log(response);
80
+
79 81
         log.clearValues();
80 82
         log.setValues(response.data);
81 83
         commit("auth_success", response.data);

Loading…
취소
저장