diff --git a/README.md b/README.md index f33583de..4376bfcf 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ FastAdmin是一款基于ThinkPHP5+Bootstrap的极速后台管理系统。 * 基于`Less`进行样式开发 * 基于`Bower`进行前端组件包管理 * 数据库表一键生成`CRUD`,包括控制器、模型、视图、JS、语言包 +* 一键压缩打包JS和CSS文件 * 多语言支持,服务端及客户端支持 * 无缝整合又拍云上传功能 * 第三方登录(QQ、微信、微博)整合 diff --git a/application/admin/command/Crud/stubs/index.stub b/application/admin/command/Crud/stubs/index.stub index f9ca18d2..d3eefa4f 100644 --- a/application/admin/command/Crud/stubs/index.stub +++ b/application/admin/command/Crud/stubs/index.stub @@ -10,8 +10,8 @@
diff --git a/application/admin/controller/Ajax.php b/application/admin/controller/Ajax.php index 92f52791..29335409 100644 --- a/application/admin/controller/Ajax.php +++ b/application/admin/controller/Ajax.php @@ -71,8 +71,8 @@ class Ajax extends Backend $controllername = input("controllername"); Lang::load(APP_PATH . $modulename . '/lang/' . Lang::detect() . '/' . str_replace('.', '/', $controllername) . '.php'); //强制输出JSON Object -// $result = 'define(' . json_encode(Lang::get(), JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE) . ');'; - return jsonp(Lang::get()); + $result = 'define(' . json_encode(Lang::get(), JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE) . ');'; + return $result; } /** diff --git a/application/admin/controller/Category.php b/application/admin/controller/Category.php new file mode 100644 index 00000000..c0a5e81a --- /dev/null +++ b/application/admin/controller/Category.php @@ -0,0 +1,56 @@ +model = model('Category'); + + $tree = Tree::instance(); + $tree->init(CategoryModel::getCategoryArray(), 'pid'); + $this->categorylist = $tree->getTreeList($tree->getTreeArray(0), 'name'); + $categorydata = [0 => __('None')]; + foreach ($this->categorylist as $k => $v) + { + $categorydata[$v['id']] = $v['name']; + } + $this->view->assign("typelist", CategoryModel::getTypeList()); + $this->view->assign("parentlist", $categorydata); + } + + /** + * 查看 + */ + public function index() + { + if ($this->request->isAjax()) + { + + //构造父类select列表选项数据 + $list = $this->categorylist; + $total = count($list); + $result = array("total" => $total, "rows" => $list); + + return json($result); + } + return $this->view->fetch(); + } + +} diff --git a/application/admin/lang/zh-cn.php b/application/admin/lang/zh-cn.php index 24db85d2..af8992e7 100644 --- a/application/admin/lang/zh-cn.php +++ b/application/admin/lang/zh-cn.php @@ -90,6 +90,8 @@ return [ '%d month%s ago' => '%d月前', '%d year%s ago' => '%d年前', // + 'Set to normal' => '设为正常', + 'Set to hidden' => '设为隐藏', 'Invalid parameters' => '未知参数', 'No results were found' => '记录未找到', 'Parameter %s can not be empty' => '参数%s不能为空', diff --git a/application/admin/model/Page.php b/application/admin/model/Page.php deleted file mode 100644 index fe5b6821..00000000 --- a/application/admin/model/Page.php +++ /dev/null @@ -1,16 +0,0 @@ - +