手机官网-落地页

master
“用lww 5 years ago
parent 07a33ab051
commit 019ae56f40

@ -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');
}

@ -24,7 +24,7 @@
<?php if ($downloadUrl == 'https://'.$_SERVER['HTTP_HOST']) :?>
<div class="download">免费安装</div>
<?php else :?>
<div class="download" onclick="location.href='{$downloadUrl}'">免费安装</div>
<div class="download">免费安装</div>
<?php endif ;?>
<img src="__IMG__/wenhao.png" class="doubt" alt="">
</div>
@ -178,8 +178,8 @@
<div class="text"> 购买至尊下载赠送限量至尊超级礼包价值100元</div>
<div class="text">• 至尊下载:永不闪退、不丢数据稳定有保障</div>
<div class="text"> • 同一设备安装一次可在一年内无限次下载重装</div>
<div class="blue-btn">¥10至尊下载</div>
<div class="gray-btn">普通下载</div>
<div class="blue-btn" onclick="location.href='mobile.php/Ssg/pay/game_id/{$game[\'id\']}/promote_id/{$promoteId}'">¥10至尊下载</div>
<div class="gray-btn" onclick="location.href='{$downloadUrl}'">普通下载</div>
</div>
</div>
</div>

@ -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 {
}
}
/*
* 发起支付
*/

@ -32,6 +32,7 @@
<img src="__IMG__/ssg/home/hader.png">
</div>
<input type="hidden" value="{$promote_id}" id="promote_id" name="promote_id"/>
<input type="hidden" value="{$game_id}" id="game_id" name="game_id"/>
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide swiper-no-swiping">
@ -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)

Loading…
Cancel
Save