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
fb390dde
Commit
fb390dde
authored
Dec 03, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceshi
parent
c552e536
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
UploadFileService.php
application/api_broker/service/UploadFileService.php
+2
-0
News.php
application/index/controller/News.php
+4
-0
No files found.
application/api_broker/service/UploadFileService.php
View file @
fb390dde
...
...
@@ -107,6 +107,7 @@ class UploadFileService
$data
[
"msg"
][
$k
][
'img_path'
]
=
$date
.
'/'
.
$info
->
getSaveName
();
//生成的图片路径
$data
[
"msg"
][
$k
][
'internet_img_name'
]
=
$internet_path
.
$data
[
"msg"
][
$k
][
'img_path'
];
$data
[
"msg"
][
$k
][
'img_ext'
]
=
$info
->
getExtension
();
$data
[
"msg"
][
$k
][
'imgformer_name'
]
=
$file_info
[
'basename'
];
}
else
{
$data
[
'code'
]
=
101
;
$data
[
"msg"
][
$k
][
'error'
]
=
$_file
->
getError
();
...
...
@@ -123,6 +124,7 @@ class UploadFileService
$data
[
"msg"
][
'img_path'
]
=
$date
.
'/'
.
$info
->
getSaveName
();
//生成的图片路径
$data
[
"msg"
][
'internet_img_name'
]
=
$internet_path
.
$data
[
"msg"
][
'img_path'
];
$data
[
"msg"
][
'img_ext'
]
=
$info
->
getExtension
();
$data
[
"msg"
][
'imgformer_name'
]
=
$file_info
[
'basename'
];
}
else
{
$data
[
'code'
]
=
101
;
$data
[
'msg'
]
=
$_file
->
getError
();
...
...
application/index/controller/News.php
View file @
fb390dde
...
...
@@ -99,13 +99,17 @@ class News extends Basic
$data
[
'cover_plan'
]
=
$this
->
params
[
'file_img'
];
$data
[
's_label_id'
]
=
$this
->
params
[
's_label_id'
];
$data
[
'annex_file_name'
]
=
$this
->
params
[
'annex_file_name'
];
// $data['annex_file_former_name'] = $this->params['annex_file_former_name'];
$data
[
'id'
]
=
$this
->
params
[
'id'
];
try
{
$id
=
$this
->
m_news
->
addData
(
$data
,
$this
->
userId
);
if
(
$id
)
{
$m_file
=
new
SFile
();
$file_data
=
[];
dump
(
$data
[
'annex_file_name'
]);
foreach
(
$data
[
'annex_file_name'
]
as
$k
=>
$v
)
{
dump
(
$v
);
$file_data
[
'file_name'
]
=
$v
;
$file_data
[
'new_id'
]
=
$id
;
$file_data
[
'type'
]
=
1
;
...
...
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