jason.lu 6 лет назад
Родитель
Сommit
d620a99288
1 измененных файлов с 9 добавлено и 1 удалено
  1. 9 1
      sourcecode/h5app/vue/src/views/login.vue

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

@@ -15,13 +15,21 @@
     export default {
     export default {
         created: function () {
         created: function () {
             let otp = this.$route.query.o;
             let otp = this.$route.query.o;
-            // let otp = BasicFunction.utils_get_param("o");
+            if(otp == undefined) {
+                otp = BasicFunction.utils_get_param("o");
+            }
             console.log('otp: ');
             console.log('otp: ');
             console.log(otp);
             console.log(otp);
             let userid = '';
             let userid = '';
             if (localStorage.getItem('frontend-userid')) {
             if (localStorage.getItem('frontend-userid')) {
                 userid = localStorage.getItem('frontend-userid');
                 userid = localStorage.getItem('frontend-userid');
                 this.$router.push('index');
                 this.$router.push('index');
+                return;
+            }
+            if(otp == undefined){
+                // no-otp
+                Toast.fail("链接失效!请回到公众号重新获取链接");
+                return;
             }
             }
             BasicFunction.get_data("ajaxotplogin?otp=" + otp.toString(), function (response) {
             BasicFunction.get_data("ajaxotplogin?otp=" + otp.toString(), function (response) {
                 console.log("------ User Info --------");
                 console.log("------ User Info --------");