宝体数据调用接口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
627 B

<?php
namespace app\api\controller;
use app\api\model\Category as CategoryModel;
use app\api\model\WxappCategory as WxappCategoryModel;
/**
* 商品分类控制器
* Class Goods
* @package app\api\controller
*/
class Category extends Controller
{
/**
* 分类页面
* @return array
* @throws \think\exception\DbException
*/
public function index()
{
// 分类模板
$templet = WxappCategoryModel::detail();
// 商品分类列表
$list = array_values(CategoryModel::getCacheTree());
return $this->renderSuccess(compact('templet', 'list'));
}
}