29 lines
592 B
PHP
29 lines
592 B
PHP
|
<?php
|
||
|
|
||
|
namespace app\api\controller;
|
||
|
|
||
|
use app\common\model\category_business\CategoryBusiness;
|
||
|
|
||
|
/**
|
||
|
* 商机分类
|
||
|
* Class SmsController
|
||
|
* @package app\api\controller
|
||
|
*/
|
||
|
class CategoryBusinessController extends BaseApiController
|
||
|
{
|
||
|
|
||
|
public array $notNeedLogin = ['list'];
|
||
|
|
||
|
|
||
|
/**
|
||
|
*/
|
||
|
public function list()
|
||
|
{
|
||
|
$lists = CategoryBusiness::field(['id', 'name', 'pid', 'sort', 'status'])
|
||
|
->order(['id' => 'desc'])
|
||
|
->select()
|
||
|
->toArray();
|
||
|
return $this->success('操作成功',linear_to_tree($lists, 'children'));
|
||
|
}
|
||
|
}
|