소스 검색

Merge branch 'master' of http://git.choozmo.com:3000/choozmo/AI_Anchor_2

ming 3 년 전
부모
커밋
ccfb0405de
5개의 변경된 파일17개의 추가작업 그리고 17개의 파일을 삭제
  1. 3 3
      html/script_eng.js
  2. 4 4
      html/script_profile.js
  3. 3 3
      html/static/script_slides.js
  4. 3 3
      html/static/script_slides_eng.js
  5. 4 4
      html/static/script_util.js

+ 3 - 3
html/script_eng.js

@@ -22,9 +22,9 @@ function checkRoute() {
      }
   }).then(res => {
     console.log(res.data);
-    if(res.status !== 200) {
-      window.location.replace("login.html");
-    }
+    // if(res.status !== 200) {
+    //   window.location.replace("login.html");
+    // }
     var userName='';
     userName+=' <h2 class="user-name text-white mt-4 fw-bold">Hi '+res.data.user_info.userName+'</h2>';
     $('.userName').html(userName);

+ 4 - 4
html/script_profile.js

@@ -59,9 +59,9 @@ function renderView() {
     }).then(res => {
         console.log(res.data);
         let userInfo = res.data;
-        if(!userInfo.user_info) {
-          window.location.replace("login.html");
-        }
+        // if(!userInfo.user_info) {
+        //    window.location.replace("login.html");
+        // }
         localStorage.setItem('user_profile', JSON.stringify(res.data));
           if(userInfo.user_info.left_sec < 20){
             let title = "剩餘秒數不足";
@@ -169,7 +169,7 @@ function renderView() {
             $('.card-profile').html(str);
     }).catch(err => {
         console.log(err);
-        window.location.replace("login.html");
+        //window.location.replace("login.html");
     })
 }
 

+ 3 - 3
html/static/script_slides.js

@@ -20,9 +20,9 @@ function checkRoute() {
      }
   }).then(res => {
     console.log(res.data);
-    if(res.status !== 200) {
-      window.location.replace("login.html");
-    }
+    // if(res.status !== 200) {
+    //   window.location.replace("login.html");
+    // }
     var userName='';
     userName+=' <h2 class="user-name text-white mt-lg-3 mt-xl-1 fw-bold">Hi '+res.data.user_info.userName+'</h2>';
     $('.userName').html(userName);

+ 3 - 3
html/static/script_slides_eng.js

@@ -22,9 +22,9 @@ function checkRoute() {
      }
   }).then(res => {
     console.log(res.data);
-    if(res.status !== 200) {
-      window.location.replace("login.html");
-    }
+    // if(res.status !== 200) {
+    //   window.location.replace("login.html");
+    // }
     var userName='';
     userName+=' <h2 class="user-name text-white mt-lg-3 mt-xl-1 fw-bold">Hi '+res.data.user_info.userName+'</h2>';
     $('.userName').html(userName);

+ 4 - 4
html/static/script_util.js

@@ -10,9 +10,9 @@ if(userBasics !== [] && typeof(userBasics) !== 'string'){
 
 function checkRoute() {
   let jwt_token = get_jwt_token();
-  if(jwt_token == undefined) {
-    window.location.replace("login.html");
-  }
+  // if(jwt_token == undefined) {
+  //   window.location.replace("login.html");
+  // }
   axios({
     method: 'post',
     url: 'https://www.choozmo.com:8887/user_profile',
@@ -31,7 +31,7 @@ function checkRoute() {
   }).catch(err => {
     console.log(err);
     window.location.replace("login.html");
-  });
+  }); 
 }
 
 const btnLoginPage = document.querySelector('.btn-login');