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

修改样式及图片尺寸

... ... @@ -21,7 +21,7 @@ class EnjoyController extends HomeBaseController
public function index(){
//按照城市查询
//默认澳大利亚
$city_id = $this->request->param('city_id',35,'intval');
$city_id = $this->request->param('city_id',0,'intval');
$position['city_id'] = $city_id;
$this->assign('city_id',$city_id);
//城市分类
... ... @@ -74,10 +74,15 @@ class EnjoyController 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)
->limit($limit)
->order('weigh desc')
... ...
... ... @@ -85,6 +85,9 @@
</div>
</td>
</tr>
<tr>
</tr>
</table>
<hook name="portal_admin_article_edit_view_right_sidebar"/>
... ...
... ... @@ -20,13 +20,19 @@
<a href="javascript:uploadOneImage('图片上传','#thumbnail');">
<img src="__TMPL__/public/assets/images/default-thumbnail.png"
id="thumbnail-preview"
width="135" height="60" style="cursor: pointer"/>
width="120" height="40" style="cursor: pointer"/>
</a>
<input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
<a href="javascript:uploadOneImage('图片上传','#thumbnail');">上传图片</a>
</div>
</div>
<div class="form-group">
<label for="thumbnail" class="col-sm-2 control-label"></label>
<div class="col-md-6 col-sm-10">
<span class="form-required">图片参考尺寸:120*40</span>
</div>
</div>
<div class="form-group">
<label for="input-weigh" class="col-sm-2 control-label">权重</label>
<div class="col-md-6 col-sm-10">
<input type="number" class="form-control" id="input-weigh" name="weigh" value="0">
... ...
... ... @@ -22,11 +22,11 @@
<if condition="empty($cooperation.image)">
<img src="__TMPL__/public/assets/images/default-thumbnail.png"
id="thumbnail-preview"
width="135" height="60" style="cursor: pointer"/>
width="120" height="40" style="cursor: pointer"/>
<else/>
<img src="{:cmf_get_image_preview_url($cooperation.image)}"
id="thumbnail-preview"
width="135" height="60" style="cursor: pointer"/>
width="120" height="40" style="cursor: pointer"/>
</if>
</a>
<input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
... ... @@ -34,6 +34,12 @@
</div>
</div>
<div class="form-group">
<label for="thumbnail" class="col-sm-2 control-label"></label>
<div class="col-md-6 col-sm-10">
<span class="form-required">图片参考尺寸:120*40</span>
</div>
</div>
<div class="form-group">
<label for="input-weigh" class="col-sm-2 control-label">权重</label>
<div class="col-md-6 col-sm-10">
<input type="number" class="form-control" id="input-weigh" name="weigh" value="{$cooperation.weigh}">
... ...
... ... @@ -20,13 +20,19 @@
<a href="javascript:uploadOneImage('图片上传','#thumbnail');">
<img src="__TMPL__/public/assets/images/default-thumbnail.png"
id="thumbnail-preview"
width="135" height="135" style="cursor: pointer"/>
width="54" height="54" style="cursor: pointer"/>
</a>
<input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
<a href="javascript:uploadOneImage('图片上传','#thumbnail');">上传图片</a>
</div>
</div>
<div class="form-group">
<label for="thumbnail" class="col-sm-2 control-label"></label>
<div class="col-md-6 col-sm-10">
<span class="form-required">图片参考尺寸:54*54</span>
</div>
</div>
<div class="form-group">
<label for="input-weigh" class="col-sm-2 control-label">权重</label>
<div class="col-md-6 col-sm-10">
<input type="number" class="form-control" id="input-weigh" name="weigh" value="0">
... ...
... ... @@ -22,11 +22,11 @@
<if condition="empty($focus.image)">
<img src="__TMPL__/public/assets/images/default-thumbnail.png"
id="thumbnail-preview"
width="135" height="135" style="cursor: pointer"/>
width="54" height="54" style="cursor: pointer"/>
<else/>
<img src="{:cmf_get_image_preview_url($focus.image)}"
id="thumbnail-preview"
width="135" height="135" style="cursor: pointer"/>
width="54" height="54" style="cursor: pointer"/>
</if>
</a>
<input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
... ... @@ -34,6 +34,12 @@
</div>
</div>
<div class="form-group">
<label for="thumbnail" class="col-sm-2 control-label"></label>
<div class="col-md-6 col-sm-10">
<span class="form-required">图片参考尺寸:54*54</span>
</div>
</div>
<div class="form-group">
<label for="input-weigh" class="col-sm-2 control-label">权重</label>
<div class="col-md-6 col-sm-10">
<input type="number" class="form-control" id="input-weigh" name="weigh" value="{$focus.weigh}">
... ...
... ... @@ -20,8 +20,9 @@
<div class="container">
<div class="region">
<select name="city_id">
<option value="0">所有</option>
<volist name="city_name" id="vo">
<option value="{$vo.id}" <eq name="$city_id" value="$city_id">selected</eq>>{$vo.name}</option>
<option value="{$vo.id}" <eq name="$vo.id" value="$city_id">selected</eq>>{$vo.name}</option>
</volist>
</select>
</div>
... ... @@ -208,6 +209,23 @@
</div>
</div>
</volist>
<volist name="res_hwtt" id="vo">
<div class="swiper-slide">
<div class="Spot_item">
<a href="/portal/enjoy/getEnjoyDetail?id={$vo.id}">
<div class="Spot_top main_top"><img src="{:cmf_get_image_url($vo.thumbnail)}" alt=""></div>
<div class="Spot_bottom">
<div class="Spot_bottom_title">
{$vo.post_title}
</div>
<div class="Spot_bottom_main main_left">
{$vo.post_excerpt}
</div>
</div>
</a>
</div>
</div>
</volist>
</div>
</div>
</div>
... ...
... ... @@ -16,6 +16,9 @@
.star_ming{
cursor:pointer;
}
.swiper-container6{
overflow: hidden;
}
</style>
</head>
... ... @@ -28,8 +31,22 @@
<!-- 头部 -->
<include file="public@header"/>
<!-- banner -->
<div id="banner">
<img src="__TMPL__/public/assets/starImg/aicon_01.png" alt="">
<div id="banner" class="swiper-container6">
<div class="swiper-wrapper">
<div class="swiper-slide">
<img src="__TMPL__/public/assets/starImg/aicon_01.png" alt="">
</div>
<div class="swiper-slide">
<img src="__TMPL__/public/assets/starImg/aicon_01.png" alt="">
</div>
<div class="swiper-slide">
<img src="__TMPL__/public/assets/starImg/aicon_01.png" alt="">
</div>
</div>
<!--<div class="swiper-pagination">-->
<!--</div>-->
</div>
<!-- 首页主体内容 -->
... ... @@ -587,7 +604,7 @@
<div class="star_title clearfix">
<span>
<p>明星<i>访谈</i></p>
<p>Star Interview</p>
<p>STAR INTERVIEW</p>
</span>
</div>
<!-- 左侧头像 -->
... ... @@ -756,6 +773,28 @@
window.location.href = '/portal/region/getStarDetail?id='+id;
});
// swiper
// banner
var swiper = new Swiper('.swiper-container6', {
spaceBetween: 20,
centeredSlides: true,
autoplay: {
delay: 2500,
disableOnInteraction: false,
},
loop:true
// pagination: {
// el: '.swiper-pagination',
// clickable: true,
// },
// navigation: {
// nextEl: '.swiper-button-next',
// prevEl: '.swiper-button-prev',
// },
});
var swiper = new Swiper('.swiper-container', {
slidesPerView: 4,
spaceBetween: 53,
... ...
... ... @@ -44,13 +44,13 @@
</div>
<div class="Travel_right_spec_Contain clearfix">
<div class="Travel_right_spec_Contain_left fl">包含项目</div>
<div class="Travel_right_spec_Contain_right fl">{$res.project}</div>
<div class="Travel_right_spec_Contain_right fl" style="height: 57px;">{$res.project}</div>
</div>
<a href="{$res.pay_url}">
<div class="Travel_right_spec_pay">
<div class="Travel_right_spec_pay">
<a href="{$res.pay_url}">
立即前往购买
</div>
</a>
</a>
</div>
</div>
<div class="Travel_right_price">
<h2>商品售价:<p><span>{$res.price}</span></p>
... ...
... ... @@ -106,6 +106,9 @@ main {
.Travel_right_spec_Set_right,
.Travel_right_spec_Contain_right {
margin-left: 23px;
width: 267px;
overflow: hidden;
}
.Travel_right_price{
padding: 20px 0;
... ...
... ... @@ -139,6 +139,7 @@ main {
background-size: cover !important;
top: inherit !important;
bottom: 20px !important;
outline:none !important;
}
... ... @@ -314,11 +315,17 @@ main {
.Sport .swiper-slide-active .Spot_item,.swiper-slide-prev,.swiper-slide-prev .Spot_item{
height: 780px !important;
}
.Spot_item,.swiper-slide-prev,.swiper-slide-prev .Spot_item img{
max-width: 625px;
}
.main_top img{
max-width: 625px !important;
}
.Sport .swiper-slide-active,
.Sport .swiper-slide-active .Spot_item,
.Sport .swiper-slide-active .Spot_item .Spot_top img {
width: 648px !important;
max-width: 648px !important;
height:648px;
}
/*.swiper-slide-prev .Spot_item .Spot_top img{*/
... ... @@ -328,9 +335,11 @@ main {
.Sport .swiper-slide-next,
.Sport .swiper-slide-next .Spot_item {
width: 500px !important;
max-width: 500px !important;
}
.Sport .swiper-slide-next .Spot_item .Spot_top img {
width: 500px !important;
max-width: 500px !important;
height:500px;
}
.Sport .swiper-button-next,
... ...