<?php
namespace app\shop\admin;
use app\system\admin\Admin;
use app\shop\model\Shop as ShopModel;
class Index extends Admin
{
protected $hisiModel = 'Shop' protected $hisiTable = '' protected $hisiAddScene = '' protected $hisiEditScene = ''
public function index()
{
if ($this->request->isAjax()) {
$where = [];
$page = $this->request->param('page/d', 1);
$limit = $this->request->param('limit/d', 15);
$data['data'] = ShopModel::where($where)
->page($page)
->limit($limit)
->order('id desc')
->select();
$data['count'] = ShopModel::where($where)->count('id');
$data['code'] = 0;
return json($data);
}
return $this->fetch();
}
}