<?php
/**
 *  ╔═══════════════════════════════════════════════════╗
 *  ║                                                   ║
 *  ║     ██╗  ██╗   █████╗    ██████╗                  ║
 *  ║     ██║  ██║  ██╔══██╗  ██╔═══██╗                 ║
 *  ║     ███████║  ███████║  ██║   ██║                 ║
 *  ║     ██╔══██║  ██╔══██║  ██║   ██║                 ║
 *  ║     ██║  ██║  ██║  ██║  ╚██████╔╝   SNS           ║
 *  ║                                                   ║    
 *  ║                                                   ║    
 *  ║     © 2023 HaoSNS™ All Rights Reserved            ║
 *  ║     官方网站: https://www.haosns.com                *
 *  ║     本代码由赣州乐易网络科技有限公司®提供             *
 *  ║                                                    *
 *  ║   未经授权禁止复制、传播或用于其他商业目的            *
 *  ║                                                   ║
 *  ╚═══════════════════════════════════════════════════╝
 */
namespace app\api\controller\twoshop;

use app\common\model\TwoGoodsCategory;


/**
 * 商品接口控制器
 * Class GoodsController
 * @package app\api\controller
 */
class Category  extends \app\api\controller\BaseShopController
{
    public array $notNeedLogin = ['list'];

    /**
     * 分类列表
     */
    public function list()
    {
       $list = TwoGoodsCategory::where('is_show',1)->order('sort','desc')->select()->toArray();

       $list = buildTree($list);

       return show(1,'分类列表',$list);
    }




    

}