Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
bfec0bd9
Commit
bfec0bd9
authored
Feb 20, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
富文本文件上传
parent
6d73c242
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
53 additions
and
6 deletions
+53
-6
UploadImg.php
application/api_broker/controller/UploadImg.php
+24
-0
UploadImg.php
application/index/controller/UploadImg.php
+24
-0
new_text.html
application/index/view/news/new_text.html
+2
-3
add_notice_view.html
application/index/view/notice/add_notice_view.html
+1
-1
route.php
application/route.php
+2
-0
config.js
public/resource/lib/Ckeditor/config.js
+0
-2
flash.js
public/resource/lib/Ckeditor/plugins/flash/dialogs/flash.js
+0
-0
image.js
public/resource/lib/Ckeditor/plugins/image/dialogs/image.js
+0
-0
link.js
public/resource/lib/Ckeditor/plugins/link/dialogs/link.js
+0
-0
No files found.
application/api_broker/controller/UploadImg.php
View file @
bfec0bd9
...
@@ -47,4 +47,27 @@ class UploadImg extends Basic
...
@@ -47,4 +47,27 @@ class UploadImg extends Basic
}
}
}
}
/**
* 富文本文件上传
*/
public
function
uploadEditor
()
{
header
(
'Access-Control-Allow-Origin:*'
);
set_time_limit
(
0
);
$file
=
$_FILES
[
'image'
];
if
(
empty
(
$file
))
{
$file
=
$_FILES
[
'upload'
];
}
$type
=
request
()
->
param
(
'type'
);
$uploadResult
=
$this
->
uFService
->
upload
(
$file
,
$type
);
$cb
=
$_GET
[
'CKEditorFuncNum'
];
//获得ck的回调id
try
{
$url
=
$uploadResult
[
"msg"
][
'internet_img_name'
];
//我自己的放置上传图片的逻辑,返回图片放置后的url
echo
"<script type='text/javascript'>window.parent.CKEDITOR.tools.callFunction(
$cb
,'"
.
$url
.
"','');</script>"
;
}
catch
(
\Exception
$e
)
{
$erro
=
$e
->
getMessage
();
echo
"<script>window.parent.CKEDITOR.tools.callFunction(
$cb
, '','
$erro
');</script>"
;
//图片上传失败,通知ck失败消息
}
}
}
}
\ No newline at end of file
application/index/controller/UploadImg.php
View file @
bfec0bd9
...
@@ -42,4 +42,27 @@ class UploadImg extends Basic
...
@@ -42,4 +42,27 @@ class UploadImg extends Basic
}
}
}
}
/**
* 富文本文件上传
*/
public
function
uploadEditor
()
{
header
(
'Access-Control-Allow-Origin:*'
);
set_time_limit
(
0
);
$file
=
$_FILES
[
'image'
];
if
(
empty
(
$file
))
{
$file
=
$_FILES
[
'upload'
];
}
$type
=
request
()
->
param
(
'type'
);
$uploadResult
=
$this
->
uFService
->
upload
(
$file
,
$type
);
$cb
=
$_GET
[
'CKEditorFuncNum'
];
//获得ck的回调id
try
{
$url
=
$uploadResult
[
"msg"
][
'internet_img_name'
];
//我自己的放置上传图片的逻辑,返回图片放置后的url
echo
"<script type='text/javascript'>window.parent.CKEDITOR.tools.callFunction(
$cb
,'"
.
$url
.
"','');</script>"
;
}
catch
(
\Exception
$e
)
{
$erro
=
$e
->
getMessage
();
echo
"<script>window.parent.CKEDITOR.tools.callFunction(
$cb
, '','
$erro
');</script>"
;
//图片上传失败,通知ck失败消息
}
}
}
}
\ No newline at end of file
application/index/view/news/new_text.html
View file @
bfec0bd9
...
@@ -323,11 +323,10 @@
...
@@ -323,11 +323,10 @@
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
<div
class=
""
style=
"width: 100%;"
>
<div
class=
""
style=
"width: 100%;"
>
<div
class=
"input-group"
style=
"width: 100%;"
id=
"dajiangtang"
>
<div
class=
"input-group"
style=
"width: 100%;"
id=
"dajiangtang"
>
<?php
<?php
create_editor('goods_sup_id','');
create_editor('goods_sup_id',''
,['filebrowserUploadUrl'=>IMAGES_URL.'index/uploadEditor?type=business_school']
);
?>
?>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
application/index/view/notice/add_notice_view.html
View file @
bfec0bd9
...
@@ -282,7 +282,7 @@
...
@@ -282,7 +282,7 @@
<!--<label for="" style="width: 100%;">内容</label>-->
<!--<label for="" style="width: 100%;">内容</label>-->
<div
class=
"input-group"
style=
"width: 100%;"
id=
"dajiangtang"
>
<div
class=
"input-group"
style=
"width: 100%;"
id=
"dajiangtang"
>
<?php
<?php
create_editor('goods_sup_id','');
create_editor('goods_sup_id',''
, ['filebrowserUploadUrl'=>IMAGES_URL.'index/uploadEditor?type=business_school']
);
?>
?>
</div>
</div>
</div>
</div>
...
...
application/route.php
View file @
bfec0bd9
...
@@ -321,6 +321,7 @@ Route::group('index', [
...
@@ -321,6 +321,7 @@ Route::group('index', [
'agentEvaluateNumAndFraction'
=>
[
'index/broker/agentEvaluateNumAndFraction'
,
[
'method'
=>
'POST|GET'
]
],
//经纪人列表计算-评价次数和分数 朱伟 2018-07-03
'agentEvaluateNumAndFraction'
=>
[
'index/broker/agentEvaluateNumAndFraction'
,
[
'method'
=>
'POST|GET'
]
],
//经纪人列表计算-评价次数和分数 朱伟 2018-07-03
'uploadImg'
=>
[
'index/UploadImg/uploadImg'
,
[
'method'
=>
'POST'
]
],
//全局图片上传
'uploadImg'
=>
[
'index/UploadImg/uploadImg'
,
[
'method'
=>
'POST'
]
],
//全局图片上传
'uploadEditor'
=>
[
'index/UploadImg/uploadEditor'
,
[
'method'
=>
'POST'
]
],
//全局图片上传
'followUpList'
=>
[
'index/HouseFollowUp/followUpList'
,
[
'method'
=>
'GET'
]
],
//商铺跟进liu
'followUpList'
=>
[
'index/HouseFollowUp/followUpList'
,
[
'method'
=>
'GET'
]
],
//商铺跟进liu
'userModalList'
=>
[
'index/Member/userDetail'
,
[
'method'
=>
'GET'
]
],
//客户跟进模态框,公用
'userModalList'
=>
[
'index/Member/userDetail'
,
[
'method'
=>
'GET'
]
],
//客户跟进模态框,公用
'inspectionRecordList'
=>
[
'index/InspectionRecord/inspectionRecordList'
,
[
'method'
=>
'GET'
]
],
//约带看记录liu
'inspectionRecordList'
=>
[
'index/InspectionRecord/inspectionRecordList'
,
[
'method'
=>
'GET'
]
],
//约带看记录liu
...
@@ -736,6 +737,7 @@ Route::group('broker', [
...
@@ -736,6 +737,7 @@ Route::group('broker', [
'addSupervise'
=>
[
'api_broker/Supervise/addSupervise'
,
[
'method'
=>
'POST|GET'
]],
//新增-监督执行
'addSupervise'
=>
[
'api_broker/Supervise/addSupervise'
,
[
'method'
=>
'POST|GET'
]],
//新增-监督执行
'superviseUploadImg'
=>
[
'api_broker/Supervise/superviseUploadImg'
,
[
'method'
=>
'POST|GET'
]],
//监督执行-上传图片
'superviseUploadImg'
=>
[
'api_broker/Supervise/superviseUploadImg'
,
[
'method'
=>
'POST|GET'
]],
//监督执行-上传图片
'uploadImg'
=>
[
'api_broker/UploadImg/uploadImg'
,
[
'method'
=>
'POST|GET'
]],
//图片上传
'uploadImg'
=>
[
'api_broker/UploadImg/uploadImg'
,
[
'method'
=>
'POST|GET'
]],
//图片上传
'uploadEditor'
=>
[
'api_broker/UploadImg/uploadEditor'
,
[
'method'
=>
'POST|GET'
]],
//图片上传
'business_school'
=>
[
'api_broker/news/index'
,
[
'method'
=>
'GET'
]],
//商学院资讯列表
'business_school'
=>
[
'api_broker/news/index'
,
[
'method'
=>
'GET'
]],
//商学院资讯列表
'getNewsInfo'
=>
[
'api_broker/news/getNewsInfo'
,
[
'method'
=>
'GET'
]],
//商学院资讯详情
'getNewsInfo'
=>
[
'api_broker/news/getNewsInfo'
,
[
'method'
=>
'GET'
]],
//商学院资讯详情
'getNewsLabel'
=>
[
'api_broker/news/getNewsLabel'
,
[
'method'
=>
'GET'
]],
//商学院标签
'getNewsLabel'
=>
[
'api_broker/news/getNewsLabel'
,
[
'method'
=>
'GET'
]],
//商学院标签
...
...
public/resource/lib/Ckeditor/config.js
View file @
bfec0bd9
...
@@ -26,5 +26,4 @@ CKEDITOR.editorConfig = function( config )
...
@@ -26,5 +26,4 @@ CKEDITOR.editorConfig = function( config )
{
name
:
'colors'
,
items
:
[
'TextColor'
,
'BGColor'
]
},
{
name
:
'colors'
,
items
:
[
'TextColor'
,
'BGColor'
]
},
{
name
:
'tools'
,
items
:
[
'Maximize'
,
'ShowBlocks'
,
'-'
,
'About'
]
}
{
name
:
'tools'
,
items
:
[
'Maximize'
,
'ShowBlocks'
,
'-'
,
'About'
]
}
];
];
};
};
\ No newline at end of file
public/resource/lib/Ckeditor/plugins/flash/dialogs/flash.js
View file @
bfec0bd9
This diff is collapsed.
Click to expand it.
public/resource/lib/Ckeditor/plugins/image/dialogs/image.js
View file @
bfec0bd9
This diff is collapsed.
Click to expand it.
public/resource/lib/Ckeditor/plugins/link/dialogs/link.js
View file @
bfec0bd9
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment