我的游戏

master
chenzhi 5 years ago
parent ad6eb5b0d7
commit 5d454e5429

@ -1348,28 +1348,42 @@ class UserController extends BaseController
* @return [type] [description]
* @author wyr <840186209@qq.com>
*/
public function usergame($p = 1)
// public function usergame($p = 1)
// {
// if (!$this->islogin()) {
// $this->redirect('Mobile/User/login');
// }
// $page = intval($p);
// $page = $page ? $page : 1; //默认显示第一页数据
// $row = C('LIST_ROWS');
// $map['user_id'] = $this->suser->login_info('user_id');
// $data = D('DownRecord')->table('tab_down_record AS tdr')
// ->field('tab_game.id,tab_game.dow_status,tab_game.game_name,tab_game.game_size,tab_game.dow_num,tab_game.icon,tab_game.features,tdr.user_id,tab_game.and_dow_address,tab_game.add_game_address,tab_game.ios_dow_address,tab_game.ios_game_address,tab_game.game_score,tab_game.sdk_version')
// ->join("tab_game ON tdr.game_id = tab_game.id")
// ->where($map)
// ->page($page, $row)
// ->select();
// $this->assign("data", $data);
// $this->assign("page", $page);
// $this->display();
// }
public function usergame()
{
if (!$this->islogin()) {
$this->redirect('Mobile/User/login');
}
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
$row = C('LIST_ROWS');
$map['user_id'] = $this->suser->login_info('user_id');
$data = D('DownRecord')->table('tab_down_record AS tdr')
->field('tab_game.id,tab_game.dow_status,tab_game.game_name,tab_game.game_size,tab_game.dow_num,tab_game.icon,tab_game.features,tdr.user_id,tab_game.and_dow_address,tab_game.add_game_address,tab_game.ios_dow_address,tab_game.ios_game_address,tab_game.game_score,tab_game.sdk_version')
->join("tab_game ON tdr.game_id = tab_game.id")
->where($map)
->page($page, $row)
->select();
$this->assign("data", $data);
$this->assign("page", $page);
$this->display();
}
/**
* 个人中心->我的游戏 AJAX加载更多
* @return [type] [description]

@ -32,7 +32,7 @@
<img src="__IMG__/new/nicheng.png" alt="">
<input type="text" placeholder="请输入昵称" name="nickname" id="nickname" value="">
</div>
<div class="login-gender">
<!-- <div class="login-gender">
<div class="title">
<img src="__IMG__/new/xingbie.png" alt="">
<span>性别</span>
@ -47,7 +47,7 @@
<input id="radio-2" name="sex" type="radio" value="女">
<label for="radio-2" class="radio-label"></label>
</div>
</div>
</div> -->
<button class="login-btn nextsubmit">注册</button>
<div class="login-agreement">注册即表示同意<a href="{:U('News/protocol')}">《用户协议》</a></div>
</div>
@ -73,7 +73,7 @@
var account = $.trim($('#account').val());
var nickname = $.trim($('#nickname').val())
var password = $.trim($('#password').val());
var sex = $.trim($('input[name=sex]:checked').val());
// var sex = $.trim($('input[name=sex]:checked').val());
var promoteId = parseInt("{:I('get.pid')}") ? parseInt("{:I('get.pid')}") : 0;
var gameId = parseInt("{:I('get.gid')}") ? parseInt("{:I('get.gid')}") : 0;
@ -106,7 +106,7 @@
$.ajax({
type:'POST',
url:'{:U("User/step1")}',
data:{'account':account,'nickname':nickname,'password':password,'sex':sex,'promote_id':promoteId,'game_id':gameId},
data:{'account':account,'nickname':nickname,'password':password,'promote_id':promoteId,'game_id':gameId},
dataType:"Json",
success:function(data){
pmsg.msg(data.msg);

@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>我的</title>
<title>万盟天下</title>
<script src="__JS__/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="__JS__/getRem.js"></script>
<link rel="stylesheet" type="text/css" href="__CSS__/reset.css">
@ -16,64 +16,68 @@
<div class="myPlay">
<!-- 子页公共头部 -->
<div class="subpage-heard">我的游戏
<a href="#" class="arrows"></a>
<a href="{:U('User/index')}" class="arrows"></a>
</div>
<!-- 无内容时显示 -->
<div class="not-play" style="display: none;">
<img src="img/not_play.png" alt="">
<span>您还没有相关内容哦</span>
</div>
<empty name="data">
<div class="not-play">
<img src="__IMG__/user/not_play.png" alt="">
<span>您还没有相关内容哦</span>
</div>
</empty>
<div class="myPlay-box">
<volist name='data' id="vo">
<div class="myPlay-info">
<div class="info-box">
<div class="infoLeft">
<img src="{:get_img_url($vo['icon'])}" onerror="this.src='__IMG__/empty.jpg';this.onerror=null">
<span>{$vo.game_name}</span>
</div>
<if condition='$vo.and_dow_address eq "" && $vo.add_game_address eq "" && $vo.ios_dow_address eq "" && $vo.ios_game_address eq "" '>
<a class="btn disabled">立即进入</a>
<else/>
<?php $devicetype = get_device_type();?>
<eq name='devicetype' value='1'>
<eq name="vo.down_port" value="2">
<a href="{$vo['add_game_address']}" class="btn">立即进入</a>
<else />
<a url="<if condition='$vo.dow_status eq 0'>#<else/>{:U('AjaxDown/down_file?game_id='.$vo['relation_game_id'].'&type=1')}</if>" class="btn down">立即进入</a>
</eq>
<else />
<eq name='devicetype' value='2'>
<eq name="vo.down_port" value="2">
<a href="{$vo['add_game_address']}" class="btn">立即进入</a>
<else />
<a url="<if condition='$vo.dow_status eq 0'>#<else/>{:U('AjaxDown/down_file?game_id='.$vo['relation_game_id'].'&type=2')}</if>" class="btn down">立即进入</a>
</eq>
<notempty name="data">
<volist name='data' id="vo">
<div class="myPlay-info">
<div class="info-box">
<div class="infoLeft">
<img src="{:get_img_url($vo['icon'])}" onerror="this.src='__IMG__/empty.jpg';this.onerror=null">
<span>{$vo.game_name}</span>
</div>
<if condition='$vo.and_dow_address eq "" && $vo.add_game_address eq "" && $vo.ios_dow_address eq "" && $vo.ios_game_address eq "" '>
<a class="btn disabled">立即进入</a>
<else/>
<!-- <a url="#" class="btn disabled">下载</a> -->
<eq name="vo.sdk_version" value="1">
<eq name="vo.down_port" value="2">
<a href="{$vo['add_game_address']}" class="btn">立即进入</a>
<?php $devicetype = get_device_type();?>
<eq name='devicetype' value='1'>
<eq name="vo.down_port" value="2">
<a href="{$vo['add_game_address']}" class="btn">立即进入</a>
<else />
<a url="<if condition='$vo.dow_status eq 0'>#<else/>{:U('AjaxDown/down_file?game_id='.$vo['relation_game_id'].'&type=1')}</if>" class="btn down">立即进入</a>
</eq>
<else />
<a url="<if condition='$vo.dow_status eq 0'>#<else/>{:U('AjaxDown/down_file?game_id='.$vo['relation_game_id'].'&type=1')}</if>" class="btn down">立即进入</a>
<eq name='devicetype' value='2'>
<eq name="vo.down_port" value="2">
<a href="{$vo['add_game_address']}" class="btn">立即进入</a>
<else />
<a url="<if condition='$vo.dow_status eq 0'>#<else/>{:U('AjaxDown/down_file?game_id='.$vo['relation_game_id'].'&type=2')}</if>" class="btn down">立即进入</a>
</eq>
<else/>
<!-- <a url="#" class="btn disabled">下载</a> -->
<eq name="vo.sdk_version" value="1">
<eq name="vo.down_port" value="2">
<a href="{$vo['add_game_address']}" class="btn">立即进入</a>
<else />
<a url="<if condition='$vo.dow_status eq 0'>#<else/>{:U('AjaxDown/down_file?game_id='.$vo['relation_game_id'].'&type=1')}</if>" class="btn down">立即进入</a>
</eq>
</eq>
</eq>
<eq name="vo.sdk_version" value="2">
<eq name="vo.down_port" value="2">
<a href="{$vo['ios_game_address']}" class="btn">立即进入</a>
<else />
<a url="<if condition='$vo.dow_status eq 0'>#<else/>{:U('AjaxDown/down_file?game_id='.$vo['relation_game_id'].'&type=2')}</if>" class="btn down">立即进入</a>
<eq name="vo.sdk_version" value="2">
<eq name="vo.down_port" value="2">
<a href="{$vo['ios_game_address']}" class="btn">立即进入</a>
<else />
<a url="<if condition='$vo.dow_status eq 0'>#<else/>{:U('AjaxDown/down_file?game_id='.$vo['relation_game_id'].'&type=2')}</if>" class="btn down">立即进入</a>
</eq>
</eq>
</eq>
</eq>
</eq>
</if>
<!-- <a href="{$vo['add_game_address']}">立即进入</a> -->
</div>
</div>
</volist>
</eq>
</eq>
</if>
<!-- <a href="{$vo['add_game_address']}">立即进入</a> -->
</div>
</div>
</volist>
</notempty>
</div>
</div>
<div class="popmsg pop-dialog"></div>
<div class="popmsg pop-dialog" style="font-size: .28rem;"></div>
<div class="space"></div>
<div class="loading ms-none hidden" id="moreBtn"><a href="javascript:" class="link"></a></div>
</body>
@ -83,43 +87,7 @@
$(function() {
var pmsg = $('.popmsg').pop();
var popmsg = $('.loading').pop();
<?php if(!$data){?>
pmsg.msg('暂无数据');
<?php }?>
var ac = $('#ajaxContainer');
ajaxload('{:U("ajaxUserGame")}',{},function(data) {
if (data.status == 1) {
ac.attr('currentpage',data.page);
var html = '',d = data.lists;
for (var i in d) {
var item = d[i];
html += '<li> <a href="">'+
' <img src="'+item.icon+'" class="icon" onerror="this.src=\'__IMG__/empty.jpg\';this.onerror=null">'+
' </a><div class="text">'+
' <div class="namebox">'+
' <a href="" class="name">'+item.game_name+'</a>';
var game_score_html = '<p class="stars"><i style="width:'+item.game_score+'0%;"></i></p>';
html += game_score_html;
html += ' </div>'+
' <div class="info">'+
' <span class="size">'+item.game_size+'</span>'+
' <span class="dlnumber">'+item.dow_num+'人下载</span>'+
' </div>'+
' <p class="description">'+item.features+'</p>'+
' </div>'+
'</li>';
}
ac.append(html);
$('.loading').addClass('ms-none');
$('#moreBtn').removeClass('ms-none');loads = false;
} else {
$('.loading').removeClass('hidden').addClass('ms-none');
popmsg.msg('已经到底了~');
}
})
$(".btn").click(function(){
var url = $(this).attr('url');

@ -139,7 +139,7 @@
</div>
</div>
<div class="popmsg pop-dialog"></div>
<div class="popmsg pop-dialog" style="font-size: .28rem;"></div>
</body>
<script src="__JS__/pop.lwx.min.js"></script>
<script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Loading…
Cancel
Save