作者 景龙
1 个管道 的构建 通过 耗费 4 秒

修改页面样式

正在显示 27 个修改的文件 包含 272 行增加90 行删除
... ... @@ -28,6 +28,7 @@ class IndexController extends HomeBaseController
$res['north'] = $this->getCity(CityCategoryModel::north);
$res['south'] = $this->getCity(CityCategoryModel::south);
$res['antarctica'] = $this->getCity(CityCategoryModel::antarctica);
$res['arctic'] = $this->getCity(CityCategoryModel::arctic);
$this->assign('res_city',$res);
//星享体验
... ...
... ... @@ -25,7 +25,7 @@ class RegionController extends HomeBaseController
$res_xqyy = $this->getChildArticle($position,$field,1);
foreach($res_xqyy as &$value){
$more = json_decode($value['more'],true);
$value['video'] = $more['video'];
$value['video'] = isset($more['video']) && !empty($more['video'])?$more['video']:'';
}
if($res_xqyy){
$res_xqyy = $res_xqyy[0];
... ... @@ -47,7 +47,7 @@ class RegionController extends HomeBaseController
$res_xqgs = $this->getChildArticle($position,$field,$this->index_limit);
foreach($res_xqgs as &$value){
$more = json_decode($value['more'],true);
$value['audio'] = $more['audio'];
$value['audio'] = isset($more['audio']) && !empty($more['audio'])?$more['audio']:'';
}
$this->assign('res_xqgs',$res_xqgs);
... ... @@ -138,18 +138,26 @@ class RegionController extends HomeBaseController
//星球影院更多(按照城市查询)
public function getMoreVideo(){
$page = $this->request->param('page',1,'intval');
$city_id = $this->request->param('city_id',1,'intval');
$city_id = $this->request->param('city_id',0,'intval');
$position['city_id'] = $city_id;
$position['category_id'] = CityCategoryModel::xqyy;
$field = 'id,post_title,framing,release_time,city_id,more';
$field = 'id,post_title,framing,release_time,city_id,more,thumbnail';
$star = new StarController();
$res = $star->getChildArticlePage($position,$field,$page);
foreach($res as &$value){
$res = $star->getChildArticlePage($position,$field);
foreach($res['data']['data'] as &$value){
$more = json_decode($value['more'],true);
$value['video'] = $more['video'];
$value['video'] = isset($more['video']) && !empty($more['video'])?$more['video']:'';;
$value['city_name'] = $this->getCityCategory($value['city_id']);
}
$this->assign('res',$res);
$this->assign('res',$res['data']);
$this->assign('page',$res['page']);
//城市分类
$enjoyModel = new EnjoyController();
$city_name = $enjoyModel->getCityName();
$this->assign('city_name',$city_name);
$this->assign('city_id',$city_id);
return $this->fetch();
}
... ... @@ -178,9 +186,9 @@ class RegionController extends HomeBaseController
$position['category_id'] = CityCategoryModel::xqgs;
$field = 'id,thumbnail,post_excerpt,more,create_time';
$res = $this->getChildArticlePage($position,$field);
foreach($res as &$value){
foreach($res['data']['data'] as &$value){
$more = json_decode($value['more'],true);
$value['audio'] = $more['audio'];
$value['audio'] = isset($more['audio']) && !empty($more['audio'])?$more['audio']:'';
}
$this->assign('res',$res['data']);
$this->assign('page',$res['page']);
... ...
... ... @@ -121,16 +121,21 @@ class StarController extends HomeBaseController
->toArray();
$post_id = array_column($post_id,'post_id');
//查询文章
if($position['city_id'] == 0){
//所有
$where = ['delete_time'=>0];
}else{
$where = ['city_id'=>$position['city_id'],'delete_time'=>0];
}
$res = Db::table($pre.'portal_post')
->whereIn('id',$post_id)
->where('city_id',$position['city_id'])
->where('delete_time', 0)
->where($where)
->field($field)
->order('weigh desc')
->paginate($limit,false,['query'=>request()->param()]);
$res['data'] = $res->toArray();
$res['page'] = $res->render();
return $res;
$arr['data'] = $res->toArray();
$arr['page'] = $res->render();
return $arr;
}
//网红美景更多
... ...
... ... @@ -60,6 +60,7 @@ class CityCategoryModel extends Model
const north = 5;//北美洲
const south = 6;//南美洲
const antarctica = 20;//南极洲
const arctic = 43;//北极
//月份
const January = 1;//一月份
... ...
... ... @@ -83,6 +83,9 @@
</a>
<input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
</div>
<div style="margin-top:30px;">
<span class="form-required">图片参考尺寸:1200*500</span>
</div>
</td>
</tr>
<tr>
... ...
... ... @@ -121,6 +121,9 @@
</a>
<input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
</div>
<div style="margin-top:30px;">
<span class="form-required">图片参考尺寸:400*400</span>
</div>
</td>
</tr>
<tr>
... ...
... ... @@ -146,6 +146,9 @@
</a>
<input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
</div>
<div style="margin-top:30px;">
<span class="form-required">图片参考尺寸:400*400</span>
</div>
</td>
</tr>
<tr>
... ...
... ... @@ -14,17 +14,28 @@
<body>
<include file="public@header"/>
<div class="banner">
<img src="__TMPL__/public/assets/starImg/bicon_31.png" alt="">
<img src="__TMPL__/public/assets/starImg/enjoy_banner.jpg" alt="">
</div>
<main>
<div class="container">
<div class="region">
<select name="city_id">
<option value="0">所有</option>
<!--<select name="city_id">-->
<!--<option value="0">所有</option>-->
<!--<volist name="city_name" id="vo">-->
<!--<option value="{$vo.id}" <eq name="$vo.id" value="$city_id">selected</eq>>{$vo.name}</option>-->
<!--</volist>-->
<!--</select>-->
<div class="select">
<input type="text" value="中国" readonly="readonly">
<img src="__TMPL__/public/assets/starImg/down.png" alt="">
<ul>
<li>所有</li>
<volist name="city_name" id="vo">
<option value="{$vo.id}" <eq name="$vo.id" value="$city_id">selected</eq>>{$vo.name}</option>
<li value="{$vo.id}" <eq name="$vo.id" value="$city_id">selected</eq>>{$vo.name}</li>
</volist>
</select>
</ul>
</div>
</div>
<!--亲临现场-->
<div class="Spot" id="own">
... ... @@ -242,6 +253,32 @@
<script src="__TMPL__/public/assets/js/public.js"></script>
<script>
$('.select input').click(function() {
if ($(this).next('img').attr('src') == "__TMPL__/public/assets/starImg/down.png") {
$(this).next('img').attr('src', "__TMPL__/public/assets/starImg/up.png")
$('.select ul').toggle();
} else {
$(this).next('img').attr('src', "__TMPL__/public/assets/starImg/down.png")
$('.select ul').toggle();
}
});
$('.select ul li').click(function() {
$('.select input').val($(this).text());
$('.select ul').hide();
var index = $(this).index();
$('.curren').eq(index).addClass('video_active').siblings().removeClass('video_active');
});
$(document).ready(function() {
var val = $('.select input').val();
var val2 = $('.select ul li:first-child').text();
val = val2;
$('.select input').val(val)
})
var swiper = new Swiper('.Spot_main .swiper-container', {
slidesPerView: 2,
spaceBetween: 50,
... ...
... ... @@ -34,13 +34,13 @@
<div id="banner" class="swiper-container6">
<div class="swiper-wrapper">
<div class="swiper-slide">
<img src="__TMPL__/public/assets/starImg/aicon_01.png" alt="">
<img src="__TMPL__/public/assets/starImg/banner/1.jpg" alt="">
</div>
<div class="swiper-slide">
<img src="__TMPL__/public/assets/starImg/aicon_01.png" alt="">
<img src="__TMPL__/public/assets/starImg/banner/2.jpg" alt="">
</div>
<div class="swiper-slide">
<img src="__TMPL__/public/assets/starImg/aicon_01.png" alt="">
<img src="__TMPL__/public/assets/starImg/banner/3.jpg" alt="">
</div>
</div>
<!--<div class="swiper-pagination">-->
... ... @@ -67,9 +67,18 @@
</volist>
</ul>
</em>
<em class="beiji clearfix">
<img src="__TMPL__/public/assets/starImg/aicon_41.png" alt="">
<p>北极</p>
<ul class="star_happy_box">
<volist name="res_city.arctic" id="vo">
<li><a href="/portal/star/index?city_id={$vo.id}">{$vo.name}</a></li>
</volist>
</ul>
</em>
<em class="south clearfix">
<img src="__TMPL__/public/assets/starImg/aicon_41.png" alt="">
<p>美洲</p>
<p>拉丁美洲</p>
<ul class="star_happy_box">
<volist name="res_city.south" id="vo">
<li><a href="/portal/star/index?city_id={$vo.id}">{$vo.name}</a></li>
... ... @@ -246,7 +255,7 @@
</div>
<!-- 四月 -->
<div class="star_month clearfix" style="margin:0 0 10px 0">
<div class="star_february april hovers">
<div class="star_february aprils hovers">
<p>4</p>
<p>April</p>
</div>
... ... @@ -317,7 +326,7 @@
</div>
<!-- 六月 -->
<div class="star_month clearfix">
<div class="star_february star_august star_august_bg hovers">
<div class="star_february star_augustss hovers">
<p>6</p>
<p>June</p>
</div>
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>星球故事更多</title>
<link rel="stylesheet" href="__TMPL__/public/assets/css/bootstrap4.0.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/show.css">
</head>
<body>
<include file="public@header"/>
<div class="show_story">
<!-- 顶部标题 -->
<div class="show_INMain_tit clearfix">
<div class="show_IN1 clearfix">
<img src="__TMPL__/public/assets/starImg/aicon_03.png" alt="">
<p>星球<span>故事</span></p>
<h2>Planet Story</h2>
</div>
</div>
<div>
<!-- 内容 -->
<div class="show_INMain_con2_2 ">
<volist name="res['data']" id="vo">
<div class="show_index_con2Txt clearfix">
<a href="/portal/star/getStoryDetail?id={$vo.id}">
<!-- 左侧图片 -->
<img class="show_indexImg1" src="{:cmf_get_image_url($vo.thumbnail)}" alt="">
<!-- 文字 -->
<div class="show_index_con2Txt2">
{$vo.post_excerpt}
</div>
<!-- 进度条 -->
<div class="show_index_progress">
<img src="__TMPL__/public/assets/starImg/aicon_15.png" alt="">
</div>
</a>
</div>
</volist>
</div>
<!--分页-->
<div class="pagination">
{$page|default=''}
</div>
</div>
</div>
<include file="public@footer"/>
<script src="__TMPL__/public/assets/js/jquery-3.2.1.min.js"></script>
<script src="__TMPL__/public/assets/js/public.js"></script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -10,6 +10,7 @@
</head>
<body>
<include file="public@header"/>
<!-- 弹出框 -->
<div class="video_mask">
您还不是VIP,可试看15秒
... ... @@ -30,52 +31,24 @@
<input type="text" value="中国" readonly="readonly">
<img src="__TMPL__/public/assets/starImg/down.png" alt="">
<ul>
<li>中国</li>
<li>美国</li>
<li>所有</li>
<volist name="city_name" id="vo">
<li value="{$vo.id}" <eq name="$vo.id" value="$city_id">selected</eq>>{$vo.name}</li>
</volist>
</ul>
</div>
</div>
<!-- 视频 -->
<div class="show_9_video_asideCon">
<ul class="curren video_active">
<li class="clearfix">
<img src="__TMPL__/public/assets/starImg/bicon_29.png" alt="">
<p>
令人神往的 蒙大拿州
</p>
</li>
<li class="clearfix">
<img src="__TMPL__/public/assets/starImg/bicon_29.png" alt="">
<p>
令人神往的 蒙大拿州
</p>
</li>
<li class="clearfix">
<img src="__TMPL__/public/assets/starImg/bicon_29.png" alt="">
<p>
令人神往的 蒙大拿州
</p>
</li>
<li class="clearfix">
<img src="__TMPL__/public/assets/starImg/bicon_29.png" alt="">
<p>
令人神往的 蒙大拿州
</p>
</li>
<li class="clearfix">
<img src="__TMPL__/public/assets/starImg/bicon_29.png" alt="">
<p>
令人神往的 蒙大拿州
</p>
</li>
</ul>
<ul class="curren">
<volist name="res['data']" id="vo">
<li class="clearfix">
<img src="__TMPL__/public/assets/starImg/bicon_29.png" alt="">
<img src="{:cmf_get_image_url($vo.thumbnail)}" alt="">
<p>
令人神往的 蒙大拿州
{$vo.post_title}
</p>
</li>
</volist>
</ul>
</div>
</div>
... ... @@ -97,7 +70,9 @@
</div>
</div>
</div>
<include file="public@footer"/>
<script src="__TMPL__/public/assets/js/jquery-3.2.1.min.js"></script>
<script src="__TMPL__/public/assets/js/public.js"></script>
<script>
// 星域秀场视频
$(function() {
... ... @@ -110,7 +85,7 @@
$('.select ul').toggle();
}
})
});
$('.select ul li').click(function() {
$('.select input').val($(this).text());
... ... @@ -123,18 +98,20 @@
var val = $('.select input').val();
var val2 = $('.select ul li:first-child').text();
val = val2;
$('.select input').val(val)
})
$('.select input').val(val);
});
// 弹出框
setInterval(function() {
$('.video_mask').hide();
}, 4000)
})
}, 4000);
$('.curren').eq(0).addClass('video_active');
});
// 点击播放
function bofang() {
video.play();
$('#video').attr('controls', 'controls')
$('#video').attr('controls', 'controls');
$('.show_9_video img').hide();
}
</script>
... ...
... ... @@ -71,7 +71,7 @@
</div>
<!-- 更多 -->
<div class="show_IN2">
<a href=""> MORE+ </a>
<a href="/portal/region/getMoreStory"> MORE+ </a>
</div>
</div>
<!-- 内容 -->
... ... @@ -127,7 +127,9 @@
<ul class="swiper-wrapper">
<volist name="res_xyhl" id="vo">
<li class="swiper-slide">
<a href="/portal/region/getGalleryDetail?id={$vo.id}">
<img class="swiper-slide slide-image" src="{:cmf_get_image_url($vo.thumbnail)}" alt="">
</a>
</li>
</volist>
</ul>
... ...
... ... @@ -355,3 +355,58 @@ main {
.Sport .swiper-button-prev {
right: 70px !important;
}
.select {
width: 316px;
position: relative;
}
.select ul {
display: none;
position: absolute;
top: 60px;
left: 52px;
z-index: 100;
}
.select ul li {
width: 218px;
height:40px;
line-height: 40px;
cursor: pointer;
border-bottom: 1px solid #EBEBEB;
padding-left: 16px;
background-color: white;
}
.select ul li:last-child {
border-bottom: 0;
}
.select ul li:hover {
background: #09FF8E;
}
.select input {
cursor: pointer;
width:316px;
height:60px;
background:rgba(255,255,255,1);
box-shadow:-18px 18px 54px 0px rgba(0, 0, 0, 0.1);
border-radius:30px;
outline: none;
border: 0;
color: #1A1A1A;
padding-left: 20px;
box-sizing: border-box;
margin-left: 11px;
opacity: 0.9;
}
.select img {
position: absolute;
top: 23px;
right: 24px;
width: 14px;
height: 14px;
}
... ...
... ... @@ -173,7 +173,6 @@ p {
color: #fff;
font-size: 14px;
font-weight: bold;
width: 66px;
height:32px;
cursor: pointer;
display: inline-block;
... ... @@ -207,7 +206,11 @@ p {
top: 546px;
left: 320px
}
/*北极*/
.beiji{
top: 327px;
left: 499px;
}
/* 南极洲 */
... ... @@ -373,19 +376,19 @@ p {
height: 290px;
background-size: 290px 290px;
background-repeat: no-repeat;
background-image: url("../starImg/bicon_38.png") !important;
background-image: url("../starImg/monthCover/3.jpg") !important;
}
.star_august_bg {
background-image: url("../starImg/bicon_42.png") !important;
}
.star_august_bg2 {
background-image: url("../starImg/bicon_20.png") !important;
background-image: url("../starImg/monthCover/9.jpg") !important;
}
.star_august_bg3 {
background-image: url("../starImg/aicon_20.png") !important;
background-image: url("../starImg/monthCover/11.jpg") !important;
}
#star_main .star_month .img_month p:first-child {
... ... @@ -508,14 +511,17 @@ p {
/* 四月 */
#star_main .april {
background: rgba(234, 161, 93, 1);
background-image: url(../starImg/monthCover/1.jpg) !important;
}
.aprils{
background: rgba(77, 137, 200, 1);
}
/* 五月 */
#star_main .may {
background: rgba(191, 208, 166, 1);
background-image: url(../starImg/monthCover/5.jpg) !important;
}
... ... @@ -530,7 +536,7 @@ p {
/* 七月 */
#star_main .july {
background: rgba(13, 173, 103, 1);
background-image: url(../starImg/monthCover/7.jpg) !important;
}
... ... @@ -542,6 +548,10 @@ p {
#star_main .star_august {
color: rgba(91, 91, 107, 1);
background-color: #9df39f;
}
.star_augustss{
background-color:#0c6251;
}
... ... @@ -555,7 +565,7 @@ p {
/* 十二月 */
#star_main .december {
background: rgba(77, 137, 200, 1);
background-color: #e3e658;
}
... ...
... ... @@ -286,9 +286,14 @@ body {
overflow: hidden;
}
.show_index_con2Txt {
.show_INMain_con2_2 {
width: 1200px;
margin-top: 78px;
}
.show_index_con2Txt {
height: 400px;
margin-bottom: 30px;
background-color: white;
}
... ... @@ -700,6 +705,7 @@ body {
color: rgba(26, 26, 26, 1);
line-height: 42px;
text-align: center;
outline: none;
}
.layui-laypage a,
... ... @@ -723,7 +729,9 @@ body {
.show_comments_icon {
width: 44px;
height: 44px;
float: left;
border-radius: 50%;
}
.show_main2_show ul li {
... ... @@ -746,7 +754,7 @@ body {
color: rgba(62, 228, 152, 1);
}
.show_comments_con h2 {
.show_comments_con dl{
font-size: 16px;
font-weight: 400;
line-height: 24px;
... ... @@ -765,6 +773,7 @@ body {
text-align: center;
font-size: 18px;
color: rgba(62, 228, 152, 1);
margin-top:30px;
}
... ... @@ -952,7 +961,7 @@ body {
}
.show6_con2 img{
max-width:1100px
max-width:1130px;
}
... ... @@ -998,10 +1007,11 @@ body {
-webkit-line-clamp: 10;
-webkit-box-orient: vertical;
}
.show6_con2{
overflow: hidden;
}
.show6_con2 img {
width: 100%;
margin: 38px 0 31px 0;
}
.show6_con2 p {
... ... @@ -1617,10 +1627,6 @@ body {
margin-right: 80px;
}
.show_9_video_asideTxt3 {
float: left;
margin-left: 334px;
}
.show_9_video_asideTxt3 p {
font-size: 16px;
... ... @@ -1758,3 +1764,9 @@ body {
font-size: 18px;
color: rgba(255, 255, 255, 1);
}
/*故事更多頁面*/
.show_story{
width: 1200px;
margin:70px auto 150px;
}
\ No newline at end of file
... ...
... ... @@ -16,7 +16,7 @@
<img class="show_comments_icon" src="{:cmf_get_image_url($vo.avatar)}" alt="">
<div class="show_comments_con">
<h1>{$vo.nickname}</h1>
<h2>{$vo.content}</h2>
<dl>{$vo.content}</dl>
<p>{$vo.create_time|date="Y-m-d",###}</p>
</div>
</li>
... ...