登录sdk主页跳转

master
zhengyongxing 5 years ago
parent 4120344388
commit ee40286108

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

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

Loading…
Cancel
Save