Commit f0e2973b authored by houdong's avatar houdong

vip大赛

parent 66f4b81d
...@@ -13,7 +13,14 @@ class PkTopAction extends IdentityAction{ ...@@ -13,7 +13,14 @@ class PkTopAction extends IdentityAction{
public $STATUS_TXT =array('1'=>'未开赛','2'=>'进行中','3'=>'已结束'); public $STATUS_TXT =array('1'=>'未开赛','2'=>'进行中','3'=>'已结束');
public function _initialize() {
parent::_initialize();
$userId = $this->user['userID'];
$ids = D('Group')->getGroupCache($userId);
if (in_array($this->GID, $ids)) {
$this->assign('joinStatus', 1);
}
}
//首页 //首页
public function indexOld() { public function indexOld() {
//首页的排行榜等切换 //首页的排行榜等切换
...@@ -1067,9 +1074,9 @@ class PkTopAction extends IdentityAction{ ...@@ -1067,9 +1074,9 @@ class PkTopAction extends IdentityAction{
$userName = I('userName', ''); $userName = I('userName', '');
$gid=I('gid',$this->GID,intval); $gid=I('gid',$this->GID,intval);
if(!$userId||!$userName){ if(!$userId||!$userName){
$this->ajaxReturn(array('status' =>0,'info'=>'非法参数')); $this->ajaxReturn(['status' =>0,'info'=>'非法参数']);
} }
$gInfo=M('Group')->field('group_id,web_id,category,name,startTime,endTime')->where(array('group_id'=>$gid))->find(); $gInfo=M('Group')->field('group_id,web_id,category,name,startTime,endTime')->where(['group_id'=>$gid])->find();
$goTradeInfo=['group_id'=>$gInfo['group_id'],'web_id'=>$gInfo['web_id'],'category'=>$gInfo['category'],'name'=>$gInfo['name']]; $goTradeInfo=['group_id'=>$gInfo['group_id'],'web_id'=>$gInfo['web_id'],'category'=>$gInfo['category'],'name'=>$gInfo['name']];
$goTradeInfo['groupStatus'] = $gInfo['startTime']>time()?'1': (is_end($gInfo['endTime'])?'3':'2'); $goTradeInfo['groupStatus'] = $gInfo['startTime']>time()?'1': (is_end($gInfo['endTime'])?'3':'2');
...@@ -1266,8 +1273,8 @@ class PkTopAction extends IdentityAction{ ...@@ -1266,8 +1273,8 @@ class PkTopAction extends IdentityAction{
$this->setUcLogin($userId); $this->setUcLogin($userId);
} }
$gid = $this->GID; // $gid = $this->GID;
$groupId = I('groupId', $gid); $groupId =$this->GID;
$groupInfo = M('Group')->field('group_id,web_id,category,name,startTime,endTime,member_quantity')->where(['group_id' => $groupId])->find(); $groupInfo = M('Group')->field('group_id,web_id,category,name,startTime,endTime,member_quantity')->where(['group_id' => $groupId])->find();
$groupStatus = $this->getGroupStatus($groupInfo); $groupStatus = $this->getGroupStatus($groupInfo);
...@@ -1287,7 +1294,7 @@ class PkTopAction extends IdentityAction{ ...@@ -1287,7 +1294,7 @@ class PkTopAction extends IdentityAction{
$lastMonth = date('Y-m', strtotime(date('Y-m-01') . "-1 month")); $lastMonth = date('Y-m', strtotime(date('Y-m-01') . "-1 month"));
$lastMonthInt = intval(date('m', strtotime(date('Y-m-01') . "-1 month"))); $lastMonthInt = intval(date('m', strtotime(date('Y-m-01') . "-1 month")));
$rankNow = $this->rankNow('local'); // $rankNow = $this->rankNow('local');
//弹窗里面的pk时间段 //弹窗里面的pk时间段
$pkTime = date('n月j日', strtotime('next Monday')) . '-' . date('n月j日', strtotime('next Monday') + 4 * 3600 * 24); $pkTime = date('n月j日', strtotime('next Monday')) . '-' . date('n月j日', strtotime('next Monday') + 4 * 3600 * 24);
...@@ -1300,14 +1307,16 @@ class PkTopAction extends IdentityAction{ ...@@ -1300,14 +1307,16 @@ class PkTopAction extends IdentityAction{
$popData=null; $popData=null;
//第一个页面显示的数据,公告,心得等 //第一个页面显示的数据,公告,心得等
$firstPageData = ['popType' => $popData['popType'], 'popPkUserName' => $popData['popPkUserName'], 'thinks' => $thinks, 'gonggao' => $gonggao]; $firstPageData = [
// 'popType' => $popData['popType'], 'popPkUserName' => $popData['popPkUserName'],
'thinks' => $thinks, 'gonggao' => $gonggao];
// $return = ['msg' => $msg, 'top10' => $top10,'lastMonthInt' => $lastMonthInt, 'myAllPkCount' => $myAllPkCount]; // $return = ['msg' => $msg, 'top10' => $top10,'lastMonthInt' => $lastMonthInt, 'myAllPkCount' => $myAllPkCount];
$this->assign($firstPageData); $this->assign($firstPageData);
$this->assign($mingrentang); // $this->assign($mingrentang);
$this->assign($rankNow); // $this->assign($rankNow);
$this->assign($return); // $this->assign($return);
//总决赛列表 //总决赛列表
$_GET['order'] = 'zongup'; $_GET['order'] = 'zongup';
...@@ -1362,7 +1371,6 @@ class PkTopAction extends IdentityAction{ ...@@ -1362,7 +1371,6 @@ class PkTopAction extends IdentityAction{
//我的成绩 //我的成绩
$this->setMyData(); $this->setMyData();
$this->assign('gid',$gid);
$this->display(); $this->display();
} }
......
<eq name="hideShiPan" value="0">
<div class="bottom-j-btn bottom-btn"> <div class="bottom-j-btn bottom-btn">
<div class="left-zx" id="zixun"><img class="icon" src="__PUBLIC__/Home/images/g2020/zx-icon-b.png"/>咨询</div> <div class="left-zx" id="zixun"><img class="icon" src="__PUBLIC__/Home/images/g2020/zx-icon-b.png"/>咨询</div>
<div class="showMoreDs"> <div class="showMoreDs">
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</div> </div>
</eq> </eq>
</div> </div>
</eq>
<div class="foot-fix"> </div> <div class="foot-fix"> </div>
...@@ -148,12 +148,12 @@ ...@@ -148,12 +148,12 @@
$(function(){ // $(function(){
var num = $('.notice-ul').find('li').length; // var num = $('.notice-ul').find('li').length;
if(num > 1){ // if(num > 1){
var time=setInterval('timer(".notice-ul")',3500); // var time=setInterval('timer(".notice-ul")',3500);
} // }
}); // });
$('.go-rule').click(function(){ $('.go-rule').click(function(){
$('html,body').animate({scrollTop: $('.bottom').offset().top}, 500); $('html,body').animate({scrollTop: $('.bottom').offset().top}, 500);
......
This diff is collapsed.
This diff is collapsed.
...@@ -13,14 +13,13 @@ ...@@ -13,14 +13,13 @@
<eq name='key' value='2'><img src="__PUBLIC__/Home/images/g2020/crown3.png" alt=""></eq> <eq name='key' value='2'><img src="__PUBLIC__/Home/images/g2020/crown3.png" alt=""></eq>
</eq> </eq>
</span> </span>
<span class="user-head goTradeNow" pId="{$vo.user_id}" pName="{$vo.user_name}"> <span class="user-head " pId="{$vo.user_id}" pName="{$vo.nick}">
<img src="{:getPortraitPath($vo['user_id'], 'small', true)}" alt=""> <img src="{:getPortraitPath($vo['user_id'], 'small', true)}" alt="">
</span> </span>
</div> </div>
<span class="head-r-t goTradeNow" pId="{$vo.user_id}" pName="{$vo.user_name}">{$vo.nick}</span> <span class="head-r-t " pId="{$vo.user_id}" pName="{$vo.nick}">{$vo.nick}</span>
<span class="head-r-t"> <span class="head-r-t">
</span> </span>
</div> </div>
<p class="info-rank-w"> <p class="info-rank-w">
...@@ -65,7 +64,7 @@ ...@@ -65,7 +64,7 @@
<script> <script>
//点用户名和头像跳转到该大赛的旧的交易页 //点用户名和头像跳转到该大赛的旧的交易页
flag=0; flag=0;
$('.goTradeNow').click(function(){ $('.user-head,.head-r-t').click(function(){
if(flag==1)return; if(flag==1)return;
flag=1; flag=1;
$.post("/PkTop/getGoTradeInfo", {'userId':$(this).attr('pId'),'userName':$(this).attr('pName')}, function (res) { $.post("/PkTop/getGoTradeInfo", {'userId':$(this).attr('pId'),'userName':$(this).attr('pName')}, function (res) {
......
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
<eq name='key' value='2'><img src="__PUBLIC__/Home/images/g2020/crown3.png" alt=""></eq> <eq name='key' value='2'><img src="__PUBLIC__/Home/images/g2020/crown3.png" alt=""></eq>
</eq> </eq>
</span> </span>
<span class="user-head" pId="{$vo.user_id}" pName="{$vo.user_name}"> <span class="user-head" pId="{$vo.user_id}" pName="{$vo.nick}">
<img src="{:getPortraitPath($vo['user_id'], 'small', true)}" alt=""> <img src="{:getPortraitPath($vo['user_id'], 'small', true)}" alt="">
</span> </span>
<span class="head-r-t" pId="{$vo.user_id}" pName="{$vo.user_name}">{$vo.nick}</span> <span class="head-r-t" pId="{$vo.user_id}" pName="{$vo.nick}">{$vo.nick}</span>
</div> </div>
<div class="info-data"> <div class="info-data">
<table cellspacing="0" cellpadding="0"> <table cellspacing="0" cellpadding="0">
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<script> <script>
//点用户名和头像跳转到该大赛的旧的交易页 //点用户名和头像跳转到该大赛的旧的交易页
flag=0; flag=0;
$('.goTradeNow').click(function(){ $('.user-head,.head-r-t').click(function(){
if(flag==1)return; if(flag==1)return;
flag=1; flag=1;
$.post("/PkTop/getGoTradeInfo", {'userId':$(this).attr('pId'),'userName':$(this).attr('pName')}, function (res) { $.post("/PkTop/getGoTradeInfo", {'userId':$(this).attr('pId'),'userName':$(this).attr('pName')}, function (res) {
......
<div class="champ-body-top">
<div class="top-banner">
<img src="__PUBLIC__/images/2023/cg-banner2.png" alt="">
<!--<span class="cs-num">· {$member_quantity|default=0}人参赛 ·</span>-->
</div>
<div class="top-entrance-b" style="width————: 75%;margin: 0 auto;">
<ul class="entrance-tab-ul">
<li class='en-li f-left <eq name="ACTION_NAME" value="index">active</eq> ' style="width: 24%"><a href="/PkTop">赛程及奖项</a></li>
<li class='en-li f-center lottery-li <eq name="ACTION_NAME" value="choujiang">active</eq> ' ><a href="/PkTop/choujiang">瓜分10万</a></li>
<li class='en-li f-center <in name="ACTION_NAME" value="phbWeek,phbOther">active</in> ' ><a href="/PkTop/phbWeek">获奖榜</a></li>
<li class="en-li f-right" >
<a href="{:M_URL}/Match/jiang">返回主赛场</a><img class="more" src="__PUBLIC__/Home/images/g2020/gdjj.png" style=""/>
</li>
</ul>
</div>
</div>
...@@ -75,22 +75,7 @@ ...@@ -75,22 +75,7 @@
</script> </script>
</if> </if>
<div class="championship-cont warp-container"> <div class="championship-cont warp-container">
<div class="champ-body-top"> <include file="nav"/>
<div class="top-banner">
<img src="__PUBLIC__/images/2023/cg-banner2.png" alt="">
<!--<span class="cs-num">· {$member_quantity|default=0}人参赛 ·</span>-->
</div>
<div class="top-entrance-b" style="width————: 75%;margin: 0 auto;">
<ul class="entrance-tab-ul">
<li class="en-li f-left" style="width: 24%">赛程及奖项</li>
<li class="en-li f-center lottery-li" style_="width: 24%">瓜分10万 </li>
<li class="en-li f-center active" style_="width: 24%">获奖榜</li>
<li class="en-li f-right" >
返回主赛场<img class="more" src="__PUBLIC__/Home/images/g2020/gdjj.png" style=""/>
</li>
</ul>
</div>
</div>
<div class="contest-body-detail"> <div class="contest-body-detail">
<!--add--> <!--add-->
<notempty name="myData"> <notempty name="myData">
...@@ -193,36 +178,6 @@ ...@@ -193,36 +178,6 @@
$(function(){
var num = $('.notice-ul').find('li').length;
if(num > 1){
var time=setInterval('timer(".notice-ul")',3500);
}
});
$('.go-rule').click(function(){
$('html,body').animate({scrollTop: $('.bottom').offset().top}, 500);
})
//当前只有两个弹窗
// $(".t-pop-close,.pop-close").click(function () {
// animPop($(this).parents('.pops'));
// });
$("#closeBm,#closeWx").click(function () {
animPop($(this).parents('.pops'));
});
//弹出咨询弹框
$("#zixun").click(function () {
animPop('#popWx')
});
//点关闭刷新页面取状态
$("#closeSucc").click(function () {
$('#popPkTopSucc').hide();
window.location.reload();
});
window.onscroll = function () { window.onscroll = function () {
// alert(11); // alert(11);
var check; var check;
......
...@@ -75,22 +75,7 @@ ...@@ -75,22 +75,7 @@
</script> </script>
</if> </if>
<div class="championship-cont warp-container"> <div class="championship-cont warp-container">
<div class="champ-body-top"> <include file="nav"/>
<div class="top-banner">
<img src="__PUBLIC__/images/2023/cg-banner2.png" alt="">
<!--<span class="cs-num">· {$member_quantity|default=0}人参赛 ·</span>-->
</div>
<div class="top-entrance-b" style="width————: 75%;margin: 0 auto;">
<ul class="entrance-tab-ul">
<li class="en-li f-left" style="width: 24%"><a href="/PkTop">赛程及奖项</a></li>
<li class="en-li f-center lottery-li" style_="width: 24%">瓜分10万 </li>
<li class="en-li f-center active" style_="width: 24%">获奖榜</li>
<li class="en-li f-right" >
返回主赛场<img class="more" src="__PUBLIC__/Home/images/g2020/gdjj.png" style=""/>
</li>
</ul>
</div>
</div>
<div class="contest-body-detail"> <div class="contest-body-detail">
<!--add--> <!--add-->
<notempty name="myData"> <notempty name="myData">
...@@ -112,8 +97,8 @@ ...@@ -112,8 +97,8 @@
<div class="info-data"> <div class="info-data">
<table cellspacing="0" cellpadding="0"> <table cellspacing="0" cellpadding="0">
<tr class="data-num"> <tr class="data-num">
<td class="num red" style="text-align: left;">第 <td class="num red" style="text-align: left;">
<empty name="myData.phb">--<else/>{$myData.phb}</empty>名 <empty name="myData.phb">--<else/>第{$myData.phb}名</empty>
</td> </td>
<gt name="myData.lastweekup" value="0"><td class="num red">{$myData.lastweekup}%</td></gt> <gt name="myData.lastweekup" value="0"><td class="num red">{$myData.lastweekup}%</td></gt>
<eq name="myData.lastweekup" value="0"><td class="num ">{$myData.lastweekup}%</td></eq> <eq name="myData.lastweekup" value="0"><td class="num ">{$myData.lastweekup}%</td></eq>
...@@ -139,7 +124,7 @@ ...@@ -139,7 +124,7 @@
</div> </div>
<div class="award-tab-panel"> <div class="award-tab-panel">
<span class="rule-make">上榜规则:当周收益为正、月周转率>0</span> <span class="rule-make">上榜规则:当周收益为正、月周转率>0</span>
<div id="weekContainer"> <div id="container">
<include file="itemWeek"/> <include file="itemWeek"/>
</div> </div>
...@@ -156,8 +141,6 @@ ...@@ -156,8 +141,6 @@
</div> </div>
</div> </div>
</div> </div>
...@@ -171,98 +154,6 @@ ...@@ -171,98 +154,6 @@
$(function(){ $(function(){
//页面最上面的li标签切换
// $('.en-li').each(function(i,obj){
// $(obj).click(function(){
// if(i==3){
// location.href='{:M_URL}/Match/jiang';
// return;
// }
//
// $(this).siblings().removeClass('active');
// $(this).addClass('active');
// $('.contest-body-detail').hide();
//
// // $($('.contest-body-detail')[i-1]).show();
//
// //1是中金大赛,调到别的链接
// // if(i==1){
// // // location.href='{:M_URL}/Zjds';
// // return;
// // }
// if(i==0){
// $($('.contest-body-detail')[0]).show();
// }else{
// $($('.contest-body-detail')[i]).show();
// }
//
// console.log('当前外层标签序号:'+i);
// history.replaceState({},"","?gid={$_GET.gid}&viewPage="+(i+1));
// // if(i == 1){
// // slider.reloadSlider();
// // }
// if(i==2){
// $('.selectNow').eq(1).click();
// }
// //点击量统计
// if(i==3){
// $.get('/PkTop/dianjiLog',{},function(e){
// console.log('记录点击日志');
// },'json');
//
// }
// })
// });
//点排行榜下面的几个标签,i从0开始
$('.award-tab-btn .btn').each(function(i,obj){
$(obj).click(function(){
$('.award-tab-btn .btn').removeClass('active');
$(this).addClass('active');
$('.award-tab-panel').hide();
$($('.award-tab-panel')[i]).show();
})
});
$(function(){
var num = $('.notice-ul').find('li').length;
if(num > 1){
var time=setInterval('timer(".notice-ul")',3500);
}
});
$('.go-rule').click(function(){
$('html,body').animate({scrollTop: $('.bottom').offset().top}, 500);
})
//当前只有两个弹窗
// $(".t-pop-close,.pop-close").click(function () {
// animPop($(this).parents('.pops'));
// });
$("#closeBm,#closeWx").click(function () {
animPop($(this).parents('.pops'));
});
//弹出咨询弹框
$("#zixun").click(function () {
animPop('#popWx')
});
//点关闭刷新页面取状态
$("#closeSucc").click(function () {
$('#popPkTopSucc').hide();
window.location.reload();
});
window.onscroll = function () { window.onscroll = function () {
// alert(11); // alert(11);
var check; var check;
...@@ -301,8 +192,8 @@ ...@@ -301,8 +192,8 @@
} else { } else {
} }
order='{$order}';
$.get('/PkTop/rankNow',{p:nextPage,'order':order,'debug':'scroll'},function(e){ $.post('/PkTop/phbWeek',{p:nextPage,'order':order,'debug':'scroll'},function(e){
$(".l_1").hide(); $(".l_1").hide();
if(nextPage>=parseInt(totalPage)) { if(nextPage>=parseInt(totalPage)) {
// $(".l_2").hide(); // $(".l_2").hide();
......
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