正在显示
2 个修改的文件
包含
4 行增加
和
3 行删除
@@ -11,6 +11,8 @@ namespace app\portal\controller; | @@ -11,6 +11,8 @@ namespace app\portal\controller; | ||
11 | 11 | ||
12 | use app\portal\model\EquipmentModel; | 12 | use app\portal\model\EquipmentModel; |
13 | use cmf\controller\AdminBaseController; | 13 | use cmf\controller\AdminBaseController; |
14 | +use think\Db; | ||
15 | + | ||
14 | /** | 16 | /** |
15 | * Class AdminFaultController | 17 | * Class AdminFaultController |
16 | * @package app\portal\controller | 18 | * @package app\portal\controller |
@@ -27,8 +29,7 @@ use cmf\controller\AdminBaseController; | @@ -27,8 +29,7 @@ use cmf\controller\AdminBaseController; | ||
27 | class AdminFaultController extends AdminBaseController{ | 29 | class AdminFaultController extends AdminBaseController{ |
28 | 30 | ||
29 | public function index(){ | 31 | public function index(){ |
30 | - $Equipment=new EquipmentModel(); | ||
31 | - $data=$Equipment->paginate(10); | 32 | + $data=Db::name('fault')->order('create_time','desc')->paginate(10); |
32 | $this->assign('data',$data); | 33 | $this->assign('data',$data); |
33 | return $this->fetch(); | 34 | return $this->fetch(); |
34 | } | 35 | } |
-
请 注册 或 登录 后发表评论