From 6b366d7c418541a4b28a4b92bc629c713e595459 Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Wed, 25 Sep 2019 17:33:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B6=85=E7=BA=A7=E7=AD=BEH5?= =?UTF-8?q?=E7=99=BB=E5=BD=95BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Mobile/Controller/SsgController.class.php | 4 +++- Application/Mobile/View/Ssg/login.html | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) 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