<?php
// +----------------------------------------------------------------------
// | A3Mall
// +----------------------------------------------------------------------
// | Copyright (c) 2020 http://www.a3-mall.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: xzncit <158373108@qq.com>
// +----------------------------------------------------------------------

namespace app\adminapi\controller;

use app\adminapi\service\Products as ProductsService;
use think\facade\Request;

/**
 * @package app\adminapi\controller
 * @class Products
 * @author xzncit 2024-02-20
 */
class Products extends Controller {

    public $auth = [
        'except'=>['index']
    ];

    /**
     * 获取商品下所有规格
     * @return \think\response\Json
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function index(){
        return returnAjax("msg:ok",1,ProductsService::getList(Request::param("id")));
    }

}