更换编辑器

This commit is contained in:
2020-04-03 11:36:07 +08:00
parent 9dafceb2eb
commit 743d429bb8
591 changed files with 20918 additions and 99838 deletions

View File

@@ -39,6 +39,18 @@ class Upload extends Base {
return [];
}
public function editor(){
$fileType = $this->request->get('fileType', 'image', 'trim');
$file = request()->file('imgFile');
$data['data']['url'] = '/uploads/' . Filesystem::disk('public')->putFile($fileType, $file, 'md5');
$data['code'] = "000";
return json($data);
}
public function filemanage(){
return [];
}
public function ueditor(){
$data = new \com\Ueditor(Session::get('userInfo.uid'));
echo $data->output();

View File

@@ -15,7 +15,11 @@ class Index extends Base {
* @return [type] [description]
*/
public function index() {
return $this->fetch();
if ($this->request->isPost()) {
dump($this->request->param());
}else{
return $this->fetch();
}
}
public function miss(){

View File

@@ -1,7 +1,13 @@
<textarea name="{$name}" id="{$name}" style="width: 100%;">{$value}</textarea>
<textarea name="{$name}" id="{$name}" style="width: 100%">{$value}</textarea>
<!-- 实例化编辑器代码 -->
<script type="text/javascript">
var ue = UE.getEditor('{$name}', {
serverUrl : "{:url('/upload/ueditor')}"
});
load.script('__plugins__/NKeditor/NKeditor-all-min.js', function(){
KindEditor.ready(function(K) {
K.create('textarea[name="{$name}"]', {
uploadJson: "{:url('/admin/upload/editor')}",
fileManagerJson: "{:url('/admin/upload/filemanage')}"
})
})
});
</script>

24
app/model/Wechat.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
namespace app\model;
/**
* 微信模型
*/
class Wechat extends \think\Model {
public static $fieldlist = [
['name' => 'name', 'title' => '名称', 'type' => 'text', 'help' => '微信名称'],
['name' => 'app_id', 'title' => '微信APPID', 'type' => 'text', 'help' => 'AppID'],
['name' => 'secret', 'title' => '微信秘钥', 'type' => 'text', 'help' => 'AppSecret'],
['name' => 'token', 'title' => '微信Token', 'type' => 'text', 'help' => 'Token'],
['name' => 'aes_key', 'title' => 'EncodingAESKey', 'type' => 'text', 'help' => 'EncodingAESKey兼容与安全模式下请一定要填写'],
];
}