正在显示
3 个修改的文件
包含
5 行增加
和
5 行删除
@@ -45,13 +45,13 @@ class AboutController extends HomeBaseController{ | @@ -45,13 +45,13 @@ class AboutController extends HomeBaseController{ | ||
45 | //显示核心团队 | 45 | //显示核心团队 |
46 | public function team(){ | 46 | public function team(){ |
47 | 47 | ||
48 | - $data = Db::name('portal_category_post') -> alias('a') -> join('portal_post b','a.post_id = b.id','LEFT') -> where('a.category_id',34) -> select(); | 48 | + $data = Db::name('portal_category_post') -> alias('a') -> join('portal_post b','a.post_id = b.id','LEFT') -> where('a.category_id=34 and b.delete_time=0') -> select(); |
49 | /* foreach ($data as $key => $value){ | 49 | /* foreach ($data as $key => $value){ |
50 | $value['post_content'] = cmf_replace_content_file_url(htmlspecialchars_decode($value['post_content'])); | 50 | $value['post_content'] = cmf_replace_content_file_url(htmlspecialchars_decode($value['post_content'])); |
51 | }*/ | 51 | }*/ |
52 | $this -> assign('data',$data); | 52 | $this -> assign('data',$data); |
53 | 53 | ||
54 | - $data1 = Db::name('portal_category_post') -> alias('a') -> join('portal_post b','a.post_id = b.id','LEFT') -> where('a.category_id',35) -> select(); | 54 | + $data1 = Db::name('portal_category_post') -> alias('a') -> join('portal_post b','a.post_id = b.id','LEFT') -> where('a.category_id=35 and b.delete_time=0') -> select(); |
55 | $this -> assign('data1',$data1); | 55 | $this -> assign('data1',$data1); |
56 | return $this -> fetch(); | 56 | return $this -> fetch(); |
57 | 57 |
@@ -40,7 +40,7 @@ class IndexController extends HomeBaseController | @@ -40,7 +40,7 @@ class IndexController extends HomeBaseController | ||
40 | $this -> assign('fuwu_data',$fuwu_data); | 40 | $this -> assign('fuwu_data',$fuwu_data); |
41 | 41 | ||
42 | //首页澳德咨询 | 42 | //首页澳德咨询 |
43 | - $new_data = Db::name('portal_category_post') -> alias('a') -> join('portal_post b','a.post_id=b.id','LEFT') -> where('category_id',22) -> order('b.id desc') -> limit(5) -> select(); | 43 | + $new_data = Db::name('portal_category_post') -> alias('a') -> join('portal_post b','a.post_id=b.id','LEFT') -> where('category_id = 22 and delete_time = 0') -> order('b.id desc') -> limit(5) -> select(); |
44 | $this -> assign('new_data',$new_data[0]); | 44 | $this -> assign('new_data',$new_data[0]); |
45 | 45 | ||
46 | foreach ($new_data as $key => $val){ | 46 | foreach ($new_data as $key => $val){ |
@@ -10,7 +10,7 @@ class NewController extends HomeBaseController{ | @@ -10,7 +10,7 @@ class NewController extends HomeBaseController{ | ||
10 | //显示澳德新闻列表 | 10 | //显示澳德新闻列表 |
11 | public function aonew(){ | 11 | public function aonew(){ |
12 | 12 | ||
13 | - $new_data = Db::name('portal_category_post') -> alias('a') -> join('portal_post b','a.post_id=b.id','LEFT') -> where("a.category_id=22") -> paginate(8); | 13 | + $new_data = Db::name('portal_category_post') -> alias('a') -> join('portal_post b','a.post_id=b.id','LEFT') -> where("a.category_id=22 and b.delete_time=0") -> paginate(8); |
14 | $this -> assign('data',$new_data); | 14 | $this -> assign('data',$new_data); |
15 | return $this -> fetch(); | 15 | return $this -> fetch(); |
16 | 16 | ||
@@ -40,7 +40,7 @@ class NewController extends HomeBaseController{ | @@ -40,7 +40,7 @@ class NewController extends HomeBaseController{ | ||
40 | //显示行业动向新闻列表 | 40 | //显示行业动向新闻列表 |
41 | public function indu_new(){ | 41 | public function indu_new(){ |
42 | 42 | ||
43 | - $new_data = Db::name('portal_category_post') -> alias('a') -> join('portal_post b','a.post_id=b.id','LEFT') -> where("a.category_id=23") -> paginate(8); | 43 | + $new_data = Db::name('portal_category_post') -> alias('a') -> join('portal_post b','a.post_id=b.id','LEFT') -> where("a.category_id=23 and b.delete_time=0") -> paginate(8); |
44 | $this -> assign('data',$new_data); | 44 | $this -> assign('data',$new_data); |
45 | return $this -> fetch(); | 45 | return $this -> fetch(); |
46 | 46 |
-
请 注册 或 登录 后发表评论