diff --git a/Application/Home/Controller/HomeController.class.php b/Application/Home/Controller/HomeController.class.php index d5c96c1ee..99ec2b916 100644 --- a/Application/Home/Controller/HomeController.class.php +++ b/Application/Home/Controller/HomeController.class.php @@ -217,6 +217,7 @@ class HomeController extends Controller $this->assign('isAndroid', $isAndroid); $this->assign('apply', $apply); $this->assign('game', $game); + $this->assign('promoteId', $promoteId); $this->display('landingPage'); } diff --git a/Application/Home/View/default/Home/landingPage.html b/Application/Home/View/default/Home/landingPage.html index 0fc2e721c..ee34e36d6 100644 --- a/Application/Home/View/default/Home/landingPage.html +++ b/Application/Home/View/default/Home/landingPage.html @@ -24,7 +24,7 @@
免费安装
-
免费安装
+
免费安装
@@ -178,8 +178,8 @@
购买至尊下载,赠送限量至尊超级礼包(价值100元)
• 至尊下载:永不闪退、不丢数据稳定有保障
• 同一设备安装一次可在一年内无限次下载重装
-
¥10至尊下载
-
普通下载
+
¥10至尊下载
+
普通下载
diff --git a/Application/Mobile/Controller/SsgController.class.php b/Application/Mobile/Controller/SsgController.class.php index 3691248f5..5fbcaec92 100644 --- a/Application/Mobile/Controller/SsgController.class.php +++ b/Application/Mobile/Controller/SsgController.class.php @@ -25,6 +25,7 @@ class SsgController extends BaseController { public function login() { $promoteId = I("promote_id", 0); + $gameId = I("game_id", 0); $user = session("user_auth"); if ($user) { redirect(U("ssg/index", array('promete_id' => $promoteId))); @@ -44,6 +45,7 @@ class SsgController extends BaseController { $this->assign("app_qq", $appqq); $this->assign("promote_id", $promoteId); + $this->assign("game_id", $gameId); $this->display(); } @@ -163,6 +165,7 @@ class SsgController extends BaseController { $user = $_POST; $promoteId =( $user['promote_id'] ? $user['promote_id'] : 0); + $game_id = $user['game_id'] ?? 0; #判断数据是否为空 if (empty($user)) { $this -> set_message(1001, "fail", "注册数据不能为空"); @@ -170,7 +173,7 @@ class SsgController extends BaseController { #验证短信验证码 $this -> sms_verify($user['account'], $user['code']); - $res = $this -> doRegister($user['account'],$user['password'],$user['account'],$promoteId,4,2); + $res = $this -> doRegister($user['account'],$user['password'],$user['account'],$promoteId,4,2, $game_id); if(empty($res)){ $this -> set_message(1017, "fail", "添加失败"); } @@ -238,7 +241,7 @@ class SsgController extends BaseController { exit(); } //真正注册代码 - public function doRegister($account,$password,$phone,$promote_id,$register_way,$register_type) + public function doRegister($account,$password,$phone,$promote_id,$register_way,$register_type, $game_id = 0) { //验证账号 $is_user_info = M('user', 'tab_') -> where(['account' => $account]) -> find(); @@ -271,6 +274,13 @@ class SsgController extends BaseController { 'check_time' => time(), ); + if ($game_id) {//关联游戏 + $game = M('game', 'tab_')->where(['id' => $game_id])->find(); + if ($game) { + $data['fgame_id'] = $game_id; + $data['fgame_name'] = $game['game_name']; + } + } /* 添加用户 */ $res = M('user', 'tab_') ->add($data); return $res; @@ -449,9 +459,11 @@ class SsgController extends BaseController { public function pay(){ $user = session("user_auth"); $gameId = I("game_id", 0); + $promoteId = I("promote_id"); + //$price = self::signprice; if (!$user) { - redirect("/mobile.php/ssg/login"); + redirect("/mobile.php/ssg/login/game_id/{$gameId}/promote_id/$promoteId"); // $this->error("请登入", "/mobile.php/ssg/login"); } $userId = $user['user_id']; @@ -485,8 +497,6 @@ class SsgController extends BaseController { } } - - /* * 发起支付 */ diff --git a/Application/Mobile/View/Ssg/login.html b/Application/Mobile/View/Ssg/login.html index 251224289..4e243d77e 100644 --- a/Application/Mobile/View/Ssg/login.html +++ b/Application/Mobile/View/Ssg/login.html @@ -32,6 +32,7 @@ +
@@ -375,6 +376,7 @@ var PhoneObj = { var phonepassword = $('#phonepassword').val(); var phonecode = $('#phonecode').val(); var promoteId = $("#promote_id").val(); + var gameId = $("#game_id").val(); if(!PhoneObj.checkPhone(phone)){ return false; } @@ -393,7 +395,8 @@ var PhoneObj = { account:phone, password:phonepassword, code:phonecode, - promote_id:promoteId + promote_id:promoteId, + game_id:gameId, }, success: function (result) { console.log(result)