切换导航条
此项目
正在载入...
登录
景龙
/
xingqiu
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
景龙
6 years ago
提交
f736d9d5ece0aab7e714a07cb025bbd95eb7f0c8
1 个父辈
f0df3c88
1 个管道 的构建
通过
耗费 2 秒
修改后台添加城市的权重,是否显示等 页面bug
变更
20
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
20 个修改的文件
包含
144 行增加
和
44 行删除
app/portal/controller/EnjoyController.php
app/portal/controller/IndexController.php
app/portal/model/CityCategoryModel.php
public/themes/admin_simpleboot3/portal/admin_city_category/add.html
public/themes/admin_simpleboot3/portal/admin_city_category/edit.html
public/themes/admin_simpleboot3/portal/admin_city_category/index.html
public/themes/simpleboot3/portal/active/get_active_detail.html
public/themes/simpleboot3/portal/enjoy/index.html
public/themes/simpleboot3/portal/enjoy_detail.html
public/themes/simpleboot3/portal/index/index.html
public/themes/simpleboot3/portal/region/get_future_detail.html
public/themes/simpleboot3/portal/region/get_more_video.html
public/themes/simpleboot3/portal/region/get_news_detail.html
public/themes/simpleboot3/portal/region/get_note_detail.html
public/themes/simpleboot3/portal/region/get_star_detail.html
public/themes/simpleboot3/portal/star/get_food_detail.html
public/themes/simpleboot3/portal/star/get_scenery_detail.html
public/themes/simpleboot3/portal/star/get_story_detail.html
public/themes/simpleboot3/public/assets/css/mask.css
public/themes/simpleboot3/public/assets/js/public.js
app/portal/controller/EnjoyController.php
查看文件 @
f736d9d
...
...
@@ -120,6 +120,7 @@ class EnjoyController extends HomeBaseController
$res
=
Db
::
name
(
'city_category'
)
->
where
(
'pid'
,
'<>'
,
0
)
->
where
(
'id'
,
'<>'
,
CityCategoryModel
::
xqgh_cc
)
->
where
(
'id'
,
'<>'
,
CityCategoryModel
::
djxq
)
->
where
(
'delete_time'
,
0
)
->
field
(
'id,name'
)
->
select
()
->
toArray
();
return
$res
;
...
...
app/portal/controller/IndexController.php
查看文件 @
f736d9d
...
...
@@ -65,6 +65,20 @@ class IndexController extends HomeBaseController
}
$this
->
assign
(
'res_xqyy'
,
$res_xqyy
);
//推广视频
$position
=
CityCategoryModel
::
xqyy
;
$city_id
=
CityCategoryModel
::
djxq
;
$field
=
'id,more,thumbnail'
;
$res_djxq
=
$this
->
getVideo
(
$position
,
$city_id
,
$field
,
1
);
foreach
(
$res_djxq
as
&
$value
){
$video
=
json_decode
(
$value
[
'more'
],
true
);
$value
[
'video'
]
=
$video
[
'video'
];
}
if
(
$res_djxq
){
$res_djxq
=
$res_djxq
[
0
];
}
$this
->
assign
(
'res_djxq'
,
$res_djxq
);
//星域秀场->明星访谈
$position
=
CityCategoryModel
::
mxft
;
$field
=
'id,full_name,position,trade,post_excerpt,thumbnail avatar'
;
...
...
@@ -148,13 +162,38 @@ class IndexController extends HomeBaseController
return
$res
;
}
//获取推荐视频
public
function
getVideo
(
$position
,
$city_id
,
$field
,
$limit
=
''
){
$pre
=
CityCategoryModel
::
pre
;
$limit
=
empty
(
$limit
)
?
0
:
$limit
;
$post_id
=
Db
::
table
(
$pre
.
'portal_category_post'
)
->
whereIn
(
'category_id'
,
$position
)
->
field
(
'post_id'
)
->
select
()
->
toArray
();
$post_id
=
array_column
(
$post_id
,
'post_id'
);
//查询文章
$res
=
Db
::
table
(
$pre
.
'portal_post'
)
->
whereIn
(
'id'
,
$post_id
)
->
where
(
'city_id'
,
$city_id
)
->
where
(
'delete_time'
,
0
)
->
field
(
$field
)
->
limit
(
$limit
)
->
order
(
'weigh desc'
)
->
select
()
->
toArray
();
return
$res
;
}
//获取各洲对应的城市
private
function
getCity
(
$pid
){
$pre
=
CityCategoryModel
::
pre
;
$res
=
Db
::
table
(
$pre
.
'city_category'
)
->
where
(
'pid'
,
$pid
)
->
where
(
'is_show'
,
1
)
->
where
(
'delete_time'
,
0
)
->
field
(
'id,pid,name'
)
->
order
(
'weigh desc'
)
->
select
()
->
toArray
();
return
$res
;
...
...
app/portal/model/CityCategoryModel.php
查看文件 @
f736d9d
...
...
@@ -54,6 +54,7 @@ class CityCategoryModel extends Model
//城市
const
xqgh_cc
=
65
;
//星球故事
const
djxq
=
68
;
//独角星球
//五大洲
const
asia
=
1
;
//亚洲
...
...
public/themes/admin_simpleboot3/portal/admin_city_category/add.html
查看文件 @
f736d9d
...
...
@@ -47,6 +47,20 @@
</div>
<span
class=
"form-required"
>
图片参考尺寸:1920*666
</span>
</div>
<div
class=
"form-group"
>
<label
for=
"input-name"
>
是否显示
</label>
<div>
是:
<input
class=
""
type=
"radio"
name=
"is_show"
value=
"1"
checked
/>
否:
<input
class=
""
type=
"radio"
name=
"is_show"
value=
"0"
/>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"input-name"
>
权重
</label>
<div>
<input
type=
"number"
class=
"form-control"
id=
"input-weigh"
name=
"weigh"
value=
"0"
>
</div>
</div>
</div>
</div>
...
...
public/themes/admin_simpleboot3/portal/admin_city_category/edit.html
查看文件 @
f736d9d
...
...
@@ -52,6 +52,20 @@
</div>
<span
class=
"form-required"
>
图片参考尺寸:1920*666
</span>
</div>
<div
class=
"form-group"
>
<label
for=
"input-name"
>
是否显示
</label>
<div>
是:
<input
class=
""
type=
"radio"
name=
"is_show"
value=
"1"
<
eq
name=
"1"
value=
"$category_name.is_show"
>
checked
</eq>
/>
否:
<input
class=
""
type=
"radio"
name=
"is_show"
value=
"0"
<
eq
name=
"0"
value=
"$category_name.is_show"
>
checked
</eq>
/>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"input-name"
>
权重
</label>
<div>
<input
type=
"number"
class=
"form-control"
id=
"input-weigh"
name=
"weigh"
value=
"{$category_name.weigh}"
>
</div>
</div>
</div>
</div>
...
...
public/themes/admin_simpleboot3/portal/admin_city_category/index.html
查看文件 @
f736d9d
...
...
@@ -31,6 +31,8 @@
<th
width=
"200"
>
ID
</th>
<th
width=
"400"
>
分类名称
</th>
<th>
banner图
</th>
<th>
是否显示
</th>
<th
width=
"200"
>
权重
</th>
<th
width=
"210"
>
操作
</th>
</tr>
</thead>
...
...
@@ -48,6 +50,20 @@
</notempty>
</td>
<td>
<notempty
name=
"vo.is_show"
>
<span
class=
"label label-success"
>
显示
</span>
<else/>
<span
class=
"label label-default"
>
隐藏
</span>
</notempty>
</td>
<td>
<b>
{$vo.weigh}
</b>
</td>
<td>
<a
class=
"btn btn-xs btn-primary"
href=
"{:url('AdminCityCategory/edit',array('id'=>$vo['id']))}"
>
{:lang('EDIT')}
</a>
<a
class=
"btn btn-xs btn-danger js-ajax-delete"
href=
"{:url('AdminCityCategory/delete',array('id'=>$vo['id']))}"
class=
"js-ajax-delete"
>
{:lang('DELETE')}
</a>
</td>
...
...
public/themes/simpleboot3/portal/active/get_active_detail.html
查看文件 @
f736d9d
...
...
@@ -44,7 +44,7 @@
<!-- 头部 -->
<div
class=
"show_main_Tit clearfix"
>
<h1>
{$res.post_title}
</h1>
<
p>
{$res.create_time|date="Y-m-d",###}
</p
>
<
!--<p>{$res.create_time|date="Y-m-d",###}</p>--
>
</div>
<!-- 文字内容 -->
<div
class=
"show_main_txt"
>
...
...
public/themes/simpleboot3/portal/enjoy/index.html
查看文件 @
f736d9d
...
...
@@ -14,7 +14,7 @@
/*width: 625px;*/
/*height: 648px;*/
/*}*/
.
Spot_items
,
.swiper-slide-prev
,
.swiper-slide-prev
.Spot_item
img
{
.
Walker_main
.Spot_items
,
.Walker_main
.swiper-slide-prev
,
.Walker_main
.swiper-slide-prev
.Spot_item
img
{
max-width
:
1200px
;
}
.Spot_main
.swiper-slide-next
.Spot_top
img
{
...
...
public/themes/simpleboot3/portal/enjoy_detail.html
查看文件 @
f736d9d
...
...
@@ -31,7 +31,7 @@
<div
class=
"outdoors"
>
<div
class=
"outdoors_title clearfix"
>
<div
class=
"outdoors_title_left fl"
>
{$res.post_title}
</div>
<
div
class=
"outdoors_title_right fr"
>
{$res.create_time|date="Y-m-d",###}
</div
>
<
!--<div class="outdoors_title_right fr">{$res.create_time|date="Y-m-d",###}</div>--
>
</div>
<div
class=
"outdoors_text"
>
{$res.post_content}
...
...
public/themes/simpleboot3/portal/index/index.html
查看文件 @
f736d9d
...
...
@@ -44,12 +44,15 @@
margin
:
auto
;
display
:
block
;
height
:
100%
;
width
:
100%
;
}
.mask_video
img
{
width
:
30px
;
height
:
30px
;
cursor
:
pointer
;
position
:
absolute
;
right
:
-100px
;
top
:
-30px
;
right
:
-25px
;
top
:
-27px
;
}
</style>
</head>
...
...
@@ -59,7 +62,7 @@
<div
class=
"mask"
id=
"mask"
>
<div
class=
"mask_video"
>
<img
id=
"nos"
src=
"__TMPL__/public/assets/starImg/nos.png"
alt=
""
>
<video
id=
"video2"
src=
"
http://xingqiu.qiniu.brotop.cn/portal/20190513/79713d2ec80f05fcaea36c685494c86b.mp4?e=1558360608&token=UjVH2DxMRL57-Lx4-JFaELCh7icERqJ1NxWf6smj:BgYec03rGPUNK7FcCld3qgrLMk0=&attname=Greenland+-+Rough.+Real+Remote..mp4
"
></video>
<video
id=
"video2"
src=
"
{:cmf_get_file_download_url($res_djxq.video)}
"
></video>
</div>
</div>
<!-- 侧边 -->
...
...
@@ -91,10 +94,10 @@
<!-- 首页主体内容 -->
<div
id=
"star_main"
>
<!-- 星球奇境 -->
<div
class=
"star_happy"
id=
"star"
>
<div
class=
"star_happy"
>
<div>
<span
class=
"happy_title clearfix"
>
<p>
星球
<i>
奇境
</i></p>
<p
id=
"star"
>
星球
<i>
奇境
</i></p>
<p>
PLANET DISCOVERY
</p>
</span>
<em
class=
"north clearfix"
>
...
...
@@ -668,6 +671,14 @@
</notempty>
<img
onclick=
"bofang()"
class=
"show_in_banner2"
src=
"__TMPL__/public/assets/starImg/aicon_30.png"
alt=
""
>
</div>
<!-- 更多按钮 -->
<div
class=
"star_gall_more"
>
<a
href=
"/portal/region/getMoreVideo"
>
MORE+
</a>
</div>
<!-- 人物简介 -->
<notempty
name=
"res_mxft"
>
<!-- 标题 -->
...
...
public/themes/simpleboot3/portal/region/get_future_detail.html
查看文件 @
f736d9d
...
...
@@ -35,7 +35,7 @@
<!-- 头部 -->
<div
class=
"show_main_Tit clearfix"
>
<h1>
{$res.post_title}
</h1>
<
p>
{$res.create_time|date="Y-m-d",###}
</p
>
<
!--<p>{$res.create_time|date="Y-m-d",###}</p>--
>
</div>
<!-- 文字内容 -->
<div
class=
"show_main_txt"
>
...
...
public/themes/simpleboot3/portal/region/get_more_video.html
查看文件 @
f736d9d
...
...
@@ -23,6 +23,7 @@
<body>
<include
file=
"public@header"
/>
<!-- 弹出框 -->
<div
class=
"mask"
>
</div>
...
...
@@ -108,29 +109,32 @@
$
(
'video'
).
bind
(
'contextmenu'
,
function
()
{
return
false
;
});
//监听播放时间
var
video
=
document
.
getElementById
(
'video'
);
//使用事件监听方式捕捉事件
video
.
addEventListener
(
"timeupdate"
,
function
()
{
var
timeDisplay
;
//用秒数来显示当前播放进度
timeDisplay
=
Math
.
floor
(
video
.
currentTime
);
console
.
log
(
Math
.
floor
(
video
.
currentTime
));
video
.
addEventListener
(
'play'
,
function
()
{
video
.
currentTime
=
0
;
});
//当视频播放到 15s的时候做处理
if
(
timeDisplay
>=
5
)
{
//登录
var
users
=
$
(
'#users'
).
val
();
if
(
users
==
0
){
//监听播放时间
video_mask
(
'您还不是VIP,可试看20秒'
);
var
video
=
document
.
getElementById
(
'video'
);
//使用事件监听方式捕捉事件
video
.
addEventListener
(
"timeupdate"
,
function
()
{
var
timeDisplay
;
//用秒数来显示当前播放进度
timeDisplay
=
Math
.
floor
(
video
.
currentTime
);
console
.
log
(
Math
.
floor
(
video
.
currentTime
));
video
.
addEventListener
(
'play'
,
function
()
{
video
.
currentTime
=
0
;
}),
video_mask
(
'1111'
);
video
.
pause
();
}
},
false
);
});
//当视频播放到 15s的时候做处理
if
(
timeDisplay
>=
20
)
{
video
.
addEventListener
(
'play'
,
function
()
{
video
.
currentTime
=
0
;
}),
video_mask
(
'会员可观看完整视频'
);
video
.
pause
();
}
},
false
);
}
//默认第一个视频
switch_video
(
0
);
var
value
=
$
(
'#cityName'
).
val
();
...
...
public/themes/simpleboot3/portal/region/get_news_detail.html
查看文件 @
f736d9d
...
...
@@ -21,7 +21,7 @@
<!-- 内容一 -->
<div
class=
"show_4_con1"
>
<h1>
{$res.post_title}
</h1>
<
span>
{$res.create_time|date="Y-m-d",###}
</span
>
<
!--<span>{$res.create_time|date="Y-m-d",###}</span>--
>
<img
src=
"{:cmf_get_image_url($res.image_url)}"
alt=
""
>
<div
class=
"show_4_txt"
>
{$res.post_content}
...
...
public/themes/simpleboot3/portal/region/get_note_detail.html
查看文件 @
f736d9d
...
...
@@ -27,7 +27,7 @@
<div
class=
"show6_con_top2"
>
<h1>
{$res.full_name}
</h1>
<h2></h2>
<
span>
{$res.create_time|date="Y-m-d",###}
</span
>
<
!--<span>{$res.create_time|date="Y-m-d",###}</span>--
>
<p
class=
"show6_con_top3"
>
{$res.post_excerpt}
</p>
...
...
public/themes/simpleboot3/portal/region/get_star_detail.html
查看文件 @
f736d9d
...
...
@@ -27,7 +27,7 @@
<div
class=
"show6_con_top2"
>
<h1>
{$res.full_name}
</h1>
<h2>
{$res.position} {$res.trade}
</h2>
<
span>
{$res.create_time|date="Y-m-d",###}
</span
>
<
!--<span>{$res.create_time|date="Y-m-d",###}</span>--
>
<p
class=
"show6_con_top3"
>
{$res.post_excerpt}
</p>
...
...
public/themes/simpleboot3/portal/star/get_food_detail.html
查看文件 @
f736d9d
...
...
@@ -27,7 +27,7 @@
<!-- 头部 -->
<div
class=
"show_main_Tit clearfix"
>
<h1>
{$res.post_title}
</h1>
<
p>
{$res.create_time|date="Y-m-d",###}
</p
>
<
!--<p>{$res.create_time|date="Y-m-d",###}</p>--
>
</div>
<!-- 文字内容 -->
<div
class=
"show_main_txt"
>
...
...
public/themes/simpleboot3/portal/star/get_scenery_detail.html
查看文件 @
f736d9d
...
...
@@ -27,7 +27,7 @@
<!-- 头部 -->
<div
class=
"show_main_Tit clearfix"
>
<h1>
{$res.post_title}
</h1>
<
p>
{$res.create_time|date="Y-m-d",###}
</p
>
<
!--<p>{$res.create_time|date="Y-m-d",###}</p>--
>
</div>
<!-- 文字内容 -->
<div
class=
"show_main_txt"
>
...
...
public/themes/simpleboot3/portal/star/get_story_detail.html
查看文件 @
f736d9d
...
...
@@ -37,7 +37,7 @@
<!-- 内容 -->
<div
class=
"show_INMain_con2_2 show_5_swiper"
>
<div
>
<div
c
>
<div>
<div
class=
"show_index_con2Txt clearfix"
>
<!-- 左侧图片 -->
<img
class=
"show_indexImg1"
src=
"{:cmf_get_image_url($res.thumbnail)}"
alt=
""
>
...
...
public/themes/simpleboot3/public/assets/css/mask.css
查看文件 @
f736d9d
.mask
{
position
:
fixed
;
/*left: 44%;*/
top
:
40%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
-webkit-transform
:
translate
(
-50%
,
-50%
);
-o-transform
:
translate
(
-50%
,
-50%
);
-moz-transform
:
translate
(
-50%
,
-50%
);
-ms-transform
:
translate
(
-50%
,
-50%
);
top
:
52%
;
left
:
45%
;
transform
:
translate
(
-52%
,
-45%
);
-webkit-transform
:
translate
(
-52%
,
-45%
);
-o-transform
:
translate
(
-52%
,
-45%
);
-moz-transform
:
translate
(
-52%
,
-45%
);
-ms-transform
:
translate
(
-52%
,
-45%
);
display
:
none
;
/*top: 300px;*/
padding
:
24px
32px
;
...
...
public/themes/simpleboot3/public/assets/js/public.js
查看文件 @
f736d9d
...
...
@@ -182,7 +182,7 @@ function video_mask(msg) {
setTimeout
(
function
(){
$
(
'.mask'
).
hide
();
$
(
'.mask'
).
text
(
''
);
},
4
000
);
},
6
000
);
}
//获取url的参数
...
...
请
注册
或
登录
后发表评论