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
f19b9fb3
Commit
f19b9fb3
authored
Apr 07, 2023
by
houdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vip修改
parent
cc363ab1
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
967 additions
and
39 deletions
+967
-39
config.php
app/Conf/config.php
+2
-2
PkTopAction.class.php
app/Lib/Action/Vip/PkTopAction.class.php
+63
-31
bottom.html
app/Tpl/Vip/PkTop/bottom.html
+200
-0
indexNew.html
app/Tpl/Vip/PkTop/indexNew.html
+2
-2
itemWeek.html
app/Tpl/Vip/PkTop/itemWeek.html
+4
-4
phbOther.html
app/Tpl/Vip/PkTop/phbOther.html
+353
-0
phbWeek.html
app/Tpl/Vip/PkTop/phbWeek.html
+343
-0
No files found.
app/Conf/config.php
View file @
f19b9fb3
...
@@ -30,8 +30,8 @@ define('PHP2JY_PW', 'd#!%$38a');
...
@@ -30,8 +30,8 @@ define('PHP2JY_PW', 'd#!%$38a');
//有奖大赛id
//有奖大赛id
define
(
'PRIZE_GROUP'
,
20202
);
define
(
'PRIZE_GROUP'
,
20202
);
define
(
'FINALS_GROUP'
,
20318
);
define
(
'FINALS_GROUP'
,
20318
);
define
(
'PRIZE_GROUP_2021'
,
20320
);
//
define('PRIZE_GROUP_2021',20320);
define
(
'PRIZE_GROUP_2021'
,
24372
);
define
(
'NIUD_ID'
,
23494
);
define
(
'NIUD_ID'
,
23494
);
define
(
'NIUS_ID'
,
23685
);
define
(
'NIUS_ID'
,
23685
);
define
(
'JUJI_ID'
,
22769
);
define
(
'JUJI_ID'
,
22769
);
...
...
app/Lib/Action/Vip/PkTopAction.class.php
View file @
f19b9fb3
...
@@ -1375,18 +1375,18 @@ class PkTopAction extends IdentityAction{
...
@@ -1375,18 +1375,18 @@ class PkTopAction extends IdentityAction{
//大赛排行榜的当前排行页面
//大赛排行榜的当前排行页面
public
function
get
WeekPhb
(
){
public
function
get
Phb
(
$p
,
$pageSize
=
10
,
$order
){
$gid
=
$this
->
GID
;
$gid
=
$this
->
GID
;
$order
=
I
(
'order'
,
'lastmonthup'
);
// $order=I('order','lastweekup');
$p
=
I
(
'p'
,
1
);
// $pageSize=10;
$pageSize
=
10
;
// $pageSize=$gid==$this->GID?10:200;
// $pageSize=$gid==$this->GID?10:200;
//分表归档
//分表归档
$suffix
=
D
(
'Userinfo'
)
->
getTable
(
$gid
);
$suffix
=
D
(
'Userinfo'
)
->
getTable
(
$gid
);
$table
=
$suffix
?
'mncg_archive.userinfo'
.
$suffix
:
'mncg.userinfo'
;
$table
=
$suffix
?
'mncg_archive.userinfo'
.
$suffix
:
'mncg.userinfo'
;
$where
=
[
'sex'
=>
$gid
,
'monthzzl'
=>
[
'gt'
,
0
],
'lastweekup'
=>
[
'gt'
,
0
],
'zt'
=>
1
];
$where
=
[
'sex'
=>
$gid
,
'monthzzl'
=>
[
'gt'
,
0
],
'lastweekup'
=>
[
'gt'
,
0
],
'zt'
=>
1
];
$tDataList
=
M
(
$table
,
" "
,
C
(
'DB_CONFIG_MNCG3'
))
->
where
(
$where
)
->
order
(
$order
.
' desc'
)
->
page
(
$p
.
','
.
$pageSize
)
->
cache
(
true
,
300
)
->
select
();
//->cache(true,300)
// var_dump($gid);exit;
$tDataList
=
M
(
$table
,
" "
,
C
(
'DB_CONFIG_MNCG3'
))
->
field
(
'uid,lastweekup,monthzzl'
)
->
where
(
$where
)
->
order
(
$order
.
' desc'
)
->
page
(
$p
.
','
.
$pageSize
)
->
select
();
// var_dump(M($table, " ", C('DB_CONFIG_MNCG3'))->getLastSql());exit;
$uids
=
[];
$uids
=
[];
foreach
(
$tDataList
as
$key
=>
&
$rankV
)
{
foreach
(
$tDataList
as
$key
=>
&
$rankV
)
{
$userIDs
=
explode
(
"X"
,
$rankV
[
'uid'
]);
$userIDs
=
explode
(
"X"
,
$rankV
[
'uid'
]);
...
@@ -1398,7 +1398,7 @@ class PkTopAction extends IdentityAction{
...
@@ -1398,7 +1398,7 @@ class PkTopAction extends IdentityAction{
foreach
(
$tDataList
as
$key
=>
&
$value
)
{
foreach
(
$tDataList
as
$key
=>
&
$value
)
{
$nick_name
=
$nick_name_arry
[
$value
[
'user_id'
]];
$nick_name
=
$nick_name_arry
[
$value
[
'user_id'
]];
$value
[
'
user_name
'
]
=
$nick_name
;
$value
[
'
nick
'
]
=
$nick_name
;
}
}
//总数目
//总数目
...
@@ -1407,42 +1407,64 @@ class PkTopAction extends IdentityAction{
...
@@ -1407,42 +1407,64 @@ class PkTopAction extends IdentityAction{
}
}
public
function
phb
()
{
public
function
phb
Week
()
{
$p
=
I
(
'p'
,
1
);
$p
=
I
(
'p'
,
1
);
$pageSize
=
10
;
$pageSize
=
5
;
$userId
=
$this
->
user
[
'userID'
];
$userId
=
$this
->
user
[
'userID'
];
//周获奖榜
$phb
=
$this
->
getPhb
(
$p
,
$pageSize
,
'lastweekup'
);
// $maxWeek=M('PktopWeek')->max('week');
$this
->
assign
(
'weekPhb'
,
$phb
[
0
]);
// $weekPhb=M('PktopWeek')->where(['week'=>$maxWeek])->order('lastweekup desc')->page($p.','.$pageSize)->select();
$this
->
assign
(
'weekCount'
,
$phb
[
1
]);
// $uids = array_column('user_id',$weekPhb);
// echo $weekPhb[1];exit;
// $nickArray =getUser($uids,'nick');
$this
->
assign
(
'pages'
,
ceil
(
$phb
[
1
]
/
$pageSize
));
//
// foreach ($weekPhb as $key => &$value) {
// $nickName = $nickArray[$value['user_id']];
// $value['user_name'] = $nickName;
// }
// $this->assign('weekPhb',$weekPhb);
$weekPhb
=
$this
->
getWeekPhb
();
$this
->
assign
(
'weekPhb'
,
$weekPhb
[
0
]);
$this
->
assign
(
'otherPhb'
,
$weekPhb
[
0
]);
//其他排行
$this
->
assign
(
'otherPhb'
,
$phb
[
0
]);
$this
->
assign
(
'p'
,
$p
);
$this
->
assign
(
'gid'
,
$this
->
GID
);
if
(
$p
==
1
){
if
(
$p
==
1
){
//我的排名
//我的排名
$this
->
setMyData
();
$this
->
setMyData
();
$this
->
display
();
$this
->
display
();
}
else
{
}
else
{
$content
=
$this
->
fetch
(
'itemNow'
);
$content
=
$this
->
fetch
(
'itemNew'
);
// $totalCount = M('PktopWeek')->where(['week'=>$maxWeek])->count();
$this
->
ajaxReturn
([
'status'
=>
1
,
'count'
=>
$phb
[
1
],
'data'
=>
$content
]);
$this
->
ajaxReturn
([
'status'
=>
1
,
'count'
=>
$weekPhb
[
1
],
'data'
=>
$content
]);
}
}
}
}
public
function
phbOther
()
{
$p
=
I
(
'p'
,
1
);
$pageSize
=
5
;
$userId
=
$this
->
user
[
'userID'
];
$order
=
I
(
'order'
,
'lastweekup'
);
$phb
=
$this
->
getPhb
(
$p
,
$pageSize
,
$order
);
$this
->
assign
(
'otherPhb'
,
$phb
[
0
]);
$this
->
assign
(
'count'
,
$phb
[
1
]);
// echo $weekPhb[1];exit;
$this
->
assign
(
'pages'
,
ceil
(
$phb
[
1
]
/
$pageSize
));
//其他排行
$this
->
assign
(
'otherPhb'
,
$phb
[
0
]);
$this
->
assign
(
'p'
,
$p
);
$this
->
assign
(
'gid'
,
$this
->
GID
);
if
(
$p
==
1
){
//我的排名
$this
->
setMyData
();
$this
->
display
();
}
else
{
$content
=
$this
->
fetch
(
'itemOther'
);
$this
->
ajaxReturn
([
'status'
=>
1
,
'count'
=>
$phb
[
1
],
'data'
=>
$content
]);
}
}
//其他排行榜
//其他排行榜
public
function
getOtherPhb
(){
public
function
getOtherPhb
(){
$gid
=
$this
->
GID
;
$gid
=
$this
->
GID
;
...
@@ -1514,9 +1536,19 @@ class PkTopAction extends IdentityAction{
...
@@ -1514,9 +1536,19 @@ class PkTopAction extends IdentityAction{
public
function
setMyData
(){
public
function
setMyData
(){
$userId
=
$this
->
user
[
'userID'
];
$userId
=
$this
->
user
[
'userID'
];
if
(
$userId
){
if
(
$userId
){
$myData
=
M
(
"userinfo"
,
" "
,
C
(
'DB_CONFIG_MNCG3'
))
->
where
([
'uid'
=>
$this
->
GID
.
'X'
.
$userId
])
->
cache
(
true
,
300
)
->
find
();
$tid
=
$this
->
GID
.
'X'
.
$userId
;
$myData
[
'userName'
]
=
$this
->
user
[
'userName'
];
$myData
=
M
(
"userinfo"
,
" "
,
C
(
'DB_CONFIG_MNCG3'
))
->
where
([
'uid'
=>
$tid
])
->
cache
(
true
,
300
)
->
find
();
$myData
[
'userId'
]
=
$userId
;
if
(
!
empty
(
$myData
)){
$myData
[
'userName'
]
=
$this
->
user
[
'userName'
];
$myData
[
'userId'
]
=
$userId
;
$weekData
=
M
(
"userinfo"
,
" "
,
C
(
'DB_CONFIG_MNCG3'
))
->
where
([
'sex'
=>
$this
->
GID
,
'new_phb'
=>
[
'gt'
,
0
],
'zt'
=>
1
])
->
order
(
'lastweekup desc'
)
->
cache
(
true
,
300
)
->
select
();
foreach
(
$weekData
as
$k
=>
$v
)
{
if
(
$v
[
'uid'
]
==
$tid
){
$myData
[
'phb'
]
=
$k
+
1
;
}
}
}
$this
->
assign
(
'myData'
,
$myData
);
$this
->
assign
(
'myData'
,
$myData
);
}
}
...
...
app/Tpl/Vip/PkTop/bottom.html
0 → 100644
View file @
f19b9fb3
<eq
name=
"hideShiPan"
value=
"0"
>
<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=
"showMoreDs"
>
<img
class=
"icon"
src=
"__PUBLIC__/Home/images/g2020/ds-icon-b.png"
/>
更多大赛
<img
class=
"gdjj"
src=
"__PUBLIC__/Home/images/g2020/gdjj.png"
/>
</div>
<eq
name=
"joinStatus"
value=
"1"
>
<div
class=
"bottom-j-right goTradeBtn"
style=
"width: initial;float: none;"
>
进入交易
<img
class=
"icon"
src=
"__PUBLIC__/Home/images/g2020/cs-icon-b.png"
/></div>
<else/>
<div
class=
"bottom-j-right baoming"
style=
"width: initial;float: none;"
targetUrl=
""
>
报名参加
<img
class=
"icon"
src=
"__PUBLIC__/Home/images/g2020/cs-icon-b.png"
/>
</div>
</eq>
</div>
</eq>
<div
class=
"foot-fix"
>
</div>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/jweixin-1.0.0.js"
></script>
<script>
//调用app分享
AppBridge
.
app_share
(
'{$appParam}'
);
AppBridge
.
foot_fit
();
//进入页面的时候取userId
var
u
=
navigator
.
userAgent
,
app
=
navigator
.
appVersion
;
var
isAndroid
=
u
.
indexOf
(
'Android'
)
>
-
1
||
u
.
indexOf
(
'Linux'
)
>
-
1
;
var
isiOS
=
!!
u
.
match
(
/
\(
i
[^
;
]
+;
(
U;
)?
CPU.+Mac OS X/
);
userId
=
0
;
//1苹果app,2安卓app,3苹果浏览器,4安卓手机的浏览器,5微信
var
mfrom
=
isAPP
();
var
appShareInfo
=
'{$appShareInfo}'
;
//滑动加载数据时用
var
lastPage
=
0
;
var
loading
=
false
;
var
order
=
'lastmonthup'
;
function
timer
(
opj
){
$
(
opj
).
find
(
'ul'
).
animate
({
marginTop
:
"-28px"
},
500
,
function
(){
$
(
this
).
css
({
marginTop
:
""
}).
find
(
"li:first"
).
appendTo
(
this
);
})
}
$
(
function
(){
//app低版本隐藏h5导航
if
(
mfrom
[
0
]
>
0
){
if
(
mfrom
[
0
]
==
2
&&
mfrom
[
1
]
<
350
){
$
(
'.header-top'
).
hide
();
$
(
'.head-fit'
).
hide
();
}
else
{
if
(
mfrom
[
0
]
==
1
){
AppBridge
.
getVersion
({},
function
(
responseData
){
// alert(responseData);
if
(
responseData
<
'iOS3.5.0'
){
$
(
'.header-top'
).
hide
();
$
(
'.head-fit'
).
hide
();
}
})
}
}
}
AppBridge
.
webShareShow
(
appShareInfo
);
//一级一级返回1,隐藏导航栏2,一次性返回3
AppBridge
.
goBackStepOneOrMore
(
1
);
sendSmsAndSubmit
();
// 点报名按钮
$
(
".baoming,.sscs"
).
click
(
function
()
{
$
(
'#baomingPOP'
).
attr
(
'targetUrl'
,
$
(
this
).
attr
(
'targetUrl'
));
// alert(mfrom);
// if($(".join-btn").html()=='进入交易'){
// console.log('1点击进入交易按钮');
// $(".goTradeBtn").click();
// }else{
if
(
mfrom
[
1
]
>
0
){
checkLoginAndDo
(
mfrom
[
0
],
'{$user.userID}'
,
1
);
}
else
{
// animPop('#baomingPOP');
if
(
'{$user.userID}'
==
''
){
animPop
(
'#baomingPOP'
);
}
else
{
$
.
post
(
"/PkTop/join"
,{},
function
(
data
){
if
(
data
.
status
==
0
){
//已经参加过该大赛
if
(
data
.
flag
==
1
){
layer
.
open
({
content
:
data
.
info
,
skin
:
'msg'
,
time
:
2
,
end
:
function
()
{
var
href
=
location
.
href
;
console
.
log
(
'当前页面url:'
+
href
);
window
.
location
.
reload
();
}});
}
else
{
//可能有各种错误提示
layer
.
open
({
content
:
data
.
info
,
skin
:
'msg'
,
time
:
2
,
end
:
function
()
{
//window.location.reload();
}});
}
return
false
;
}
else
{
// animPop('#baomingPOP');
animPop
(
'#popPkTopSucc'
);
}
});
}
}
// }
});
//进入交易
$
(
".goTradeBtn,.pk-cont-info"
).
click
(
function
()
{
console
.
log
(
'2点击进入交易按钮'
+
mfrom
[
0
]);
if
(
mfrom
[
1
]
>
0
){
if
(
$
(
'#groupStatus'
).
val
()
==
1
){
layer
.
open
({
content
:
'当前大赛未开始'
,
skin
:
'msg'
,
time
:
2
});
}
var
appParam
=
$
(
'#groupInfo'
).
val
();
appParam
=
appParam
.
replace
(
/XXXXXX/g
,
userId
);
AppBridge
.
refreshMyGroup
();
AppBridge
.
goTrade
(
appParam
);
}
else
{
// location.href='/mncg.html';
// location.href='/Trade/trading?group_id={$gInfo.group_id}';
location
.
href
=
'http://app.jiantou8.com/jiantou.html'
;
}
});
//点击底部的更多大赛
$
(
'.showMoreDs'
).
click
(
function
(){
// $('.en-li').eq(3).click();
location
.
href
=
'{:M_URL}/Match/jiang'
;
})
$
(
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
();
});
//点用户名和头像跳转到该大赛的旧的交易页
flag
=
0
;
$
(
'.goTrade21'
).
click
(
function
(){
if
(
flag
==
1
)
return
;
flag
=
1
;
$
.
post
(
"/PkTop/getGoTradeInfo"
,
{
'userId'
:
$
(
this
).
attr
(
'pId'
),
'userName'
:
$
(
this
).
attr
(
'pName'
)},
function
(
res
)
{
if
(
res
.
status
==
1
)
{
flag
=
0
;
if
(
mfrom
[
1
]
>
0
){
AppBridge
.
refreshMyGroup
();
AppBridge
.
goTrade
(
res
.
data
)
}
}
});
});
});
</script>
</html>
<!--userId:{$user.userID}-userName:{$user.userName}-gid:{$gid}-->
\ No newline at end of file
app/Tpl/Vip/PkTop/indexNew.html
View file @
f19b9fb3
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
<div
class=
"head-r-num"
>
<div
class=
"head-r-num"
>
<span
class=
"user-head"
pId__=
"{$vo.user_id}"
pName__=
"{$vo.user_name}"
>
<span
class=
"user-head"
pId__=
"{$vo.user_id}"
pName__=
"{$vo.user_name}"
>
<img
src=
"{:getPortraitPath($
vo['user_i
d'], 'small', true)}"
alt=
""
>
<img
src=
"{:getPortraitPath($
myData['userI
d'], 'small', true)}"
alt=
""
>
</span>
</span>
<span
class=
"head-r-t"
pId__=
"{$myData.user_id}"
pName=
"{$myData.userName}"
>
{$myData.userName}
</span>
<span
class=
"head-r-t"
pId__=
"{$myData.user_id}"
pName=
"{$myData.userName}"
>
{$myData.userName}
</span>
</div>
</div>
...
@@ -479,7 +479,7 @@
...
@@ -479,7 +479,7 @@
return
;
return
;
}
}
if
(
i
==
2
){
if
(
i
==
2
){
location
.
href
=
'/
Vip/PkTop/awardList
'
;
location
.
href
=
'/
PkTop/phbWeek
'
;
return
;
return
;
}
}
$
(
this
).
siblings
().
removeClass
(
'active'
);
$
(
this
).
siblings
().
removeClass
(
'active'
);
...
...
app/Tpl/Vip/PkTop/itemWeek.html
View file @
f19b9fb3
...
@@ -15,14 +15,14 @@
...
@@ -15,14 +15,14 @@
<span
class=
"user-head"
pId=
"{$vo.user_id}"
pName=
"{$vo.user_name}"
>
<span
class=
"user-head"
pId=
"{$vo.user_id}"
pName=
"{$vo.user_name}"
>
<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.
user_name}股神03-07
</span>
<span
class=
"head-r-t"
pId=
"{$vo.user_id}"
pName=
"{$vo.user_name}"
>
{$vo.
nick}
</span>
</div>
</div>
<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;"
>
第
1
名
</td>
<td
class=
"num red"
style=
"text-align: left;"
>
第
{$key+($p-1)*10+1}
名
</td>
<td
class=
"num red"
>
19.15
%
</td>
<td
class=
"num red"
>
{$vo.lastweekup}
%
</td>
<td
class=
"num"
style=
"text-align: right;"
>
0
%
</td>
<td
class=
"num"
style=
"text-align: right;"
>
{$vo.monthzzl}
%
</td>
</tr>
</tr>
<tr
class=
"data-title"
>
<tr
class=
"data-title"
>
<td
class=
"title"
style=
"text-align: left;"
>
周排行
</td>
<td
class=
"title"
style=
"text-align: left;"
>
周排行
</td>
...
...
app/Tpl/Vip/PkTop/phb.html
→
app/Tpl/Vip/PkTop/phb
Other
.html
View file @
f19b9fb3
This diff is collapsed.
Click to expand it.
app/Tpl/Vip/PkTop/phbWeek.html
0 → 100644
View file @
f19b9fb3
This diff is collapsed.
Click to expand it.
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