dyjh 6 anni fa
parent
commit
62b3b1c9d2

+ 3 - 0
app/Helper/functions.inc.php

xqd
@@ -101,7 +101,10 @@ if (! function_exists('imageToCircle')) {
                 }
             }
         }
+        //存储png
         imagepng($img, $url);
+        //存储jpeg
+        //imagejpeg($img, $url);
         return $url;
     }
 }

+ 3 - 3
app/Http/Controllers/Api/V1/AlbumPosterController.php

xqd xqd
@@ -216,7 +216,7 @@ class AlbumPosterController extends Controller
             $phone = $agent_check->phone;
         }
         $editor->text($image_poster, $phone, 20, 55, 575, new Color("#eb7a48"), $font, 0);
-        $editor->text($image_poster, '长按识别二维码 展示家具画册', 16, 10, 645, new Color("#666666"), $font, 0);
+        $editor->text($image_poster, '长按识别二维码 展示家具画册', 16, 10, 650, new Color("#666666"), $font, 0);
         $editor->open($image_qrcode, str_replace(env('CDN_URL'), public_path(), $info['qrcode']));
         $editor->resizeExactWidth($image_qrcode, 140);
         $editor->resizeExactHeight($image_qrcode, 140);
@@ -224,8 +224,8 @@ class AlbumPosterController extends Controller
         $editor->open($image_avatar, public_path() . '/base/poster/avatar/' . $data['store_id'] . "/$userAuth->id.jpg");
         $editor->resizeExactWidth($image_avatar, 64);
         $editor->resizeExactHeight($image_avatar, 64);
-        $editor->blend($image_poster, $image_avatar, 'normal', 1, 'top-left', 348, 548);
-        $editor->text($image_poster, $name, 16, 380 - (22 * (mb_strlen($name) / 2)), 645, new Color("#666666"), $font, 0);
+        $editor->blend($image_poster, $image_avatar, 'normal', 1, 'top-left', 348, 538);
+        $editor->text($image_poster, $name, 16, 380 - (22 * (mb_strlen($name) / 2)), 650, new Color("#666666"), $font, 0);
         $editor->save($image_poster, public_path() . '/download/' . $userAuth->id . '.png');
         $real_url = env('CDN_URL') . '/download/' . $userAuth->id . '.png';
         return $this->api(compact('real_url'));

BIN
public/base/poster/img/phone.png