登录sdk主页跳转

master
zhengyongxing 5 years ago
parent 4120344388
commit ee40286108

@ -67,13 +67,13 @@ class SsgController extends BaseController {
if ($isToken) { if ($isToken) {
session("user_auth",$isToken); session("user_auth",$isToken);
$this->redirect("Ssg/index"); $this->redirect("Ssg/index",array('game_id'=>$game_id));
} else { } else {
$this->redirect("Ssg/login"); $this->redirect("Ssg/login");
} }
} else { } else {
$this->redirect("Ssg/login"); // $this->redirect("Ssg/login");
} }
//获取客服qq //获取客服qq

@ -100,6 +100,7 @@
<div class="pay-button"> <div class="pay-button">
<div style="background:url('__IMG__/ssg/index/paybt.png') no-repeat top center/cover;">确认支付¥10</div> <div style="background:url('__IMG__/ssg/index/paybt.png') no-repeat top center/cover;">确认支付¥10</div>
</div> </div>
<input id="this_game_id" value="{$_GET['game_id']}" style="display: none"/>
</body> </body>
<script type="text/template" id="gametpl"> <script type="text/template" id="gametpl">
{@each list as item,index} {@each list as item,index}
@ -114,7 +115,7 @@
至尊特权礼包(限量) 至尊特权礼包(限量)
</div> </div>
</div> </div>
{@if index==0} {@if item.game_id==game_id}
<div class="gamechoose gamenocheck gamecheck"></div> <div class="gamechoose gamenocheck gamecheck"></div>
{@else} {@else}
<div class="gamechoose gamenocheck "></div> <div class="gamechoose gamenocheck "></div>
@ -149,12 +150,39 @@ var index = {
}) })
}, },
jucierFun(data){ jucierFun(data){
data['game_id'] = $('#this_game_id').val();
var first,aimArr,aimNum;
first = {id:0};
aimArr = {id:0};
if(data['game_id']) {
data["list"].forEach(function (arr,index) {
if (index == 0) {
first = arr;
}
if(arr.id==data['game_id']) {
aimArr = arr;
aimNum = index;
}
})
if (aimArr.id != 0) {
if (first.id !=aimArr.id) {
data["list"][0] = aimArr;
data['list'][aimNum] = first;
}
}
}
var tpl = document.getElementById('gametpl').innerHTML; var tpl = document.getElementById('gametpl').innerHTML;
var html = juicer(tpl, data); var html = juicer(tpl, data);
$("#gamebox").html(html); $("#gamebox").html(html);
if(data["list"].length != 0){ if(data["list"].length != 0){
index.choose.game_id = data['list'][0]['game_id'] index.choose.game_id = data['list'][0]['game_id']
} }
index.event(); index.event();
}, },
event(){ event(){

Loading…
Cancel
Save