| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- // +----------------------------------------------------------------------
- // |
- // +----------------------------------------------------------------------
- // |
- // +----------------------------------------------------------------------
- // |
- // +----------------------------------------------------------------------
- // |
- // +----------------------------------------------------------------------
- // +----------------------------------------------------------------------
- // | 友情链接管理
- // +----------------------------------------------------------------------
- namespace app\admin\controller\links;
- use app\admin\model\links\Terms as TermsModel;
- use app\common\controller\Backend;
- /**
- * 友情链接管理
- */
- class Terms extends Backend
- {
- protected function initialize()
- {
- parent::initialize();
- $this->modelClass = new TermsModel;
- }
- //分类管理
- public function index()
- {
- if ($this->request->isAjax()) {
- [$page, $limit, $where, $sort, $order] = $this->buildTableParames();
- $count = $this->modelClass
- ->where($where)
- ->where("module", "links")
- ->order($sort, $order)
- ->count();
- $data = $this->modelClass
- ->where($where)
- ->where("module", "links")
- ->order($sort, $order)
- ->page($page, $limit)
- ->select();
- $result = ["code" => 0, 'count' => $count, 'data' => $data];
- return json($result);
- }
- return $this->fetch();
- }
- }
|