xiaogang 3 years ago
parent
commit
ad6f30c458
1 changed files with 8 additions and 3 deletions
  1. 8 3
      app/Http/Controllers/Api/TestController.php

+ 8 - 3
app/Http/Controllers/Api/TestController.php

xqd xqd
@@ -9,6 +9,7 @@ use App\Models\User;
 use App\Models\UserInfoModel;
 use App\Services\JPushService;
 use Illuminate\Support\Facades\Storage;
+use PHPUnit\Util\Exception;
 
 class TestController
 {
@@ -109,9 +110,13 @@ class TestController
     }
 
     public function jg_auth(){
-        $disk = Storage::disk('oss');
-        $url = "https://zhengda.oss-cn-chengdu.aliyuncs.com/chengluApp/00b68aea42c3edf820a323c2ac69b2b0.jpg";
-        $res = $disk->delete($url);
+        try {
+            $disk = Storage::disk('oss');
+            $url = "https://zhengda.oss-cn-chengdu.aliyuncs.com/chengluApp/00b68aea42c3edf820a323c2ac69b2b0.jpg";
+            $res = $disk->delete($url);
+        }catch (Exception $exception){
+            dd($exception);
+        }
         dd($res);
         dd(GetDistance(30.720518,103.998353,30.721384,103.996072));