|
@@ -13,11 +13,12 @@ class Download extends MobileBaseController
|
|
|
|
|
|
public function down()
|
|
|
{
|
|
|
- $file_url = input('file_url', '');
|
|
|
- $file_path = public_path('static/mobile/download').$file_url;
|
|
|
+ $file_url = input('file_url', '');
|
|
|
+ $file_path = public_path('static/mobile/download') . $file_url;
|
|
|
if (!file_exists($file_path)) {
|
|
|
jump('文件不存在或已过期!');
|
|
|
}
|
|
|
- return download($file_path,$file_url);
|
|
|
+ $file_name = ['1.pdf' => '晋江市党建引领基层网格管理工作文件汇编.pdf', '2.doc' => '社会保险知识问答.doc', '3.docx' => '泉州市城乡居民基本医保待遇政策.docx', '4.doc' => '晋江市基层计生协会业务工作培训材料.doc'];
|
|
|
+ return download($file_path, $file_name[$file_url]);
|
|
|
}
|
|
|
}
|