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

修改样式及图片尺寸

@@ -21,7 +21,7 @@ class EnjoyController extends HomeBaseController @@ -21,7 +21,7 @@ class EnjoyController extends HomeBaseController
21 public function index(){ 21 public function index(){
22 //按照城市查询 22 //按照城市查询
23 //默认澳大利亚 23 //默认澳大利亚
24 - $city_id = $this->request->param('city_id',35,'intval'); 24 + $city_id = $this->request->param('city_id',0,'intval');
25 $position['city_id'] = $city_id; 25 $position['city_id'] = $city_id;
26 $this->assign('city_id',$city_id); 26 $this->assign('city_id',$city_id);
27 //城市分类 27 //城市分类
@@ -74,10 +74,15 @@ class EnjoyController extends HomeBaseController @@ -74,10 +74,15 @@ class EnjoyController extends HomeBaseController
74 ->toArray(); 74 ->toArray();
75 $post_id = array_column($post_id,'post_id'); 75 $post_id = array_column($post_id,'post_id');
76 //查询文章 76 //查询文章
  77 + if($position['city_id'] == 0){
  78 + //所有
  79 + $where = ['delete_time'=>0];
  80 + }else{
  81 + $where = ['city_id'=>$position['city_id'],'delete_time'=>0];
  82 + }
77 $res = Db::table($pre.'portal_post') 83 $res = Db::table($pre.'portal_post')
78 ->whereIn('id',$post_id) 84 ->whereIn('id',$post_id)
79 - ->where('city_id',$position['city_id'])  
80 - ->where('delete_time', 0) 85 + ->where($where)
81 ->field($field) 86 ->field($field)
82 ->limit($limit) 87 ->limit($limit)
83 ->order('weigh desc') 88 ->order('weigh desc')
@@ -85,6 +85,9 @@ @@ -85,6 +85,9 @@
85 </div> 85 </div>
86 </td> 86 </td>
87 </tr> 87 </tr>
  88 + <tr>
  89 +
  90 + </tr>
88 </table> 91 </table>
89 92
90 <hook name="portal_admin_article_edit_view_right_sidebar"/> 93 <hook name="portal_admin_article_edit_view_right_sidebar"/>
@@ -20,13 +20,19 @@ @@ -20,13 +20,19 @@
20 <a href="javascript:uploadOneImage('图片上传','#thumbnail');"> 20 <a href="javascript:uploadOneImage('图片上传','#thumbnail');">
21 <img src="__TMPL__/public/assets/images/default-thumbnail.png" 21 <img src="__TMPL__/public/assets/images/default-thumbnail.png"
22 id="thumbnail-preview" 22 id="thumbnail-preview"
23 - width="135" height="60" style="cursor: pointer"/> 23 + width="120" height="40" style="cursor: pointer"/>
24 </a> 24 </a>
25 <input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片"> 25 <input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
26 <a href="javascript:uploadOneImage('图片上传','#thumbnail');">上传图片</a> 26 <a href="javascript:uploadOneImage('图片上传','#thumbnail');">上传图片</a>
27 </div> 27 </div>
28 </div> 28 </div>
29 <div class="form-group"> 29 <div class="form-group">
  30 + <label for="thumbnail" class="col-sm-2 control-label"></label>
  31 + <div class="col-md-6 col-sm-10">
  32 + <span class="form-required">图片参考尺寸:120*40</span>
  33 + </div>
  34 + </div>
  35 + <div class="form-group">
30 <label for="input-weigh" class="col-sm-2 control-label">权重</label> 36 <label for="input-weigh" class="col-sm-2 control-label">权重</label>
31 <div class="col-md-6 col-sm-10"> 37 <div class="col-md-6 col-sm-10">
32 <input type="number" class="form-control" id="input-weigh" name="weigh" value="0"> 38 <input type="number" class="form-control" id="input-weigh" name="weigh" value="0">
@@ -22,11 +22,11 @@ @@ -22,11 +22,11 @@
22 <if condition="empty($cooperation.image)"> 22 <if condition="empty($cooperation.image)">
23 <img src="__TMPL__/public/assets/images/default-thumbnail.png" 23 <img src="__TMPL__/public/assets/images/default-thumbnail.png"
24 id="thumbnail-preview" 24 id="thumbnail-preview"
25 - width="135" height="60" style="cursor: pointer"/> 25 + width="120" height="40" style="cursor: pointer"/>
26 <else/> 26 <else/>
27 <img src="{:cmf_get_image_preview_url($cooperation.image)}" 27 <img src="{:cmf_get_image_preview_url($cooperation.image)}"
28 id="thumbnail-preview" 28 id="thumbnail-preview"
29 - width="135" height="60" style="cursor: pointer"/> 29 + width="120" height="40" style="cursor: pointer"/>
30 </if> 30 </if>
31 </a> 31 </a>
32 <input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片"> 32 <input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
@@ -34,6 +34,12 @@ @@ -34,6 +34,12 @@
34 </div> 34 </div>
35 </div> 35 </div>
36 <div class="form-group"> 36 <div class="form-group">
  37 + <label for="thumbnail" class="col-sm-2 control-label"></label>
  38 + <div class="col-md-6 col-sm-10">
  39 + <span class="form-required">图片参考尺寸:120*40</span>
  40 + </div>
  41 + </div>
  42 + <div class="form-group">
37 <label for="input-weigh" class="col-sm-2 control-label">权重</label> 43 <label for="input-weigh" class="col-sm-2 control-label">权重</label>
38 <div class="col-md-6 col-sm-10"> 44 <div class="col-md-6 col-sm-10">
39 <input type="number" class="form-control" id="input-weigh" name="weigh" value="{$cooperation.weigh}"> 45 <input type="number" class="form-control" id="input-weigh" name="weigh" value="{$cooperation.weigh}">
@@ -20,13 +20,19 @@ @@ -20,13 +20,19 @@
20 <a href="javascript:uploadOneImage('图片上传','#thumbnail');"> 20 <a href="javascript:uploadOneImage('图片上传','#thumbnail');">
21 <img src="__TMPL__/public/assets/images/default-thumbnail.png" 21 <img src="__TMPL__/public/assets/images/default-thumbnail.png"
22 id="thumbnail-preview" 22 id="thumbnail-preview"
23 - width="135" height="135" style="cursor: pointer"/> 23 + width="54" height="54" style="cursor: pointer"/>
24 </a> 24 </a>
25 <input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片"> 25 <input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
26 <a href="javascript:uploadOneImage('图片上传','#thumbnail');">上传图片</a> 26 <a href="javascript:uploadOneImage('图片上传','#thumbnail');">上传图片</a>
27 </div> 27 </div>
28 </div> 28 </div>
29 <div class="form-group"> 29 <div class="form-group">
  30 + <label for="thumbnail" class="col-sm-2 control-label"></label>
  31 + <div class="col-md-6 col-sm-10">
  32 + <span class="form-required">图片参考尺寸:54*54</span>
  33 + </div>
  34 + </div>
  35 + <div class="form-group">
30 <label for="input-weigh" class="col-sm-2 control-label">权重</label> 36 <label for="input-weigh" class="col-sm-2 control-label">权重</label>
31 <div class="col-md-6 col-sm-10"> 37 <div class="col-md-6 col-sm-10">
32 <input type="number" class="form-control" id="input-weigh" name="weigh" value="0"> 38 <input type="number" class="form-control" id="input-weigh" name="weigh" value="0">
@@ -22,11 +22,11 @@ @@ -22,11 +22,11 @@
22 <if condition="empty($focus.image)"> 22 <if condition="empty($focus.image)">
23 <img src="__TMPL__/public/assets/images/default-thumbnail.png" 23 <img src="__TMPL__/public/assets/images/default-thumbnail.png"
24 id="thumbnail-preview" 24 id="thumbnail-preview"
25 - width="135" height="135" style="cursor: pointer"/> 25 + width="54" height="54" style="cursor: pointer"/>
26 <else/> 26 <else/>
27 <img src="{:cmf_get_image_preview_url($focus.image)}" 27 <img src="{:cmf_get_image_preview_url($focus.image)}"
28 id="thumbnail-preview" 28 id="thumbnail-preview"
29 - width="135" height="135" style="cursor: pointer"/> 29 + width="54" height="54" style="cursor: pointer"/>
30 </if> 30 </if>
31 </a> 31 </a>
32 <input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片"> 32 <input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
@@ -34,6 +34,12 @@ @@ -34,6 +34,12 @@
34 </div> 34 </div>
35 </div> 35 </div>
36 <div class="form-group"> 36 <div class="form-group">
  37 + <label for="thumbnail" class="col-sm-2 control-label"></label>
  38 + <div class="col-md-6 col-sm-10">
  39 + <span class="form-required">图片参考尺寸:54*54</span>
  40 + </div>
  41 + </div>
  42 + <div class="form-group">
37 <label for="input-weigh" class="col-sm-2 control-label">权重</label> 43 <label for="input-weigh" class="col-sm-2 control-label">权重</label>
38 <div class="col-md-6 col-sm-10"> 44 <div class="col-md-6 col-sm-10">
39 <input type="number" class="form-control" id="input-weigh" name="weigh" value="{$focus.weigh}"> 45 <input type="number" class="form-control" id="input-weigh" name="weigh" value="{$focus.weigh}">
@@ -20,8 +20,9 @@ @@ -20,8 +20,9 @@
20 <div class="container"> 20 <div class="container">
21 <div class="region"> 21 <div class="region">
22 <select name="city_id"> 22 <select name="city_id">
  23 + <option value="0">所有</option>
23 <volist name="city_name" id="vo"> 24 <volist name="city_name" id="vo">
24 - <option value="{$vo.id}" <eq name="$city_id" value="$city_id">selected</eq>>{$vo.name}</option> 25 + <option value="{$vo.id}" <eq name="$vo.id" value="$city_id">selected</eq>>{$vo.name}</option>
25 </volist> 26 </volist>
26 </select> 27 </select>
27 </div> 28 </div>
@@ -208,6 +209,23 @@ @@ -208,6 +209,23 @@
208 </div> 209 </div>
209 </div> 210 </div>
210 </volist> 211 </volist>
  212 + <volist name="res_hwtt" id="vo">
  213 + <div class="swiper-slide">
  214 + <div class="Spot_item">
  215 + <a href="/portal/enjoy/getEnjoyDetail?id={$vo.id}">
  216 + <div class="Spot_top main_top"><img src="{:cmf_get_image_url($vo.thumbnail)}" alt=""></div>
  217 + <div class="Spot_bottom">
  218 + <div class="Spot_bottom_title">
  219 + {$vo.post_title}
  220 + </div>
  221 + <div class="Spot_bottom_main main_left">
  222 + {$vo.post_excerpt}
  223 + </div>
  224 + </div>
  225 + </a>
  226 + </div>
  227 + </div>
  228 + </volist>
211 </div> 229 </div>
212 </div> 230 </div>
213 </div> 231 </div>
@@ -16,6 +16,9 @@ @@ -16,6 +16,9 @@
16 .star_ming{ 16 .star_ming{
17 cursor:pointer; 17 cursor:pointer;
18 } 18 }
  19 + .swiper-container6{
  20 + overflow: hidden;
  21 + }
19 </style> 22 </style>
20 </head> 23 </head>
21 24
@@ -28,8 +31,22 @@ @@ -28,8 +31,22 @@
28 <!-- 头部 --> 31 <!-- 头部 -->
29 <include file="public@header"/> 32 <include file="public@header"/>
30 <!-- banner --> 33 <!-- banner -->
31 - <div id="banner">  
32 - <img src="__TMPL__/public/assets/starImg/aicon_01.png" alt=""> 34 + <div id="banner" class="swiper-container6">
  35 + <div class="swiper-wrapper">
  36 + <div class="swiper-slide">
  37 + <img src="__TMPL__/public/assets/starImg/aicon_01.png" alt="">
  38 + </div>
  39 + <div class="swiper-slide">
  40 + <img src="__TMPL__/public/assets/starImg/aicon_01.png" alt="">
  41 + </div>
  42 + <div class="swiper-slide">
  43 + <img src="__TMPL__/public/assets/starImg/aicon_01.png" alt="">
  44 + </div>
  45 + </div>
  46 + <!--<div class="swiper-pagination">-->
  47 +
  48 + <!--</div>-->
  49 +
33 </div> 50 </div>
34 51
35 <!-- 首页主体内容 --> 52 <!-- 首页主体内容 -->
@@ -587,7 +604,7 @@ @@ -587,7 +604,7 @@
587 <div class="star_title clearfix"> 604 <div class="star_title clearfix">
588 <span> 605 <span>
589 <p>明星<i>访谈</i></p> 606 <p>明星<i>访谈</i></p>
590 - <p>Star Interview</p> 607 + <p>STAR INTERVIEW</p>
591 </span> 608 </span>
592 </div> 609 </div>
593 <!-- 左侧头像 --> 610 <!-- 左侧头像 -->
@@ -756,6 +773,28 @@ @@ -756,6 +773,28 @@
756 window.location.href = '/portal/region/getStarDetail?id='+id; 773 window.location.href = '/portal/region/getStarDetail?id='+id;
757 }); 774 });
758 // swiper 775 // swiper
  776 +// banner
  777 +
  778 +
  779 + var swiper = new Swiper('.swiper-container6', {
  780 + spaceBetween: 20,
  781 + centeredSlides: true,
  782 + autoplay: {
  783 + delay: 2500,
  784 + disableOnInteraction: false,
  785 + },
  786 + loop:true
  787 +// pagination: {
  788 +// el: '.swiper-pagination',
  789 +// clickable: true,
  790 +// },
  791 +// navigation: {
  792 +// nextEl: '.swiper-button-next',
  793 +// prevEl: '.swiper-button-prev',
  794 +// },
  795 + });
  796 +
  797 +
759 var swiper = new Swiper('.swiper-container', { 798 var swiper = new Swiper('.swiper-container', {
760 slidesPerView: 4, 799 slidesPerView: 4,
761 spaceBetween: 53, 800 spaceBetween: 53,
@@ -44,13 +44,13 @@ @@ -44,13 +44,13 @@
44 </div> 44 </div>
45 <div class="Travel_right_spec_Contain clearfix"> 45 <div class="Travel_right_spec_Contain clearfix">
46 <div class="Travel_right_spec_Contain_left fl">包含项目</div> 46 <div class="Travel_right_spec_Contain_left fl">包含项目</div>
47 - <div class="Travel_right_spec_Contain_right fl">{$res.project}</div> 47 + <div class="Travel_right_spec_Contain_right fl" style="height: 57px;">{$res.project}</div>
48 </div> 48 </div>
49 - <a href="{$res.pay_url}">  
50 - <div class="Travel_right_spec_pay"> 49 + <div class="Travel_right_spec_pay">
  50 + <a href="{$res.pay_url}">
51 立即前往购买 51 立即前往购买
52 - </div>  
53 - </a> 52 + </a>
  53 + </div>
54 </div> 54 </div>
55 <div class="Travel_right_price"> 55 <div class="Travel_right_price">
56 <h2>商品售价:<p><span>{$res.price}</span></p> 56 <h2>商品售价:<p><span>{$res.price}</span></p>
@@ -106,6 +106,9 @@ main { @@ -106,6 +106,9 @@ main {
106 .Travel_right_spec_Set_right, 106 .Travel_right_spec_Set_right,
107 .Travel_right_spec_Contain_right { 107 .Travel_right_spec_Contain_right {
108 margin-left: 23px; 108 margin-left: 23px;
  109 + width: 267px;
  110 +
  111 + overflow: hidden;
109 } 112 }
110 .Travel_right_price{ 113 .Travel_right_price{
111 padding: 20px 0; 114 padding: 20px 0;
@@ -139,6 +139,7 @@ main { @@ -139,6 +139,7 @@ main {
139 background-size: cover !important; 139 background-size: cover !important;
140 top: inherit !important; 140 top: inherit !important;
141 bottom: 20px !important; 141 bottom: 20px !important;
  142 + outline:none !important;
142 143
143 } 144 }
144 145
@@ -314,11 +315,17 @@ main { @@ -314,11 +315,17 @@ main {
314 .Sport .swiper-slide-active .Spot_item,.swiper-slide-prev,.swiper-slide-prev .Spot_item{ 315 .Sport .swiper-slide-active .Spot_item,.swiper-slide-prev,.swiper-slide-prev .Spot_item{
315 height: 780px !important; 316 height: 780px !important;
316 } 317 }
317 - 318 +.Spot_item,.swiper-slide-prev,.swiper-slide-prev .Spot_item img{
  319 + max-width: 625px;
  320 +}
  321 +.main_top img{
  322 + max-width: 625px !important;
  323 +}
318 .Sport .swiper-slide-active, 324 .Sport .swiper-slide-active,
319 .Sport .swiper-slide-active .Spot_item, 325 .Sport .swiper-slide-active .Spot_item,
320 .Sport .swiper-slide-active .Spot_item .Spot_top img { 326 .Sport .swiper-slide-active .Spot_item .Spot_top img {
321 width: 648px !important; 327 width: 648px !important;
  328 + max-width: 648px !important;
322 height:648px; 329 height:648px;
323 } 330 }
324 /*.swiper-slide-prev .Spot_item .Spot_top img{*/ 331 /*.swiper-slide-prev .Spot_item .Spot_top img{*/
@@ -328,9 +335,11 @@ main { @@ -328,9 +335,11 @@ main {
328 .Sport .swiper-slide-next, 335 .Sport .swiper-slide-next,
329 .Sport .swiper-slide-next .Spot_item { 336 .Sport .swiper-slide-next .Spot_item {
330 width: 500px !important; 337 width: 500px !important;
  338 + max-width: 500px !important;
331 } 339 }
332 .Sport .swiper-slide-next .Spot_item .Spot_top img { 340 .Sport .swiper-slide-next .Spot_item .Spot_top img {
333 width: 500px !important; 341 width: 500px !important;
  342 + max-width: 500px !important;
334 height:500px; 343 height:500px;
335 } 344 }
336 .Sport .swiper-button-next, 345 .Sport .swiper-button-next,