123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace app\api\controller;
- /**
-
- *
-
- *
- * ----------------------------------------------------------------------------
- *
-
- * 文章分类控制器
- */
- class Articleclass extends MobileMall
- {
- public function initialize()
- {
- parent::initialize(); // TODO: Change the autogenerated stub
- }
- /**
- * @api {POST} api/Articleclass/index 文章分类
- * @apiVersion 1.0.0
- * @apiGroup Articleclass
- *
- * @apiSuccess {String} code 返回码,10000为成功
- * @apiSuccess {String} message 返回消息
- * @apiSuccess {Object} result 返回数据
- * @apiSuccess {Object[]} result.article_class 文章分类列表
- * @apiSuccess {String} result.article_class.ac_code 文章分类代码
- * @apiSuccess {String} result.article_class.ac_id 文章分类ID
- * @apiSuccess {String} result.article_class.ac_name 文章分类名称
- * @apiSuccess {String} result.article_class.ac_parent_id 文章上级分类ID
- * @apiSuccess {String} result.article_class.ac_sort 文章分类排序
- */
- public function index()
- {
- $cache_key = "api-articleclass";
- $article_class = rcache($cache_key);
- if (empty($article_class)) {
- $articleclass_model = model('articleclass');
- $condition = array();
- $article_class = $articleclass_model->getArticleclassList($condition);
- wcache($cache_key, $article_class);
- }
- ds_json_encode(10000, '', array('article_class' => $article_class));
- }
- }
|