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


namespace app\api\controller;

use app\api\lists\ArticleLists;
use app\common\logic\ChatLogic;
use app\api\logic\DecorateThemeLogic;
use app\api\logic\IndexLogic;

/**
 * 首页
 * Class IndexController
 * @package app\api\controller
 */
class Nav extends BaseShopController
{

    public array $notNeedLogin = ['list'];

    public function list()
    {

        $params = $this->request->get();
        $where = [];

        if(isset($params['location'])){
            $where['location'] = $params['location'];
        }

        $list = \app\common\model\Nav::where($where)
        ->where('status',1)
        ->order('sort','desc')
        ->select()
        ->toArray();

        return show(config('status.success'),'',$list);

    }

}
