| 
					
				 | 
			
			
				@@ -14,6 +14,7 @@ let userBasics = JSON.parse(localStorage.getItem('user_profile')) || []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 function checkLocal() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   if(userBasics.length == 0){ return }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  console.log(userBasics); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   $('.userName').html(`<h2 class="user-name text-white mt-4 fw-bold">Hi ${userBasics.user_info.userName}</h2>`); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -39,8 +40,8 @@ checkLan(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 function renderView() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let token = getCookie('jwt_token'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if(!token) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        window.location.replace("login.html"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     axios({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         method: 'post', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         url: 'https://www.choozmo.com:8887/user_profile', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -50,7 +51,10 @@ function renderView() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         console.log(res.data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const userInfo = res.data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        let userInfo = res.data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        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 = "剩餘秒數不足"; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -152,6 +156,7 @@ function renderView() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $('.card-profile').html(str); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }).catch(err => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         console.log(err); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        window.location.replace("login.html"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |