切换导航条
此项目
正在载入...
登录
景龙
/
xingqiu
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
景龙
6 years ago
提交
0ce249f1e5be31dda4d5ac5efec5cd64ad9f5496
1 个父辈
966e2a07
1 个管道 的构建
通过
耗费 0 秒
修改独角星球首页弹窗和更多视频列表限制
变更
2
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
9 行增加
和
4 行删除
app/portal/controller/IndexController.php
app/portal/controller/StarController.php
app/portal/controller/IndexController.php
查看文件 @
0ce249f
...
...
@@ -99,7 +99,7 @@ class IndexController extends HomeBaseController
$position
=
CityCategoryModel
::
xqyy
;
$city_id
=
CityCategoryModel
::
djxq
;
$field
=
'id,more,thumbnail'
;
$res_djxq
=
$this
->
getVideo
(
$position
,
$city_id
,
$field
,
1
);
$res_djxq
=
$this
->
getVideo
(
$position
,
$city_id
,
$field
,
1
,
1
);
foreach
(
$res_djxq
as
&
$value
){
$video
=
json_decode
(
$value
[
'more'
],
true
);
$value
[
'video'
]
=
$video
[
'video'
];
...
...
@@ -234,7 +234,7 @@ class IndexController extends HomeBaseController
}
//获取推荐视频
public
function
getVideo
(
$position
,
$city_id
,
$field
,
$limit
=
''
){
public
function
getVideo
(
$position
,
$city_id
,
$field
,
$limit
=
''
,
$extension
=
''
){
$pre
=
CityCategoryModel
::
pre
;
$limit
=
empty
(
$limit
)
?
0
:
$limit
;
$post_id
=
Db
::
table
(
$pre
.
'portal_category_post'
)
...
...
@@ -244,9 +244,14 @@ class IndexController extends HomeBaseController
->
toArray
();
$post_id
=
array_column
(
$post_id
,
'post_id'
);
//查询文章
if
(
!
empty
(
$extension
)){
$where
=
[
'city_id'
=>
$city_id
,
'is_show'
=>
1
];
}
else
{
$where
=
[
'city_id'
=>
$city_id
];
}
$res
=
Db
::
table
(
$pre
.
'portal_post'
)
->
whereIn
(
'id'
,
$post_id
)
->
where
(
'city_id'
,
$city_id
)
->
where
(
$where
)
->
where
(
'delete_time'
,
0
)
->
field
(
$field
)
->
limit
(
$limit
)
...
...
app/portal/controller/StarController.php
查看文件 @
0ce249f
...
...
@@ -134,7 +134,7 @@ class StarController extends HomeBaseController
$pre
=
CityCategoryModel
::
pre
;
$limit
=
empty
(
$limit
)
?
$this
->
more_limit
:
$limit
;
if
(
$limit
==
-
1
){
$limit
=
0
;
$limit
=
150
0
;
}
$post_id
=
Db
::
table
(
$pre
.
'portal_category_post'
)
->
whereIn
(
'category_id'
,
$position
[
'category_id'
])
...
...
请
注册
或
登录
后发表评论