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
cf43bed6
Commit
cf43bed6
authored
Dec 16, 2022
by
houdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
改更多大赛排序
parent
81dd9828
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
NiuModel.class.php
app/Lib/Model/NiuModel.class.php
+4
-4
No files found.
app/Lib/Model/NiuModel.class.php
View file @
cf43bed6
...
...
@@ -15,7 +15,7 @@ class NiuModel extends Model{
$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'
)
->
field
(
'a.group_id,a.name,startTime,endTime,b.cover,introduction,a.web_id
'
)
->
where
(
$where
)
->
select
();
->
field
(
'a.group_id,a.name,startTime,endTime,b.cover,introduction,a.web_id
,sort_number'
)
->
where
(
$where
)
->
order
(
'sort_number desc'
)
->
select
();
// var_dump($gList);exit;
foreach
(
$gList
as
$k
=>
&
$g
)
{
...
...
@@ -24,7 +24,7 @@ class NiuModel extends Model{
$g
[
'joinStatus'
]
=
in_array
(
$gid
,
$ids
)
?
1
:
0
;
$gUrl
=
$MAP
[
$gid
];
$g
[
'url'
]
=
$gUrl
[
0
];
$g
[
'order'
]
=
$gUrl
[
1
];
//
$g['order']=$gUrl[1];
$len
=
$source
==
'm'
?
40
:
60
;
$g
[
'introduction'
]
=
strip_tags
(
$g
[
'introduction'
]);
...
...
@@ -47,8 +47,8 @@ class NiuModel extends Model{
$g
[
"gotoTrade"
]
=
json_encode
(
$gotoTrade
);
}
$order
=
array_column
(
$gList
,
'
ord
er'
);
array_multisort
(
$order
,
SORT_
A
SC
,
$gList
);
$order
=
array_column
(
$gList
,
'
sort_numb
er'
);
array_multisort
(
$order
,
SORT_
DE
SC
,
$gList
);
return
$gList
;
}
...
...
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