切换导航条
此项目
正在载入...
登录
景龙
/
xingqiu
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
景龙
6 years ago
提交
f429150f499e99b43e48f6fd6c1f0bd2dda032e4
1 个父辈
199816f9
1 个管道 的构建
通过
耗费 1 秒
增加星球奇境,星域秀场详情页数据的调用
变更
7
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
7 个修改的文件
包含
141 行增加
和
26 行删除
app/portal/controller/AdminRegionNoteController.php
app/portal/controller/RegionController.php
app/portal/controller/StarController.php
app/portal/validate/AdminRegionNoteValidate.php
public/themes/admin_simpleboot3/portal/admin_region_note/add.html
public/themes/admin_simpleboot3/portal/admin_region_note/edit.html
public/themes/admin_simpleboot3/portal/admin_region_note/index.html
app/portal/controller/AdminRegionNoteController.php
查看文件 @
f429150
...
...
@@ -42,7 +42,7 @@ class AdminRegionNoteController extends AdminBaseController
$categoryTree
=
$portalCategoryModel
->
adminCategoryTree
(
$categoryId
);
$this
->
assign
(
'start_time'
,
isset
(
$param
[
'start_time'
])
?
$param
[
'start_time'
]
:
''
);
$this
->
assign
(
'end_time'
,
isset
(
$param
[
'end_time'
])
?
$param
[
'end_time'
]
:
''
);
$this
->
assign
(
'
post_title'
,
isset
(
$param
[
'post_title'
])
?
$param
[
'post_titl
e'
]
:
''
);
$this
->
assign
(
'
full_name'
,
isset
(
$param
[
'full_name'
])
?
$param
[
'full_nam
e'
]
:
''
);
$this
->
assign
(
'articles'
,
$articles
);
$this
->
assign
(
'category_tree'
,
$categoryTree
);
$this
->
assign
(
'category'
,
$categoryId
);
...
...
app/portal/controller/RegionController.php
查看文件 @
f429150
...
...
@@ -63,11 +63,7 @@ class RegionController extends HomeBaseController
$res_djrz
=
$this
->
getChildArticle
(
$position
,
$field
,
3
);
foreach
(
$res_djrz
as
&
$value
){
$more
=
json_decode
(
$value
[
'more'
],
true
);
if
(
isset
(
$more
[
'photos'
])
&&
!
empty
(
$more
[
'photos'
])){
$value
[
'thumbnail'
]
=
$more
[
'photos'
][
0
][
'url'
];
}
else
{
$value
[
'thumbnail'
]
=
''
;
}
$value
[
'thumbnail'
]
=
isset
(
$more
[
'photos'
])
&&
!
empty
(
$more
[
'photos'
])
?
$more
[
'photos'
][
0
][
'url'
]
:
''
;
}
$this
->
assign
(
'res_djrz'
,
$res_djrz
);
...
...
@@ -159,6 +155,15 @@ class RegionController extends HomeBaseController
$this
->
assign
(
'res'
,
$res
);
}
//明星访谈详情
public
function
getStarDetail
(){
$id
=
$this
->
request
->
param
(
'id'
,
0
,
'intval'
);
$field
=
'id,thumbnail avatar,full_name,position,trade,post_excerpt,create_time,post_content'
;
$starModel
=
new
StarController
();
$res
=
$starModel
->
getDetail
(
$id
,
$field
);
$this
->
assign
(
'res'
,
$res
);
}
//星球故事更多
public
function
getMoreStory
(){
$page
=
$this
->
request
->
param
(
'page'
,
1
,
'intval'
);
...
...
@@ -189,4 +194,35 @@ class RegionController extends HomeBaseController
$res
=
$this
->
getChildArticlePage
(
$position
,
$field
,
$page
,
6
);
$this
->
assign
(
'res'
,
$res
);
}
//独角快报详情
public
function
getNewsDetail
(){
$id
=
$this
->
request
->
param
(
'id'
,
0
,
'intval'
);
$field
=
'id,thumbnail,post_title,post_excerpt,create_time,post_content'
;
$starModel
=
new
StarController
();
$res
=
$starModel
->
getDetail
(
$id
,
$field
);
$this
->
assign
(
'res'
,
$res
);
}
//独角日志详情
public
function
getNoteDetail
(){
$id
=
$this
->
request
->
param
(
'id'
,
0
,
'intval'
);
$field
=
'id,thumbnail avatar,full_name,post_excerpt,create_time,post_content'
;
$starModel
=
new
StarController
();
$res
=
$starModel
->
getDetail
(
$id
,
$field
);
$this
->
assign
(
'res'
,
$res
);
}
//童趣未来详情
public
function
getFutureDetail
(){
$id
=
$this
->
request
->
param
(
'id'
,
0
,
'intval'
);
$field
=
'id,thumbnail,post_title,post_excerpt,create_time,post_content,more'
;
$starModel
=
new
StarController
();
$res
=
$starModel
->
getDetail
(
$id
,
$field
);
if
(
$res
){
$more
=
json_decode
(
$res
[
'more'
],
true
);
$res
[
'image_url'
]
=
isset
(
$more
[
'photos'
])
&&
!
empty
(
$more
[
'photos'
])
?
$more
[
'photos'
][
0
][
'url'
]
:
''
;
}
$this
->
assign
(
'res'
,
$res
);
}
}
...
...
app/portal/controller/StarController.php
查看文件 @
f429150
...
...
@@ -27,8 +27,10 @@ class StarController extends HomeBaseController
$field
=
'id,thumbnail,post_excerpt,more'
;
$res_xqgs
=
$this
->
getChildArticle
(
$position
,
$field
,
1
);
foreach
(
$res_xqgs
as
&
$value
){
$video
=
json_decode
(
$value
[
'more'
],
true
);
$value
[
'audio'
]
=
$video
[
'audio'
];
$more
=
json_decode
(
$value
[
'more'
],
true
);
if
(
isset
(
$more
[
'audio'
])
&&
!
empty
(
$more
[
'audio'
])){
$value
[
'audio'
]
=
$more
[
'audio'
];
}
}
$this
->
assign
(
'res_xqgs'
,
$res_xqgs
);
...
...
@@ -119,6 +121,19 @@ class StarController extends HomeBaseController
$this
->
assign
(
'res'
,
$res
);
}
//网红美景详情
public
function
getSceneryDetail
(){
$id
=
$this
->
request
->
param
(
'id'
,
0
,
'intval'
);
$field
=
'id,thumbnail,post_title,post_excerpt,create_time,post_content,more'
;
$res
=
$this
->
getDetail
(
$id
,
$field
);
if
(
$res
){
$more
=
json_decode
(
$res
[
'more'
],
true
);
$res
[
'audio'
]
=
isset
(
$more
[
'audio'
])
&&
!
empty
(
$more
[
'audio'
])
?
$more
[
'audio'
]
:
''
;
$res
[
'image_url'
]
=
isset
(
$more
[
'photos'
])
&&
!
empty
(
$more
[
'photos'
])
?
$more
[
'photos'
][
0
][
'url'
]
:
''
;
}
$this
->
assign
(
'res'
,
$res
);
}
//异域珍馐更多
public
function
getMoreFood
(){
$page
=
$this
->
request
->
param
(
'page'
,
1
,
'intval'
);
...
...
@@ -130,6 +145,18 @@ class StarController extends HomeBaseController
$this
->
assign
(
'res'
,
$res
);
}
//异域珍馐详情
public
function
getFoodDetail
(){
$id
=
$this
->
request
->
param
(
'id'
,
0
,
'intval'
);
$field
=
'id,thumbnail,post_title,post_excerpt,create_time,post_content,more'
;
$res
=
$this
->
getDetail
(
$id
,
$field
);
if
(
$res
){
$more
=
json_decode
(
$res
[
'more'
],
true
);
$res
[
'image_url'
]
=
isset
(
$more
[
'photos'
])
&&
!
empty
(
$more
[
'photos'
])
?
$more
[
'photos'
][
0
][
'url'
]
:
''
;
}
$this
->
assign
(
'res'
,
$res
);
}
//良宿美寝更多
public
function
getMoreHotel
(){
$page
=
$this
->
request
->
param
(
'page'
,
1
,
'intval'
);
...
...
@@ -139,6 +166,18 @@ class StarController extends HomeBaseController
$this
->
assign
(
'res'
,
$res
);
}
//良宿美寝详情
public
function
getHotelDetail
(){
$id
=
$this
->
request
->
param
(
'id'
,
0
,
'intval'
);
$field
=
'id,thumbnail,post_title,post_excerpt,create_time,post_content,more'
;
$res
=
$this
->
getDetail
(
$id
,
$field
);
if
(
$res
){
$more
=
json_decode
(
$res
[
'more'
],
true
);
$res
[
'image_url'
]
=
isset
(
$more
[
'photos'
])
&&
!
empty
(
$more
[
'photos'
])
?
$more
[
'photos'
][
0
][
'url'
]
:
''
;
}
$this
->
assign
(
'res'
,
$res
);
}
//活力生态更多
public
function
getMoreEcology
(){
$page
=
$this
->
request
->
param
(
'page'
,
1
,
'intval'
);
...
...
@@ -148,6 +187,18 @@ class StarController extends HomeBaseController
$this
->
assign
(
'res'
,
$res
);
}
//活力生态详情
public
function
getEcologyDetail
(){
$id
=
$this
->
request
->
param
(
'id'
,
0
,
'intval'
);
$field
=
'id,thumbnail,post_title,post_excerpt,create_time,post_content,more'
;
$res
=
$this
->
getDetail
(
$id
,
$field
);
if
(
$res
){
$more
=
json_decode
(
$res
[
'more'
],
true
);
$res
[
'image_url'
]
=
isset
(
$more
[
'photos'
])
&&
!
empty
(
$more
[
'photos'
])
?
$more
[
'photos'
][
0
][
'url'
]
:
''
;
}
$this
->
assign
(
'res'
,
$res
);
}
//便利出行更多
public
function
getMoreTravel
(){
$page
=
$this
->
request
->
param
(
'page'
,
1
,
'intval'
);
...
...
@@ -156,4 +207,38 @@ class StarController extends HomeBaseController
$res
=
$this
->
getChildArticlePage
(
$position
,
$field
,
$page
);
$this
->
assign
(
'res'
,
$res
);
}
//便利出行详情
public
function
getTravelDetail
(){
$id
=
$this
->
request
->
param
(
'id'
,
0
,
'intval'
);
$field
=
'id,thumbnail,post_title,post_excerpt,create_time,post_content,more'
;
$res
=
$this
->
getDetail
(
$id
,
$field
);
if
(
$res
){
$more
=
json_decode
(
$res
[
'more'
],
true
);
$res
[
'image_url'
]
=
isset
(
$more
[
'photos'
])
&&
!
empty
(
$more
[
'photos'
])
?
$more
[
'photos'
][
0
][
'url'
]
:
''
;
}
$this
->
assign
(
'res'
,
$res
);
}
//获取文章详情
public
function
getDetail
(
$id
,
$field
){
$pre
=
CityCategoryModel
::
pre
;
$res
=
Db
::
table
(
$pre
.
'portal_post'
)
->
where
([
'id'
=>
$id
,
'delete_time'
=>
0
])
->
field
(
$field
)
->
find
();
return
$res
;
}
//星球故事详情
public
function
getStoryDetail
(){
$id
=
$this
->
request
->
param
(
'id'
,
0
,
'intval'
);
$field
=
'id,thumbnail,post_title,post_excerpt,create_time,post_content,more'
;
$res
=
$this
->
getDetail
(
$id
,
$field
);
if
(
$res
){
$more
=
json_decode
(
$res
[
'more'
],
true
);
$res
[
'audio'
]
=
isset
(
$more
[
'audio'
])
&&
!
empty
(
$more
[
'audio'
])
?
$more
[
'audio'
]
:
''
;
}
$this
->
assign
(
'res'
,
$res
);
}
}
...
...
app/portal/validate/AdminRegionNoteValidate.php
查看文件 @
f429150
...
...
@@ -15,12 +15,10 @@ use think\Validate;
class
AdminRegionNoteValidate
extends
Validate
{
protected
$rule
=
[
'post_title'
=>
'require'
,
'post_excerpt'
=>
'require'
,
];
protected
$message
=
[
'post_title.require'
=>
'文章标题不能为空!'
,
'post_excerpt.require'
=>
'文章简介不能为空!'
,
'post_excerpt.require'
=>
'简介不能为空!'
,
];
protected
$scene
=
[
...
...
public/themes/admin_simpleboot3/portal/admin_region_note/add.html
查看文件 @
f429150
...
...
@@ -39,10 +39,10 @@
<input
class=
"form-control"
type=
"hidden"
value=
"{$categories}"
name=
"post[categories]"
id=
"js-categories-id-input"
/>
<tr>
<th
width=
"100"
>
标题
<span
class=
"form-required"
>
*
</span></th>
<th
width=
"100"
>
姓名
<span
class=
"form-required"
>
*
</span></th>
<td>
<input
class=
"form-control"
type=
"text"
name=
"post[post_title]"
id=
"title"
required
value=
""
placeholder=
"请输入标题"
/>
<input
class=
"form-control"
type=
"text"
name=
"post[full_name]"
id=
"title"
required
value=
""
placeholder=
"请输入姓名"
/>
</td>
</tr>
<tr>
...
...
public/themes/admin_simpleboot3/portal/admin_region_note/edit.html
查看文件 @
f429150
...
...
@@ -43,10 +43,10 @@
<input
class=
"form-control"
type=
"hidden"
value=
"{$categories}"
name=
"post[categories]"
id=
"js-categories-id-input"
/>
<tr>
<th
width=
"100"
>
标题
<span
class=
"form-required"
>
*
</span></th>
<th
width=
"100"
>
姓名
<span
class=
"form-required"
>
*
</span></th>
<td>
<input
class=
"form-control"
type=
"text"
name=
"post[post_title]"
required
value=
"{$post.post_title}"
placeholder=
"请输入标题"
/>
<input
class=
"form-control"
type=
"text"
name=
"post[full_name]"
required
value=
"{$post.full_name}"
placeholder=
"请输入姓名"
/>
</td>
</tr>
<tr>
...
...
public/themes/admin_simpleboot3/portal/admin_region_note/index.html
查看文件 @
f429150
...
...
@@ -12,9 +12,9 @@
<!--<option value='0'>全部</option>-->
<!--{$category_tree|default=''}-->
<!--</select> -->
标题:
<input
type=
"text"
class=
"form-control"
name=
"post_title"
value=
"{$post_title|default=''}"
姓名:
<input
type=
"text"
class=
"form-control"
name=
"full_name"
value=
"{$full_name|default=''}"
style=
"width: 140px;"
>
时间:
<input
type=
"text"
class=
"form-control js-bootstrap-datetime"
name=
"start_time"
...
...
@@ -41,7 +41,7 @@
<!--<th width="50">{:lang('SORT')}</th>-->
<!--</notempty>-->
<th
width=
"50"
>
ID
</th>
<th
width=
"
400"
>
标题
</th>
<th
width=
"
200"
>
姓名
</th>
<th
width=
"100"
>
头像
</th>
<th
width=
"65"
>
点击量
</th>
<th
width=
"130"
>
创建时间
</th>
...
...
@@ -64,11 +64,7 @@
<!--</notempty>-->
<td><b>
{$vo.id}
</b></td>
<td>
<notempty
name=
"category"
>
{$vo.post_title}
<else/>
{$vo.post_title}
</notempty>
{$vo.full_name}
</td>
<td>
<notempty
name=
"vo.more.thumbnail"
>
...
...
请
注册
或
登录
后发表评论