Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cof_vip
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
houdong
cof_vip
Commits
8b8820d6
Commit
8b8820d6
authored
Jun 29, 2023
by
houdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
战法版本
parent
59710a49
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
261 deletions
+1
-261
PkTopAction.class.php
app/Lib/Action/Vip/PkTopAction.class.php
+1
-261
No files found.
app/Lib/Action/Vip/PkTopAction.class.php
View file @
8b8820d6
...
@@ -646,74 +646,7 @@ class PkTopAction extends IdentityAction{
...
@@ -646,74 +646,7 @@ class PkTopAction extends IdentityAction{
}
}
//刷新页面后获取弹出的消息
// private function getPopData($userId){
// $key='pk_clear_time:m:'.$userId;
// //打开页面时弹出新pk的消息和pk结果的消息,2有人向你pk,3pk胜利,4pk失败
// $lastTime=CS('pk_add_time:m:'.$userId);
// $lastTime=$lastTime?$lastTime:0;
// $popData=M('PktopData')->where(array('add_time'=>array('gt',$lastTime),'passive_id'=>$userId))->order('add_time desc')->find();
// if(!empty($popData)){
// $popType=2;
// $popPkUserName=$popData['active_name'];
// CS('pk_add_time:m:'.$userId,$popData['add_time']);
// }else{
// $lastTime=CS($key);
// $lastTime=$lastTime?$lastTime:0;
// //pk是否赢
// $popData=M('PktopData')->where(array('clear_time'=>array('gt',$lastTime),'active_id'=>$userId,'pk_status'=>1))->order('clear_time desc')->find();
// if(!empty($popData)){
// $popType=3;
// $popPkUserName=$popData['passive_name'];
// CS($key,$popData['clear_time']);
// }else{
// //pk是否输
// $popData=M('PktopData')->where(array('clear_time'=>array('gt',$lastTime),'active_id'=>$userId,'pk_status'=>2))->order('clear_time desc')->find();
// if(!empty($popData)){
// $popType=4;
// $popPkUserName=$popData['passive_name'];
// CS($key,$popData['clear_time']);
// }
// }
// }
// return array('popType'=>$popType,'popPkUserName'=>$popPkUserName);
// }
//我的所有的挑战列表,包括我挑战别人的,和别人挑战我的
// public function myPkList(){
// $userId = I('userId', '',intval);
// if(!$userId){
// $userId = $this->user['userID'];
// }
//// $where['pk_end_time']=array('egt',date('Y-m-d'));
// $where['_complex'] = array('active_id'=>$userId,'passive_id'=>$userId,'_logic'=>'or');
// $myPkList=M('PktopData')->where($where)->order('pk_begin_time desc')->select();
// foreach ($myPkList as $k => &$v) {
// $v['pk_begin_time']=date('m月d日',strtotime($v['pk_begin_time']));
// $v['pk_end_time']=date('m月d日',strtotime($v['pk_end_time']));
//
// }
//
// $this->assign(array('myPkList'=>$myPkList));
// //进入交易需要的参数
// $groupInfo=M('Group')->field('group_id,web_id,category,name,startTime,endTime')->where(array('group_id'=>$this->GID))->find();
//
// $zhuangtai=$this->getGroupStatus($groupInfo);
// $groupInfo['userID']=$userId;
//
// $groupInfo['close_tips']='';
// $groupInfo['viewPage']=2;
// $groupInfo['zhuangtai'] = $zhuangtai;
// $groupInfo['title'] = '『全民炼股』争霸赛(2020赛季)';
// $groupInfo['desc'] = $groupInfo['shareContent']='红包周周有,万元大奖月月送,精英还可赢PK奖';
//
// $this->assign('groupInfo',json_encode($groupInfo));
// //我的挑战金
// $myInfo=M('PktopUser')->where(array('user_id'=>$userId))->find();
// $leftMoney=$myInfo['active_money']+$myInfo['passive_money']-$myInfo['already_withdraw_money'];
// $this->assign('leftMoney',$leftMoney);
// $this->display();
// }
//我的邀请列表
//我的邀请列表
public
function
myInvite
(){
public
function
myInvite
(){
...
@@ -896,43 +829,6 @@ class PkTopAction extends IdentityAction{
...
@@ -896,43 +829,6 @@ class PkTopAction extends IdentityAction{
$this
->
display
();
$this
->
display
();
}
}
//pk列表,选月份后也调用该方法
// public function pkList(){
// if(IS_GET){
// //显示当前月的挑战
//// $month=date('Y-m');
// $month=date('Y-m',strtotime(date('Y-m-01') . "-1 month"));
// $selectMonth=array();
// foreach ($this->MONTH as $k => $value) {
// $nowMonth=date('Y-m',strtotime(date('Y-m-01')));
// if($k<$nowMonth){
// $selectMonth[$k]=$value;
// }
// }
// }else{
// $month = I('month', '',intval);
// }
// $pkList=M('PktopData')->where(array('month'=>$month))->order('add_time desc')->select();
// foreach ($pkList as $k => &$v) {
// $v['pk_begin_time']=date('m月d日',strtotime($v['pk_begin_time']));
// $v['pk_end_time']=date('m月d日',strtotime($v['pk_end_time']));
//
// }
// $this->assign(array('pkList'=>$pkList,'selectMonth'=>$selectMonth,'lastMonth'=>$month));
// $this->assign(['type'=>'pkList']);
// if(IS_GET){
// $userId = $this->user['userID'];
// $this->setGoTrade($userId);
// $this->display();
// }else{
//
// $content = $this->fetch('item2');
// $this->ajaxReturn(array(
// 'status' => 1,'count'=>count($pkList),'data' => $content
// ));
// }
// }
public
function
login
()
{
public
function
login
()
{
$userId
=
I
(
'user_id'
,
''
,
intval
);
$userId
=
I
(
'user_id'
,
''
,
intval
);
if
(
$userId
&&
$this
->
user
[
'userName'
]
==
''
){
if
(
$userId
&&
$this
->
user
[
'userName'
]
==
''
){
...
@@ -1123,95 +1019,6 @@ class PkTopAction extends IdentityAction{
...
@@ -1123,95 +1019,6 @@ class PkTopAction extends IdentityAction{
return
$zongupData
;
return
$zongupData
;
}
}
// //检查抽奖资格
// public function checkLucky() {
// $userId = $this->user['userID'];
// if($userId==0){
// $this->ajaxReturn(['status' =>0,'info'=>'请登录后再操作','uid'=>'']);
// }
// //每人每个月只能抽一次奖,改成只能抽一次奖
// $oldDog=M('PktopLuckydog')->where(['user_id'=>$userId,'group_id'=>$this->GID])->order('add_time desc')->find();
//
// if(!empty($oldDog)){
// $this->ajaxReturn(['status' =>2,'info'=>'您已经抽过奖了','uid'=>$userId]);
// }
//
// //检查是否开户
// $kaihuStatus=M('PktopKaihu')->where(['user_id'=>$userId])->find();
// if(empty($kaihuStatus)){
//// $this->ajaxReturn(['status' =>0,'info'=>'您还未开户,不能抽奖,请点击链接开户']);
// $this->ajaxReturn(['status' =>2,'info'=>'请联系管理员获取抽奖机会','uid'=>$userId]);
//
// }
//
// $this->ajaxReturn(['status' =>1,'info'=>'','uid'=>$userId]);
// }
//取奖品
// public function getLucky() {
// $userId = $this->user['userID'];
// $userName = $this->user['userName'];
// if($userId==0){
// $this->ajaxReturn(['status' =>0,'info'=>'请登录后再操作']);
// }
// $prizeList = [
// '1'=>['name'=>'100元奖券','score'=>0],'2'=>['name'=>'500元奖券','score'=>0],
// '3'=>['name'=>'300元奖券','score'=>0],'4'=>['name'=>'35元奖券','score'=>100]
// ];
//
// $arr =[];
// foreach ($prizeList as $key => $val) {
// $arr[$key] = $val['score'];
// }
//
// $prizeId = $this->get_rand($arr);
// $prizeName = $prizeList[$prizeId]['name'];
// $insertData=['user_id'=>$userId,'user_name'=>$userName,'prize'=>$prizeName,'add_time'=>time(),'group_id'=>$this->GID];
// M('PktopLuckydog')->add($insertData);
// $prizeName='恭喜,抽中'.$prizeName.',奖励已打入大赛奖金钱包';
// $this->ajaxReturn(['status' =>1,'info'=>'','name'=>$prizeName,'place'=>$prizeId]);
// }
//生成一个随机数
// function get_rand($proArr) {
// $result = '';
// //概率数组的总概率精度
// $proSum = array_sum($proArr);
// //概率数组循环
// foreach ($proArr as $key => $proCur) {
// $randNum = mt_rand(1, $proSum);
// if ($randNum <= $proCur) {
// $result = $key;
// break;
// } else {
// $proSum -= $proCur;
// }
// }
//// unset ($proArr);
// return $result;
// }
// //这个月剩余的抽奖机会数量
// public function getLeftCjNum() {
// $userId = $this->user['userID'];
//
// $kaihuStatus=M()->db(1,C('DB_CONFIG_DEMO'))->table('cofool_pktop_kaihu')->where(['user_id'=>$userId])->find();
//
// if(empty($kaihuStatus)){
// return 0;
// }
//// $where=['user_id'=>$userId];
// $where=['user_id'=>$userId,'group_id'=>$this->GID];
// $oldDog=M()->db(1,C('DB_CONFIG_DEMO'))->table('cofool_pktop_luckydog')->where($where)->order('add_time desc')->find();
// $tj=!empty($oldDog);
// if($tj){
// return 0;
// }
// return 1;
// }
public
function
dianjiLog
(){
public
function
dianjiLog
(){
$gid
=
$this
->
GID
;
$gid
=
$this
->
GID
;
...
@@ -1466,73 +1273,6 @@ class PkTopAction extends IdentityAction{
...
@@ -1466,73 +1273,6 @@ 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 ));
// }
// }
public
function
setMyData
(){
public
function
setMyData
(){
$userId
=
$this
->
user
[
'userID'
];
$userId
=
$this
->
user
[
'userID'
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment