@ -20,10 +20,10 @@ class SsgController extends BaseController {
public function login(){
$user = session("user_auth");
if ($user) {
redirect(U("ssg/index"));
}
$user = session("user_auth");
if ($user) {
redirect(U("ssg/index"));
}
$this->display();
}
@ -87,32 +87,42 @@ class SsgController extends BaseController {
//首页
public function index(){
$user = session("user_auth");
if (!$user) {
$user = session("user_auth");
if (!$user) {
redirect(U("ssg/login"));
//$this->error("请登入", U('ssg/login'));
}
//$this->error("请登入", U('ssg/login'));
}
$map['a.user_id']= $user['user_id'];
$map['a.sdk_version'] = 2;
$game_list = M("user_play a","tab_")->field("b.*,b.id as game_id")->join("tab_game b on a.game_id=b.id")->where($map)->select();
$game_list = M("user_play a","tab_")->field("b.*,b.id as game_id,od.pay_status")->join("inner join tab_game b on a.game_id=b.id left join tab_game_supersign od on od.user_id=a.user_id and od.game_id=b.id and od.pay_status=1")->where($map)->select();