~~~ <script type="text/javascript" charset="utf-8" src="/static/ueditor/ueditor.config.js"></script> <script type="text/javascript" charset="utf-8" src="/static/ueditor/ueditor.all.min.js"> </script> <script id="editor" type="text/plain" ></script> <script type="text/javascript"> //实例化编辑器 var ue = UE.getEditor('editor',{ //initialFrameWidth: 1100, //初始化宽度 initialFrameHeight: 500, //初始化高度 serverUrl:"{:url('index/index/baidu')}", }); </script> ~~~ 接口 ~~~ public function baidu(){ $action = $_GET['action']; $baidu=new Ueditor(); switch ($action){ case "config": $result=$baidu->config(); break; case "uploadimage": $result=$baidu->uploadimage(); break; case "catchimage": $result=$baidu->catchimage(); break; default: $result = json_encode(['state'=> '请求地址出错']); break; } return json($result); } ~~~