瀏覽代碼

use ajaxlogin instead

jason.lu 6 年之前
父節點
當前提交
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 {
         created: function () {
             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);
             let userid = '';
             if (localStorage.getItem('frontend-userid')) {
                 userid = localStorage.getItem('frontend-userid');
                 this.$router.push('index');
+                return;
+            }
+            if(otp == undefined){
+                // no-otp
+                Toast.fail("链接失效!请回到公众号重新获取链接");
+                return;
             }
             BasicFunction.get_data("ajaxotplogin?otp=" + otp.toString(), function (response) {
                 console.log("------ User Info --------");