Browse Source

use ajaxlogin instead

jason.lu 6 years ago
parent
commit
3cdb2a46c3

+ 1 - 1
sourcecode/h5app/vue/src/views/index.vue

@@ -84,7 +84,7 @@
         },
         created: function () {
             // return get_present_data()
-            if (!localStorage.getItem('frontend-userid')) {
+            if (localStorage.getItem('frontend-userid') === undefined) {
                 this.$router.push('login');
                 return;
             }

+ 1 - 1
sourcecode/h5app/vue/src/views/login.vue

@@ -21,7 +21,7 @@
             console.log('otp: ');
             console.log(otp);
             let userid = '';
-            if (localStorage.getItem('frontend-userid')) {
+            if (localStorage.getItem('frontend-userid') !== undefined) {
                 userid = localStorage.getItem('frontend-userid');
                 this.$router.push('index');
                 return;