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
fd9f29e0
Commit
fd9f29e0
authored
Nov 21, 2022
by
houdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更多大赛
parent
d8268e8a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
12 deletions
+18
-12
NiuModel.class.php
app/Lib/Model/NiuModel.class.php
+13
-9
moreDs.html
app/Tpl/Vip/PkTop/moreDs.html
+5
-3
No files found.
app/Lib/Model/NiuModel.class.php
View file @
fd9f29e0
...
...
@@ -5,14 +5,15 @@ class NiuModel extends Model{
public
function
getMoreDs
(
$userId
,
$source
=
'm'
)
{
$STATUS_TXT
=
array
(
'1'
=>
'未开赛'
,
'2'
=>
'进行中'
,
'3'
=>
'已结束'
);
$ids
=
D
(
'Group'
)
->
getGroupCache
(
$userId
);
$MAP
=
[
NIU_BAI_ID
=>
M_URL
.
'/Niubai'
,
NIU_SAN_ID
=>
M_URL
.
'/Niusan'
,
NIU_STRONG_ID
=>
M_URL
.
'/Strong'
,
M2M_GROUP
=>
M_URL
.
'/M2m'
];
if
(
$source
==
'm'
){
$MAP
[
PRIZE_GROUP_2021
]
=
'/PkTop'
;
$MAP
[
ZHONGJIN_GROUP
]
=
M_URL
.
'/Zjds'
;
}
else
{
$MAP
[
PRIZE_GROUP_2021
]
=
'/'
;
$MAP
[
ZHONGJIN_GROUP
]
=
WWW_URL
.
'/Zjds'
;
}
// $MAP=[NIU_BAI_ID=>M_URL.'/Niubai',NIU_SAN_ID=>M_URL.'/Niusan',NIU_STRONG_ID=>M_URL.'/Strong',M2M_GROUP=>M_URL.'/M2m'];
// if($source=='m'){
// $MAP[PRIZE_GROUP_2021]='/PkTop';
// $MAP[ZHONGJIN_GROUP]=M_URL.'/Zjds';
// }else{
// $MAP[PRIZE_GROUP_2021]='/';
// $MAP[ZHONGJIN_GROUP]=WWW_URL.'/Zjds';
// }
$MAP
=
[
ZHONGJIN_GROUP
=>
1
,
PRIZE_GROUP_2021
=>
2
,
M2M_GROUP
=>
3
,
NIU_BAI_ID
=>
4
,
NIU_SAN_ID
=>
5
,
NIU_STRONG_ID
=>
6
];
$where
=
[
'a.group_id'
=>
[
'in'
,
array_keys
(
$MAP
)]];
$gList
=
M
(
'Group a'
)
->
join
(
'left join cofool_group_info b on a.group_id=b.group_id'
)
...
...
@@ -23,7 +24,8 @@ class NiuModel extends Model{
$gid
=
$g
[
'group_id'
];
$g
[
'active'
]
=
$gid
==
PRIZE_GROUP_2021
?
1
:
0
;
$g
[
'joinStatus'
]
=
in_array
(
$gid
,
$ids
)
?
1
:
0
;
$g
[
'url'
]
=
$MAP
[
$gid
];
// $g['url']=$MAP[$gid];
$g
[
'order'
]
=
$MAP
[
$gid
];
$len
=
$source
==
'm'
?
40
:
60
;
if
(
mb_strlen
(
$g
[
'introduction'
])
>
$len
){
$g
[
'introduction'
]
=
msubstr
(
$g
[
'introduction'
],
0
,
$len
,
'utf-8'
)
.
'...'
;
...
...
@@ -41,6 +43,8 @@ class NiuModel extends Model{
$g
[
"gotoTrade"
]
=
json_encode
(
$gotoTrade
);
}
$order
=
array_column
(
$gList
,
'order'
);
array_multisort
(
$order
,
SORT_ASC
,
$gList
);
return
$gList
;
}
...
...
app/Tpl/Vip/PkTop/moreDs.html
View file @
fd9f29e0
...
...
@@ -9,8 +9,10 @@
<div
class=
"item-block"
>
<div
class=
"ds-img"
><img
src=
"{$vo.cover}"
alt=
""
></div>
<div
class=
"ds-right-info"
>
<a
href=
"{$vo.url}"
class=
"info-title"
target=
"_blank"
><img
class=
"gf-icon"
src=
"__PUBLIC__/Home/images/g2020/gf-icon.png"
alt=
""
>
{$vo.name}
<img
class=
"jiang"
src=
"__PUBLIC__/Home/images/g2020/jiang-icon.png"
alt=
""
></a>
<a
href=
"{:M_URL}{:U('/Match/detail',['id'=>$vo['group_id']])}"
class=
"info-title"
>
<img
class=
"gf-icon"
src=
"__PUBLIC__/Home/images/g2020/gf-icon.png"
alt=
""
>
{$vo.name}
<img
class=
"jiang"
src=
"__PUBLIC__/Home/images/g2020/jiang-icon.png"
alt=
""
>
</a>
<div
class=
"ds-des"
>
{$vo.introduction}
</div>
</div>
</div>
...
...
@@ -20,7 +22,7 @@
<a
href=
"javascript:;"
class=
"join-btn gotoTrade"
gotoTrade=
"{$vo.gotoTrade}"
>
<img
src=
"__PUBLIC__/Home/images/g2020/cs-left.png"
alt=
""
><span>
进入交易
</span>
</a>
<else/>
<else/>
<if
condition=
"$gid__ eq $vo['group_id']"
>
<a
href=
"javascript:;"
class=
"join-btn baoming"
><img
src=
"__PUBLIC__/Home/images/g2020/cs-left.png"
alt=
""
><span>
报名参赛
</span></a>
<else/>
...
...
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