villers 2020-09-08 14:13:13 346次浏览 2条回复 0 0 0

微信截图_20200908141124.png 后端代码: public function actionFindAll(){

    $module = Goods::getInstance();
    
    $result = $module->category->findAll();

    $tree  = new Tree('classId','classPId');

    $_Json = new JsonMap();
    $_Json->data = $tree->create($result);

    \Yii::$app->response->format = Response::FORMAT_JSON;

    return $_Json->result;
}

浏览器接收数据

20200908141526.png30200908141641.png

亿速云
您需要登录后才可以回复。登录 | 立即注册