Commit f9cb49c9 authored by houdong's avatar houdong

vip页面修改

parent 637c4607
......@@ -1362,6 +1362,8 @@ class PkTopAction extends IdentityAction{
//我的成绩
if($userId){
$myData = M("userinfo", " ", C('DB_CONFIG_MNCG3'))->where(['uid'=>$this->GID.'X'.$userId])->cache(true,300)->find();
$myData['userName']=$this->user['userName'];
$myData['userId']=$userId;
$this->assign('myData',$myData);
}
......@@ -1448,7 +1450,73 @@ class PkTopAction extends IdentityAction{
}
//其他排行榜
public function getOtherPhb(){
$gid=$this->GID;
$order=I('order','lastmonthup');
$p=I('p', 1);
// $pageSize=10;
$pageSize=$gid==$this->GID?10:200;
//分表归档
$suffix = D('Userinfo')->getTable($gid);
$table =$suffix?'mncg_archive.userinfo'.$suffix:'mncg.userinfo';
$where=['sex'=>$gid,'new_phb'=>['gt',0],'zt'=>1];
//测试时不用缓存->cache(true,cacheTime())
$userNowList = M($table, " ", C('DB_CONFIG_MNCG3'))->where($where)->order($order.' desc')->page($p.','.$pageSize)->select();
// var_dump($gid);exit;
$userids = array();
$usertranids = [];
foreach ($userNowList as $key => &$rankV) {
$userIDs = explode("X", $rankV['uid']);
$rankV['user_id'] = $userIDs[1];
// $rankV['userUrl'] = tradeDetailLink($this->GID,3,$userIDs[1]);
$userids[] = $userIDs[1];
$usertranids[] = $rankV['uid'];
}
$nick_name_arry =getUser($userids,'nick');////
$robot_user = [];
if(!empty($usertranids)){
$robot_user = D('Robot')->groupRobotTranUserList($usertranids);
}
foreach ($userNowList as $key => &$value) {
$nick_name = $nick_name_arry[$value['user_id']];
//$value['user_name'] = $nick_name?$nick_name:$value['username'];
$value['user_name'] = $nick_name;
$robot_flag_show = D('Robot')->robot_flag_show($value['user_id']);
$value['robot_user'] = in_array($value['user_id'],$robot_user) && $robot_flag_show == 1 ? 1 : 0;
$value['robot_url'] = in_array($value['user_id'],$robot_user) && $robot_flag_show == 1 ? M_URL.'/Robot' : '';
}
//总数目
$totalCount = M($table, " ", C('DB_CONFIG_MNCG3'))->where($where)->count();
if($caller=='local'){
if($gid==$this->GID){
$return['userList']=$userNowList;
$return['order']=$order;
$return['totalCount']=$totalCount;
$return['pages']=ceil($totalCount/$pageSize);
}else{
$return['finalList']=$userNowList;
$return['order']=$order;
// $return['totalCount']=$totalCount;
// $return['pages']=$totalCount/10;
}
return $return;
}else{
$this->assign(array('order'=>$order,'userList'=>$userNowList,'p'=>$p));
if($gid==$this->GID){
$content = $this->fetch('itemNow');
}else{
$content = $this->fetch('finalList');
}
$content = $this->fetch('itemNow');
$this->ajaxReturn(array(
'status' => 1,'count' =>$totalCount,'data' => $content ));
}
}
}
......
......@@ -8,8 +8,7 @@
<meta name="format-detection" content="telephone=no">
<meta name="format-detection" content="email=no">
<!--<title>2022模拟炒股大赛,全民炼股有奖大赛赛程及奖项安排</title>-->
<title>叩富全民炼股争霸赛-首页</title>
<title>全民炼股争霸赛-全民分赛场</title>
<meta name="description" content="叩富简投全民炼股2023模拟炒股大赛,赢10万现金大奖。自2007年开赛以来,已累积举办200多期模拟炒股大奖赛。每周、每月都有现金大奖。软件、手机APP、网页同步参赛">
<meta name="keywords" content="2023模拟炒股大赛,模拟炒股大赛,模拟炒股,模拟股票大赛,炒股大赛,模拟炒股有奖大赛,模拟股市大赛,股票模拟大赛,股票大赛,腾讯A股大赛,凤凰炒股大赛">
......@@ -41,14 +40,14 @@
AppBridge.init();
//页面默认刷新
var userId="{$user.userID}";//这个userid 一定是从session或者cookie里验证后获取到的。
if(!userId){
AppBridge.refreshPage({},function (userId,key) {
if('{$refresh}'=='1'){
// location.href='/Allex?user_id='+userId+'&key2='+key+'&viewPage='+'{$viewPage}';
location.replace('/PkTop?user_id='+userId+'&key2='+key+'&viewPage='+'{$viewPage}');
}
});
}
// if(!userId){
// AppBridge.refreshPage({},function (userId,key) {
// if('{$refresh}'=='1'){
// // location.href='/Allex?user_id='+userId+'&key2='+key+'&viewPage='+'{$viewPage}';
// location.replace('/PkTop?user_id='+userId+'&key2='+key+'&viewPage='+'{$viewPage}');
// }
// });
// }
</script>
</head>
<body style="min-height: 100%;background-color: #C60000;">
......@@ -58,7 +57,7 @@
<div class="header-h">
<a href="javascript:;" class="header-h-a"><span class="back-btn back-btn-a"></span></a>
<span class="header-share"></span>
<ul class="header-title"> <li class="one-li">全民炼股争霸赛(2023)</li></ul>
<ul class="header-title"> <li class="one-li">全民炼股争霸赛-全民分赛场</li></ul>
</div>
</div>
<div class="head-fit"></div>
......@@ -107,37 +106,34 @@
</foreach>
</ul>
</div>
<a href="javascript:;" class="ds-state">大赛动态></a>
<a href="{:M_URL}/Pedia?cateId=129" class="ds-state">大赛动态></a>
</div>
<!--add-->
<div class="my-info-data">
<div class="head-r-num">
<span class="head-ranking">
<eq name="p" value="1">
<eq name='key' value='0'><img src="__PUBLIC__/Home/images/g2020/crown1.png" alt=""></eq>
<eq name='key' value='1'><img src="__PUBLIC__/Home/images/g2020/crown2.png" alt=""></eq>
<eq name='key' value='2'><img src="__PUBLIC__/Home/images/g2020/crown3.png" alt=""></eq>
</eq>
</span>
<span class="user-head" pId="{$vo.user_id}" pName="{$vo.user_name}">
<img src="{:getPortraitPath($vo['user_id'], 'small', true)}" alt="">
</span>
<span class="head-r-t" pId="{$vo.user_id}" pName="{$vo.user_name}">{$vo.user_name}股神03-07</span>
</div>
<div class="info-data">
<table cellspacing="0" cellpadding="0">
<tr class="data-num">
<td class="num red">19.15%</td>
<td class="num" style="text-align: right;">0%</td>
</tr>
<tr class="data-title">
<td class="title">周盈利率</td>
<td class="title" style="text-align: right;">月周转率</td>
</tr>
</table>
<notempty name="myData">
<div class="my-info-data">
<div class="head-r-num">
<span class="user-head" pId__="{$vo.user_id}" pName__="{$vo.user_name}">
<img src="{:getPortraitPath($vo['user_id'], 'small', true)}" alt="">
</span>
<span class="head-r-t" pId__="{$myData.user_id}" pName="{$myData.userName}">{$myData.userName}</span>
</div>
<div class="info-data">
<table cellspacing="0" cellpadding="0">
<tr class="data-num">
<td class="num red">{$myData.lastweekup}%</td><td class="num" style="text-align: right;">{$myData.monthzzl}%</td>
</tr>
<tr class="data-title">
<td class="title">周盈利率</td><td class="title" style="text-align: right;">月周转率</td>
</tr>
</table>
</div>
<eq name="myData.monthzzl" value="0">
<span class="tip-msg">距离获得奖金只差 交易一笔</span>
</eq>
</div>
<span class="tip-msg">距离获得奖金只差 交易一笔</span>
</div>
</notempty>
<div class="contest-setting contest-item">
<div class="title-p">赛程安排</div>
<div class="setting-info">
......@@ -571,19 +567,19 @@
//打开页面时出现pk消息的弹框
if('{$popType}'==2){animPop('#pop2'); }
if('{$popType}'==3){
var text=$('#pop3').children('.result-msg-s').text();
text=text.replace(/【】/, "【{$popPkUserName}】");
$('#pop3').children('.result-msg-s').text(text);
animPop('#pop3');
}
if('{$popType}'==4){
var text=$('#pop4').children('.result-msg-s').text();
text=text.replace(/【】/, "【{$popPkUserName}】");
$('#pop4').children('.result-msg-s').text(text);
animPop('#pop3');
}
// if('{$popType}'==2){animPop('#pop2'); }
// if('{$popType}'==3){
// var text=$('#pop3').children('.result-msg-s').text();
// text=text.replace(/【】/, "【{$popPkUserName}】");
// $('#pop3').children('.result-msg-s').text(text);
// animPop('#pop3');
// }
// if('{$popType}'==4){
// var text=$('#pop4').children('.result-msg-s').text();
// text=text.replace(/【】/, "【{$popPkUserName}】");
// $('#pop4').children('.result-msg-s').text(text);
// animPop('#pop3');
// }
$(function(){
var num = $('.notice-ul').find('li').length;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment