villers 2020-09-08 14:13:13 1012次浏览 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

Yii用户专享10000元红包

Yii开发者福利,万元红包可用于云服务器、高防服务器、裸金属服务器、云数据库、高防IP购买和续费

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