yingzi 2 years ago
parent
commit
6f1f9ad252
2 changed files with 3 additions and 5 deletions
  1. 0 2
      app/api/controller/Pub.php
  2. 3 3
      app/system/controller/Upload.php

+ 0 - 2
app/api/controller/Pub.php

@@ -259,8 +259,6 @@ class Pub extends BaseController
         if(empty($data)){
             return app('json')->fail("当前用户还未通过审核");
         }
-        $typeData = (new TypeAudit)->where("uid",$request->param["uid"])->order("id","desc")->find();
-        $data["is_type_audit"] = (empty($typeData) || $typeData["status"]!=1)?0:1;   
         return app('json')->success($data);
     }
 

+ 3 - 3
app/system/controller/Upload.php

@@ -90,16 +90,16 @@ class Upload extends AuthController{
     public function uploadCertFile(Request $request){
         $uploadConfig = config('filesystem');
         $file = $request->file('file');
-        $code = "cert";
+        $type = $request->post("type","");
         if(empty($file)) {
             return app('json')->fail("未上传文件");
         }
-        $upPath = \think\facade\Filesystem::disk('resource')->putFileAs( $code, $file,"weixin". DIRECTORY_SEPARATOR.date('Ymd').DIRECTORY_SEPARATOR.$file->getBasename());
+        $upPath = \think\facade\Filesystem::disk('resource')->putFileAs( "cert", $file,"weixin". DIRECTORY_SEPARATOR.date('Ymd').DIRECTORY_SEPARATOR.$file->getBasename());
         if(!$upPath){
             return app('json')->fail("上传失败01");
         }
         $savePath = '/resource/' . $upPath;
-        return app('json')->success(['cert'=>$savePath]);
+        return app('json')->success(['cert'=>$savePath,"type"=>$type]);
     }