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
e2e99ac0
Commit
e2e99ac0
authored
Jul 04, 2018
by
clone
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0702-v.2.2.0' of
https://gitee.com/zwyjjc/tl_estate
into 0702-v.2.2.0
parents
768ff0b1
c84bafc5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
7 deletions
+14
-7
UploadFileService.php
application/api_broker/service/UploadFileService.php
+2
-2
News.php
application/index/controller/News.php
+11
-5
new_text.html
application/index/view/news/new_text.html
+0
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/service/UploadFileService.php
View file @
e2e99ac0
...
...
@@ -87,7 +87,7 @@ class UploadFileService
if
(
$info
)
{
$data
[
'code'
]
=
200
;
$data
[
"msg"
][
$k
][
'img_path'
]
=
$date
.
$info
->
getSaveName
();
//生成的图片路径
$data
[
"msg"
][
$k
][
'img_path'
]
=
$date
.
'/'
.
$info
->
getSaveName
();
//生成的图片路径
$data
[
"msg"
][
$k
][
'img_ext'
]
=
$info
->
getExtension
();
}
else
{
$data
[
'code'
]
=
101
;
...
...
@@ -102,7 +102,7 @@ class UploadFileService
$info
=
$_file
->
validate
(
$valid_date
)
->
move
(
$path
,
$name_str
.
'.'
.
$file_info
[
'extension'
]);
if
(
$info
)
{
$data
[
'code'
]
=
200
;
$data
[
"msg"
][
'img_path'
]
=
$date
.
$info
->
getSaveName
();
//生成的图片路径
$data
[
"msg"
][
'img_path'
]
=
$date
.
'/'
.
$info
->
getSaveName
();
//生成的图片路径
$data
[
"msg"
][
'img_ext'
]
=
$info
->
getExtension
();
}
else
{
$data
[
'code'
]
=
101
;
...
...
application/index/controller/News.php
View file @
e2e99ac0
...
...
@@ -84,17 +84,18 @@ class News extends Basic
return
$this
->
response
(
101
,
'内容为空!'
);
}
if
(
empty
(
$_FILES
[
'file_img'
])
)
{
return
$this
->
response
(
101
,
'
封面图片为空
'
);
if
(
mb_strlen
(
$this
->
params
[
'content'
])
>
501
)
{
return
$this
->
response
(
101
,
'
内容字数超过限制!
'
);
}
$upload
=
new
UploadFileService
();
$result
=
$upload
->
upload
(
$_FILES
[
'file_img'
],
'business_school'
);
if
(
empty
(
$this
->
params
[
'file_img'
]))
{
return
$this
->
response
(
101
,
'封面图片为空'
);
}
$data
[
'title'
]
=
trim
(
$this
->
params
[
'title'
]);
$data
[
'content'
]
=
trim
(
$this
->
params
[
'content'
]);
$data
[
'publisher_id'
]
=
$this
->
userId
;
$data
[
'cover_plan'
]
=
$
result
[
'msg'
][
'img_path
'
];
$data
[
'cover_plan'
]
=
$
this
->
params
[
'file_img
'
];
$num
=
$this
->
m_news
->
editData
(
$data
,
$this
->
params
[
'id'
]);
if
(
$num
<
1
)
{
...
...
@@ -155,4 +156,8 @@ class News extends Basic
$data
=
$label
->
getList
(
1
,
200
,
''
,
'id,label_name'
,
[
'status'
=>
0
]);
return
$this
->
response
(
200
,
''
,
$data
);
}
public
function
newText
()
{
return
view
(
'new_text'
);
}
}
\ No newline at end of file
application/index/view/news/new_text.html
0 → 100644
View file @
e2e99ac0
This diff is collapsed.
Click to expand it.
application/route.php
View file @
e2e99ac0
...
...
@@ -251,6 +251,7 @@ Route::group('index', [
'getNewsInfo'
=>
[
'index/news/getNewsInfo'
,
[
'method'
=>
'GET'
]
],
//商学院资讯详情
'getNewsLabel'
=>
[
'index/news/getNewsLabel'
,
[
'method'
=>
'GET'
]
],
//商学院资标签
'delNews'
=>
[
'index/news/delNews'
,
[
'method'
=>
'POST'
]
],
//删除商学院文章
'new_text'
=>
[
'index/news/newText'
,
[
'method'
=>
'GET'
]
],
//删除商学院文章
'agentEvaluateNumAndFraction'
=>
[
'index/agent/agentEvaluateNumAndFraction'
,
[
'method'
=>
'POST|GET'
]
],
//经纪人列表计算-评价次数和分数 朱伟 2018-07-03
'uploadImg'
=>
[
'index/UploadImg/uploadImg'
,
[
'method'
=>
'POST'
]
],
//全局图片上传
]);
...
...
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