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
f4fded9c
Commit
f4fded9c
authored
Feb 20, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
区分图片
parent
458e7049
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
5 deletions
+90
-5
UploadImg.php
application/api_broker/controller/UploadImg.php
+37
-1
UploadImg.php
application/index/controller/UploadImg.php
+37
-1
new_text.html
application/index/view/news/new_text.html
+7
-1
add_notice_view.html
application/index/view/notice/add_notice_view.html
+9
-2
No files found.
application/api_broker/controller/UploadImg.php
View file @
f4fded9c
...
...
@@ -61,9 +61,45 @@ class UploadImg extends Basic
$type
=
request
()
->
param
(
'type'
);
$uploadResult
=
$this
->
uFService
->
upload
(
$file
,
$type
);
if
(
CURRENT_URL
==
'https://api.tonglianjituan.com'
)
{
$path
=
IMAGES_URL
;
}
else
{
$path
=
'https://pre2.tonglianjituan.com'
;
}
switch
(
$type
)
{
case
'chat'
:
$path
.=
'static/chat_image/'
;
break
;
case
'user_header'
:
$path
.=
'static/user_header/'
;
break
;
case
'agent_header'
:
$path
.=
'static/head_portrait/'
;
break
;
case
'house_img'
:
$path
.=
'resource/lib/Attachments/images/'
;
break
;
case
'business_school'
:
$path
.=
'static/business_school/'
;
break
;
case
'business_school_file'
:
$path
.=
'static/business_school_file/'
;
break
;
case
'shop_image_depot'
:
$path
.=
'static/shop_image_depot/'
;
break
;
case
'exclusive_file'
:
$path
.=
'static/exclusive_file/'
;
break
;
case
'agent_black_list_img'
:
$path
.=
'static/agent_black_list/'
;
break
;
}
$cb
=
$_GET
[
'CKEditorFuncNum'
];
//获得ck的回调id
try
{
$url
=
$uploadResult
[
"msg"
][
'internet_img_name'
];
//我自己的放置上传图片的逻辑,返回图片放置后的url
$url
=
$
path
.
$
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
();
...
...
application/index/controller/UploadImg.php
View file @
f4fded9c
...
...
@@ -56,9 +56,45 @@ class UploadImg extends Basic
$type
=
request
()
->
param
(
'type'
);
$uploadResult
=
$this
->
uFService
->
upload
(
$file
,
$type
);
if
(
CURRENT_URL
==
'https://api.tonglianjituan.com'
)
{
$path
=
IMAGES_URL
;
}
else
{
$path
=
'https://pre2.tonglianjituan.com'
;
}
switch
(
$type
)
{
case
'chat'
:
$path
.=
'static/chat_image/'
;
break
;
case
'user_header'
:
$path
.=
'static/user_header/'
;
break
;
case
'agent_header'
:
$path
.=
'static/head_portrait/'
;
break
;
case
'house_img'
:
$path
.=
'resource/lib/Attachments/images/'
;
break
;
case
'business_school'
:
$path
.=
'static/business_school/'
;
break
;
case
'business_school_file'
:
$path
.=
'static/business_school_file/'
;
break
;
case
'shop_image_depot'
:
$path
.=
'static/shop_image_depot/'
;
break
;
case
'exclusive_file'
:
$path
.=
'static/exclusive_file/'
;
break
;
case
'agent_black_list_img'
:
$path
.=
'static/agent_black_list/'
;
break
;
}
$cb
=
$_GET
[
'CKEditorFuncNum'
];
//获得ck的回调id
try
{
$url
=
$uploadResult
[
"msg"
][
'internet_img_name'
];
//我自己的放置上传图片的逻辑,返回图片放置后的url
$url
=
$
path
.
$
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
();
...
...
application/index/view/news/new_text.html
View file @
f4fded9c
...
...
@@ -324,7 +324,13 @@
<div
class=
""
style=
"width: 100%;"
>
<div
class=
"input-group"
style=
"width: 100%;"
id=
"dajiangtang"
>
<?php
create_editor('goods_sup_id','',['filebrowserUploadUrl'=>IMAGES_URL.'index/uploadEditor?type=business_school']);
if (CURRENT_URL == 'https://api.tonglianjituan.com') {
$url = IMAGES_URL;
} else {
$url = 'https://pre2.tonglianjituan.com/';
}
create_editor('goods_sup_id','',['filebrowserUploadUrl'=>$url.'index/uploadEditor?type=business_school']);
?>
</div>
</div>
...
...
application/index/view/notice/add_notice_view.html
View file @
f4fded9c
...
...
@@ -282,7 +282,14 @@
<!--<label for="" style="width: 100%;">内容</label>-->
<div
class=
"input-group"
style=
"width: 100%;"
id=
"dajiangtang"
>
<?php
create_editor('goods_sup_id','', ['filebrowserUploadUrl'=>IMAGES_URL.'index/uploadEditor?type=house_img']);
if (CURRENT_URL == 'https://api.tonglianjituan.com') {
$url = IMAGES_URL;
} else {
$url = 'https://pre2.tonglianjituan.com/';
}
create_editor('goods_sup_id','', ['filebrowserUploadUrl'=> $url.'index/uploadEditor?type=house_img']);
?>
</div>
</div>
...
...
@@ -292,7 +299,7 @@
<!--附件-->
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
附件(格式为pdf/doc,选填,上限为5个):
</label>
<label
class=
"col-sm-2 control-label"
>
<?php echo $url.'index/uploadEditor?type=house_img'; ?>
附件(格式为pdf/doc,选填,上限为5个):
</label>
<div
class=
"col-sm-9"
>
<div
class=
"file-upload-area"
>
<div
class=
"btn-area"
>
...
...
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