manghe/app/api/controller/Config.php
2025-03-22 00:27:51 +00:00

31 lines
680 B
PHP

<?php
declare (strict_types=1);
namespace app\api\controller;
use app\api\controller\Base;
use think\facade\Db;
use \think\Request;
class Config extends Base
{
/**
* 配置信息接口
* 返回盒子类型等配置信息
*/
public function index()
{
// 查询盒子类型数据
$goodsTypeList = Db::name('goods_type')
->field('value, sort_order, name')
->where('is_show', 1)
->order('sort_order')
->select()
->toArray();
// 返回数据
return $this->renderSuccess('获取成功', [
'good_type' => $goodsTypeList
]);
}
}