|
@@ -126,9 +126,28 @@ class System extends BaseController
|
|
|
* @param int $id
|
|
|
* @return \think\Response
|
|
|
*/
|
|
|
- public function edit($id)
|
|
|
+ public function upload_file()
|
|
|
{
|
|
|
- //
|
|
|
+ $post =$this->request->post();
|
|
|
+// $token = isset($post['token']) ? trim($post['token']) : "";
|
|
|
+// if($token==""){
|
|
|
+// return error_show(101,'token不能为空');
|
|
|
+// }
|
|
|
+// $effetc = VerifyTokens($token);
|
|
|
+// if(!empty($effetc) && $effetc['code']!=0){
|
|
|
+// return error_show($effetc['code'],$effetc['message']);
|
|
|
+// }
|
|
|
+ $files = $this->request->file('files');
|
|
|
+ $list="";
|
|
|
+ if($files!=""){
|
|
|
+ $list=UploadFile($files);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(is_array($list)&&!empty($list)){
|
|
|
+ return app_show(0, "上传成功!",$list);
|
|
|
+ }else{
|
|
|
+ return error_show(1005, "上传失败!".$list);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|