diff --git a/Application/Mobile/Controller/SsgController.class.php b/Application/Mobile/Controller/SsgController.class.php index 5de96d6cd..3369a77d2 100644 --- a/Application/Mobile/Controller/SsgController.class.php +++ b/Application/Mobile/Controller/SsgController.class.php @@ -60,7 +60,9 @@ class SsgController extends BaseController { $res_msg = "未知错误"; } } - $_SESSION['user_id'] = $user_id; + if($user_id>0){ + $_SESSION['user_id'] = $user_id; + } $this->ajaxReturn(array("ErrorCode"=>$res_code,"ResultMsg"=>$res_msg),'JSON'); } diff --git a/Application/Mobile/View/Ssg/login.html b/Application/Mobile/View/Ssg/login.html index 11646cb23..710adda9e 100644 --- a/Application/Mobile/View/Ssg/login.html +++ b/Application/Mobile/View/Ssg/login.html @@ -75,15 +75,20 @@ 'VerifyCode':userCode }, dataType: 'JSON', + xhrFields:{ + withCredentials:true + }, + async: false, cache: false, success: function (result) { if (result.ErrorCode!=0){ alert(result.ResultMsg); GetVerityCode(); + }else{ + window.location.href="mobile.php?s=/Ssg/index.html" } } }); - window.location.href="mobile.php?s=/Ssg/index.html" } \ No newline at end of file