NewController.php
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
namespace app\portal\controller;
use cmf\controller\HomeBaseController;
use EasyWeChat\Foundation\Application;
use think\Db;
class NewController extends HomeBaseController{
//显示澳德新闻列表
public function aonew(){
$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);
$this -> assign('data',$new_data);
return $this -> fetch();
}
//显示新闻内容页
public function new_content(){
$id = $this -> request -> param();
$data = Db::name('portal_post') -> where('id',$id['id']) -> find();
$data['post_content'] = cmf_replace_content_file_url(htmlspecialchars_decode($data['post_content']));
$this -> assign('data',$data);
return $this -> fetch();
}
public function indu_new_content(){
$id = $this -> request -> param();
$data = Db::name('portal_post') -> where('id',$id['id']) -> find();
$data['post_content'] = cmf_replace_content_file_url(htmlspecialchars_decode($data['post_content']));
$this -> assign('data',$data);
return $this -> fetch();
}
//显示行业动向新闻列表
public function indu_new(){
$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);
$this -> assign('data',$new_data);
return $this -> fetch();
}
}