thinkphp5控制器中查询的数据如何赋值给js?
public function index(){
$data = Db::name('menu') -> select();
$data = node_merge($data);
//这个$data如何传给前端js?
return $this -> fetch();
}
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
方法添加
视图js