浏览代码

solve a bug

StephenArk30 6 年之前
父节点
当前提交
bddab140f4
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 2 1
      sourcecode/h5app/vue/src/views/index.vue
  2. 4 5
      sourcecode/h5app/vue/src/views/login.vue

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

@@ -87,9 +87,10 @@
                 return;
             }
             let userid = localStorage.getItem('frontend-userid');
+            console.log(userid);
 
             let presentList = [];
-            BasicFunction.get_data("smartGoods/list?isDel=0&ownerId" + userid, function (response) {
+            BasicFunction.get_data("smartGoods/list?isDel=0&ownerId=" + userid, function (response) {
                 console.log("------ Data Rcvd in Index --------");
                 console.log(response);
                 if (response.ret === "10000") {

+ 4 - 5
sourcecode/h5app/vue/src/views/login.vue

@@ -14,10 +14,9 @@
 
     export default {
         created: function () {
-            if (localStorage.getItem('frontend-userid')) {
-                userid = localStorage.getItem('frontend-userid');
-                this.$router.push('index');
-            }
+            // if (localStorage.getItem('frontend-userid')) {
+            //     this.$router.push('index');
+            // }
             let otp = this.$route.query.o;
             console.log('otp: ');
             console.log(otp);
@@ -28,7 +27,7 @@
             console.log(otp);
             let userid = '';
 
-            if (otp === undefined) {
+            if (otp === null) {
                 // no-otp
                 Toast.fail("链接失效!请回到公众号重新获取链接");
                 return;