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
2ad976eb
Commit
2ad976eb
authored
Dec 03, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceshi
parent
c69a3a44
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
News.php
application/index/controller/News.php
+20
-0
route.php
application/route.php
+1
-0
No files found.
application/index/controller/News.php
View file @
2ad976eb
...
@@ -199,4 +199,23 @@ class News extends Basic
...
@@ -199,4 +199,23 @@ class News extends Basic
$m_file
->
updateDateById
(
$this
->
params
[
'file_id'
],
[
'status'
=>
1
]);
$m_file
->
updateDateById
(
$this
->
params
[
'file_id'
],
[
'status'
=>
1
]);
return
$this
->
response
(
200
,
'删除成功'
);
return
$this
->
response
(
200
,
'删除成功'
);
}
}
public
function
downloadFile
()
{
$filepath
=
'/static/business_school_file/20181203/20181203110021473.jpg'
;
if
(
file_exists
(
$filepath
)){
header
(
"Content-type:application/octet-stream"
);
$filename
=
basename
(
$filepath
);
header
(
"Content-Disposition:attachment;filename = 11.jpg"
);
header
(
"Accept-ranges:bytes"
);
header
(
"Accept-length:"
.
filesize
(
$filepath
));
readfile
(
$filepath
);
}
else
{
echo
"<script>alert('文件不存在')</script>"
;
}
}
}
}
\ No newline at end of file
application/route.php
View file @
2ad976eb
...
@@ -370,6 +370,7 @@ Route::group('index', [
...
@@ -370,6 +370,7 @@ Route::group('index', [
'getRecordsList'
=>
[
'index/broker/getRecordsList'
,
[
'method'
=>
'post|get'
]],
//解绑或绑定经纪人设备id
'getRecordsList'
=>
[
'index/broker/getRecordsList'
,
[
'method'
=>
'post|get'
]],
//解绑或绑定经纪人设备id
'downloadFile'
=>
[
'index/news/downloadFile'
,
[
'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