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
e7fb2ccd
Commit
e7fb2ccd
authored
Apr 04, 2023
by
houdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整理vip下面的文件
parent
e9387208
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
146 additions
and
0 deletions
+146
-0
PkTopAction.class.php
app/Lib/Action/Vip/PkTopAction.class.php
+146
-0
No files found.
app/Lib/Action/Vip/PkTopAction.class.php
View file @
e7fb2ccd
...
@@ -1225,6 +1225,152 @@ class PkTopAction extends IdentityAction{
...
@@ -1225,6 +1225,152 @@ class PkTopAction extends IdentityAction{
$this
->
ajaxReturn
([
'status'
=>
1
,
'debug'
=>
'用户id:'
.
$userId
.
',旧数据条数'
.
$count
]);
$this
->
ajaxReturn
([
'status'
=>
1
,
'debug'
=>
'用户id:'
.
$userId
.
',旧数据条数'
.
$count
]);
}
}
//新首页
public
function
indexNew
()
{
//首页的排行榜等切换
if
(
!
I
(
'viewPage'
)){
header
(
'location:'
.
M_URL
.
'/Match/jiang'
);
exit
;
}
$userIdParam
=
I
(
'user_id'
,
''
,
intval
);
$isapp
=
I
(
'isapp'
);
if
(
$isapp
)
{
$userId
=
substr
(
$isapp
,
strpos
(
$isapp
,
'='
)
+
1
);
if
(
$userId
)
{
$userIdParam
=
$userId
;
}
}
$key
=
I
(
'key'
,
''
);
$key2
=
I
(
'key2'
,
''
);
if
(
$userIdParam
==
''
)
{
if
(
$this
->
user
[
'userID'
]
==
''
)
{
//有了第二次请求,不再请求第三次
if
(
$key2
==
''
)
{
$this
->
assign
(
'refresh'
,
1
);
$this
->
assign
(
'viewPage'
,
I
(
'viewPage'
,
'1'
));
}
}
else
{
$userId
=
$this
->
user
[
'userID'
];
}
}
else
{
//第二次请求
if
(
md5
(
$userIdParam
.
'abcd4321'
)
==
$key2
||
md5
(
'user_id='
.
$userIdParam
.
'abcd4321'
)
==
$key
)
{
$userId
=
$userIdParam
;
}
}
//echo $userId;exit;
//app从过来可能没有userName
if
(
$userId
&&
$this
->
user
[
'userName'
]
==
''
)
{
$this
->
setUcLogin
(
$userId
);
}
$gid
=
$this
->
GID
;
$groupId
=
I
(
'groupId'
,
$gid
);
$groupInfo
=
M
(
'Group'
)
->
field
(
'group_id,web_id,category,name,startTime,endTime,member_quantity'
)
->
where
([
'group_id'
=>
$groupId
])
->
find
();
$groupStatus
=
$this
->
getGroupStatus
(
$groupInfo
);
$member_quantity
=
$groupInfo
[
'member_quantity'
];
//用到
$ids
=
D
(
'Group'
)
->
getGroupCache
(
$userId
);
if
(
in_array
(
$groupId
,
$ids
))
{
$this
->
assign
(
'joinStatus'
,
1
);
}
//滚动消息,1pk付款,2发起pk,3pk胜利,4pk失败,5胜利退钱,6失败钱归passive,7买重置卡
$msg1
=
M
(
'PktopNews'
)
->
where
([
'type'
=>
[
'in'
,
'2'
]])
->
order
(
'add_time desc'
)
->
limit
(
5
)
->
select
();
$msg2
=
M
(
'PktopNews'
)
->
where
([
'type'
=>
[
'in'
,
'3'
]])
->
order
(
'add_time desc'
)
->
limit
(
5
)
->
select
();
$msg
=
empty
(
$msg2
)
?
$msg1
:
array_merge
(
$msg2
,
$msg1
);
$lastMonth
=
date
(
'Y-m'
,
strtotime
(
date
(
'Y-m-01'
)
.
"-1 month"
));
$lastMonthInt
=
intval
(
date
(
'm'
,
strtotime
(
date
(
'Y-m-01'
)
.
"-1 month"
)));
$rankNow
=
$this
->
rankNow
(
'local'
);
//弹窗里面的pk时间段
$pkTime
=
date
(
'n月j日'
,
strtotime
(
'next Monday'
))
.
'-'
.
date
(
'n月j日'
,
strtotime
(
'next Monday'
)
+
4
*
3600
*
24
);
$gonggao
=
$this
->
getGonggao
();
//获奖心得
$where
=
[
'think'
=>
[
'exp'
,
'is not null and think != ""'
]];
$thinks
=
M
(
'PktopUserphb'
)
->
where
(
$where
)
->
order
(
'month desc'
)
->
limit
(
10
)
->
select
();
$popData
=
null
;
//第一个页面显示的数据,公告,心得等
$firstPageData
=
[
'popType'
=>
$popData
[
'popType'
],
'popPkUserName'
=>
$popData
[
'popPkUserName'
],
'thinks'
=>
$thinks
,
'gonggao'
=>
$gonggao
];
$return
=
[
'msg'
=>
$msg
,
'top10'
=>
$top10
,
'lastMonthInt'
=>
$lastMonthInt
,
'myAllPkCount'
=>
$myAllPkCount
];
$this
->
assign
(
$firstPageData
);
$this
->
assign
(
$mingrentang
);
$this
->
assign
(
$rankNow
);
$this
->
assign
(
$return
);
//总决赛列表
$_GET
[
'order'
]
=
'zongup'
;
$share
=
array
(
'groupId'
=>
$groupId
,
'groupStatus'
=>
$groupStatus
,
'viewPage'
=>
2
,
'statusInt'
=>
$groupStatus
,
'close_tips'
=>
''
,
'userID'
=>
$userId
,
'zhuangtai'
=>
$this
->
STATUS_TXT
[
$groupStatus
]);
$groupInfo
=
array_merge
(
$groupInfo
,
$share
);
$this
->
assign
(
'groupInfo'
,
json_encode
(
$groupInfo
));
$this
->
setShare
(
$userId
,
I
(
'cfrom'
));
//朋友圈,微信群,好友分享,分享后自己的id,作为邀请人的id,pc扫码后没有from参数
$inviterId
=
I
(
'inviterId'
,
''
);
if
(
in_array
(
I
(
'from'
),
array
(
'timeline'
,
'groupmessage'
,
'singlemessage'
)))
{
if
(
$inviterId
==
''
)
{
$inviterId
=
I
(
'user_id'
,
''
,
intval
);
if
(
$inviterId
==
''
)
{
$isapp
=
I
(
'isapp'
,
''
);
$inviterId
=
substr
(
$isapp
,
strpos
(
$isapp
,
'='
)
+
1
);
}
}
}
$this
->
assign
(
'inviterId'
,
$inviterId
);
if
(
I
(
'cfrom'
))
{
$referer
=
I
(
'cfrom'
);
}
elseif
(
I
(
'hFrom'
))
{
$referer
=
I
(
'hFrom'
);
}
elseif
(
I
(
'from'
))
{
$referer
=
I
(
'from'
);
}
else
{
$referer
=
$_SERVER
[
'HTTP_REFERER'
];
}
// //这个月剩余的抽奖机会
// $leftCjNum = $this->getLeftCjNum();
// $this->assign('leftCjNum', $leftCjNum);
//大赛状态
$gInfo
[
'gStatus'
]
=
is_end
(
$groupInfo
[
'endTime'
])
?
'3'
:
(
$groupInfo
[
'startTime'
]
>
time
()
?
'1'
:
'2'
);
$this
->
assign
(
'gInfo'
,
$gInfo
);
$this
->
assign
(
'referer'
,
$referer
);
$this
->
assign
(
'member_quantity'
,
$member_quantity
);
$this
->
assign
(
'p'
,
1
);
//取微信
$weixin
=
M
(
'GroupInfo'
)
->
where
([
'group_id'
=>
$groupId
])
->
getField
(
'wechat'
);
$this
->
assign
(
'weixin'
,
$weixin
);
$this
->
assign
(
'weixinUrl'
,
'https://eturl.cn/Rhq2wA?is_head=1'
);
$this
->
assign
(
'gid'
,
$gid
);
$this
->
display
();
}
public
function
choujiang
()
{
//这个月剩余的抽奖机会
$leftCjNum
=
$this
->
getLeftCjNum
();
$this
->
assign
(
'leftCjNum'
,
$leftCjNum
);
$this
->
display
();
}
public
function
phb
()
{
public
function
phb
()
{
$p
=
I
(
'p'
,
1
);
$p
=
I
(
'p'
,
1
);
$pageSize
=
10
;
$pageSize
=
10
;
...
...
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