作者 zhangwei
... ... @@ -230,10 +230,9 @@ class LoginController extends HomeBaseController
->join('city_category c','p.city_id = c.id','LEFT')
->join('portal_category_post c_p','p.id = c_p.post_id','LEFT')
->where('p.post_title','like','%'.$keyword.'%')
->where('c_p.category_id','<>',CityCategoryModel::xqyy)
->where('c_p.category_id','<>',CityCategoryModel::xyhl)
->where('p.delete_time', 0)
->field('p.id,p.post_title,p.post_excerpt,p.post_favorites,c.name city_name')
->field('p.id,p.post_title,p.post_excerpt,p.post_favorites,c.name city_name,c.id city_id')
->order('p.weigh desc')
->paginate($limit,false,['query'=>request()->param()]);
$data = $res->toArray();
... ... @@ -253,7 +252,7 @@ class LoginController extends HomeBaseController
foreach($category as $item){
if($value['id'] == $item['post_id']){
$value['category_name'] = $item['name'];
$value['post_url'] = $this->getDetailUrl($item['id']);
$value['post_url'] = $this->getDetailUrl($item['id'],$value['city_id']);
}
}
}
... ... @@ -263,7 +262,6 @@ class LoginController extends HomeBaseController
->alias('p')
->join('portal_category_post c_p','p.id = c_p.post_id','LEFT')
->where('p.post_title','like','%'.$keyword.'%')
->where('c_p.category_id','<>',CityCategoryModel::xqyy)
->where('c_p.category_id','<>',CityCategoryModel::xyhl)
->where('p.delete_time', 0)
->count();
... ... @@ -279,12 +277,15 @@ class LoginController extends HomeBaseController
}
//获取各个板块详情页位置
public function getDetailUrl($c_id){
public function getDetailUrl($c_id,$city_id){
$url = '';
switch ($c_id) {
case CityCategoryModel::xqgs:
$url = '/portal/star/getStoryDetail';
break;
case CityCategoryModel::xqyy:
$url = '/portal/region/getMoreVideo?city_id='.$city_id;
break;
case CityCategoryModel::whmj:
$url = '/portal/star/getSceneryDetail';
break;
... ...
... ... @@ -129,7 +129,7 @@ $(function(){
});
});
//关于我们
$('#about_us').click(function(){
$('#about_us,#about_us1').click(function(){
window.location.href = '/portal/index/aboutUs';
});
//搜索
... ...
... ... @@ -9,7 +9,7 @@
<!-- 关于我们 -->
<div class="about_top">
<!-- 标题 -->
<span class="title">
<span class="title" id="about_us1" style="cursor: pointer;">
<p class="ch">关于我们</p>
<p class="eg">About Us</p>
</span>
... ...
... ... @@ -28,7 +28,7 @@
<div class="hp_dyCon">
<ul>
<volist name="res['data']" id="vo">
<a href="/portal/star/getHotelDetail?id={$vo.id}">
<a href="/portal/star/getEcologyDetail?id={$vo.id}">
<li>
<div class="hp_dyConImg">
<img src="{:cmf_get_image_url($vo.thumbnail)}" alt="" />
... ...
... ... @@ -163,7 +163,7 @@ $(function() {
});
});
//关于我们
$('#about_us').click(function() {
$('#about_us,#about_us1').click(function() {
window.location.href = '/portal/index/aboutUs';
});
//搜索
... ...
... ... @@ -2,7 +2,7 @@
<link rel="stylesheet" href="__TMPL__/public/assets/css/footer.css">
<div class="bottom_nav">
<div class="bottom_nav_title">
<div class="bottom_nav_ch">关于我们</div>
<div class="bottom_nav_ch" id="about_us1">关于我们</div>
<div class="bottom_nav_en">About Us</div>
</div>
<div class="bottom_nav_contant">
... ...