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
d239a5d3
Commit
d239a5d3
authored
Apr 04, 2023
by
houdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整理vip下面的文件
parent
640f2aa2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
17 deletions
+18
-17
PkTopAction.class.php
app/Lib/Action/Vip/PkTopAction.class.php
+18
-17
No files found.
app/Lib/Action/Vip/PkTopAction.class.php
View file @
d239a5d3
...
...
@@ -81,25 +81,25 @@ class PkTopAction extends IdentityAction{
$msg
=
empty
(
$msg2
)
?
$msg1
:
array_merge
(
$msg2
,
$msg1
);
//pk通关榜,1挑战者胜利,2被挑战者胜利
$allPassUsers
=
M
(
'PktopData'
)
->
field
(
'distinct active_id,active_name'
)
->
where
([
'pk_status'
=>
1
])
->
order
(
'add_time desc'
)
->
select
();
//
$allPassUsers = M('PktopData')->field('distinct active_id,active_name')->where(['pk_status' => 1])->order('add_time desc')->select();
// $passUsers = $this->formatPassUsers($allPassUsers);
//我的未结束的挑战
$where
=
[
'pk_end_time'
=>
[
'egt'
,
date
(
'Y-m-d'
)],
'_complex'
=>
[
'active_id'
=>
$userId
,
'passive_id'
=>
$userId
,
'_logic'
=>
'or'
]];
$myPks
=
M
(
'PktopData'
)
->
where
(
$where
)
->
order
(
'add_time desc'
)
->
select
();
if
(
!
empty
(
$myPks
))
{
$myPk
=
$myPks
[
0
];
$myPk
[
'pk_begin_time'
]
=
date
(
'm月d日'
,
strtotime
(
$myPk
[
'pk_begin_time'
]));
$myPk
[
'pk_end_time'
]
=
date
(
'm月d日'
,
strtotime
(
$myPk
[
'pk_end_time'
]));
}
$myPkUserId
=
[];
foreach
(
$myPks
as
$k
=>
$value
)
{
//取我主动挑战的人
if
(
$value
[
'active_id'
]
==
$userId
)
{
$myPkUserId
[]
=
$value
[
'passive_id'
];
}
}
//
$where = ['pk_end_time' => ['egt', date('Y-m-d')], '_complex' => ['active_id' => $userId, 'passive_id' => $userId, '_logic' => 'or']];
//
//
$myPks = M('PktopData')->where($where)->order('add_time desc')->select();
//
if (!empty($myPks)) {
//
$myPk = $myPks[0];
//
$myPk['pk_begin_time'] = date('m月d日', strtotime($myPk['pk_begin_time']));
//
$myPk['pk_end_time'] = date('m月d日', strtotime($myPk['pk_end_time']));
//
}
//
$myPkUserId = [];
//
foreach ($myPks as $k => $value) {
//
//取我主动挑战的人
//
if ($value['active_id'] == $userId) {
//
$myPkUserId[] = $value['passive_id'];
//
}
//
}
//最新挑战榜,每个月top10,不需要了
// $top10=$this->formatTop10();
...
...
@@ -112,7 +112,8 @@ class PkTopAction extends IdentityAction{
$lastMonth
=
date
(
'Y-m'
,
strtotime
(
date
(
'Y-m-01'
)
.
"-1 month"
));
$lastMonthInt
=
intval
(
date
(
'm'
,
strtotime
(
date
(
'Y-m-01'
)
.
"-1 month"
)));
$mingrentang
=
$this
->
getMingrentangData
(
$myPkUserId
);
// $mingrentang = $this->getMingrentangData($myPkUserId);//应该不用了
$rankNow
=
$this
->
rankNow
(
'local'
);
//弹窗里面的pk时间段
...
...
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