更新数组
This commit is contained in:
parent
5de2b425cd
commit
09a53cc867
@ -56,7 +56,6 @@ class CategoryBusinessLists extends BaseAdminDataLists implements ListsSearchInt
|
|||||||
{
|
{
|
||||||
$lists=CategoryBusiness::where($this->searchWhere)
|
$lists=CategoryBusiness::where($this->searchWhere)
|
||||||
->field(['id', 'name', 'pid', 'sort', 'status'])
|
->field(['id', 'name', 'pid', 'sort', 'status'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()
|
->select()
|
||||||
->toArray();
|
->toArray();
|
||||||
|
28
app/api/controller/CategoryBusinessController.php
Normal file
28
app/api/controller/CategoryBusinessController.php
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?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'));
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user