怎么在HTML中格式化显示JSON数据 [ 求助交流 ]
 后端代码:
 public function actionFindAll(){
后端代码:
 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;
}
浏览器接收数据
 

villers
            注册时间:2020-09-04
最后登录:2020-10-16
在线时长:2小时2分
    最后登录:2020-10-16
在线时长:2小时2分
- 粉丝0
- 金钱55
- 威望0
- 积分75


