diff --git a/Application/Mobile/Controller/SsgController.class.php b/Application/Mobile/Controller/SsgController.class.php index 3ca58a403..4562344ff 100644 --- a/Application/Mobile/Controller/SsgController.class.php +++ b/Application/Mobile/Controller/SsgController.class.php @@ -49,7 +49,9 @@ class SsgController extends BaseController { public function home(){ //获取客服qq $appqq = M("config", "sys_")->field('value')->where("name='APP_QQ'")->find()['value']; + $this->assign("app_qq", $appqq); + $this->assign("rand", rand()); $this->display(); } @@ -152,7 +154,9 @@ class SsgController extends BaseController { $this -> set_message(1017, "fail", "添加失败"); } //添加自动登录 - $_SESSION['user_id'] = $res; + $userApi = new MemberApi(); + $user_id = $userApi->login($account, $password,1); + $this -> set_message(1, "success", "添加成功"); } @@ -166,8 +170,12 @@ class SsgController extends BaseController { if(empty($res)){ $this -> set_message(1017, "fail", "添加失败"); } + + //添加自动登录 - $_SESSION['user_id'] = $res; + $userApi = new MemberApi(); + $user_id = $userApi->login($account, $password,1); + $this -> set_message(1, "success", "添加成功"); # code... } diff --git a/Application/Mobile/View/Ssg/home.html b/Application/Mobile/View/Ssg/home.html index 4057ecc8a..2c2e26598 100644 --- a/Application/Mobile/View/Ssg/home.html +++ b/Application/Mobile/View/Ssg/home.html @@ -4,8 +4,8 @@