|
@@ -176,13 +176,13 @@ class AlbumPosterController extends Controller
|
|
$editor = Grafika::createEditor();
|
|
$editor = Grafika::createEditor();
|
|
$editor->open($image_poster, public_path() . '/base/poster/img/poster_canvas.png');
|
|
$editor->open($image_poster, public_path() . '/base/poster/img/poster_canvas.png');
|
|
$editor->open($image_poduct, str_replace(env('CDN_URL'), public_path(), $data['image']));
|
|
$editor->open($image_poduct, str_replace(env('CDN_URL'), public_path(), $data['image']));
|
|
- $editor->blend($image_poster, $image_poduct, 'normal', 1, 'top-left', 15, 5);
|
|
|
|
|
|
+ $editor->blend($image_poster, $image_poduct, 'normal', 1, 'top-left', 10, 10);
|
|
$font_bold = public_path() . '/base/poster/font/msyhbd.ttc';
|
|
$font_bold = public_path() . '/base/poster/font/msyhbd.ttc';
|
|
$font = public_path() . '/base/poster/font/msyh.ttc';
|
|
$font = public_path() . '/base/poster/font/msyh.ttc';
|
|
for ($i = 0; $i <= 1; $i++) {
|
|
for ($i = 0; $i <= 1; $i++) {
|
|
$len = mb_strlen($info['introduce']);
|
|
$len = mb_strlen($info['introduce']);
|
|
if ($len <= 17) {
|
|
if ($len <= 17) {
|
|
- $editor->text($image_poster, $info['introduce'], 10, 5, 215, new Color("#000000"), $font_bold, 0);
|
|
|
|
|
|
+ $editor->text($image_poster, $info['introduce'], 24, 10, 460, new Color("#000000"), $font_bold, 0);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
if ($i == 0) {
|
|
if ($i == 0) {
|
|
@@ -190,10 +190,10 @@ class AlbumPosterController extends Controller
|
|
} else {
|
|
} else {
|
|
$text = mb_substr($info['introduce'], $i * 17, ($len - 17) > 10 ? 10 : ($len - 17));
|
|
$text = mb_substr($info['introduce'], $i * 17, ($len - 17) > 10 ? 10 : ($len - 17));
|
|
}
|
|
}
|
|
- $editor->text($image_poster, $text, 10, 5, 215 + 23 * $i, new Color("#000000"), $font_bold, 0);
|
|
|
|
|
|
+ $editor->text($image_poster, $text, 24, 10, 460 + 50 * $i, new Color("#000000"), $font_bold, 0);
|
|
}
|
|
}
|
|
$editor->open($image_icon, public_path() . '/base/poster/img/phone.png');
|
|
$editor->open($image_icon, public_path() . '/base/poster/img/phone.png');
|
|
- $editor->blend($image_poster, $image_icon, 'normal', 1, 'top-left', 5, 270);
|
|
|
|
|
|
+ $editor->blend($image_poster, $image_icon, 'normal', 1, 'top-left', 10, 570);
|
|
$WeChatApp = AlbumManufacturerModel::where('store_id', $data['store_id'])->first();
|
|
$WeChatApp = AlbumManufacturerModel::where('store_id', $data['store_id'])->first();
|
|
if ($userAuth->is_dealer != 1) {
|
|
if ($userAuth->is_dealer != 1) {
|
|
if ($userAuth->up_agent_id == 0) {
|
|
if ($userAuth->up_agent_id == 0) {
|
|
@@ -215,13 +215,13 @@ class AlbumPosterController extends Controller
|
|
$name = $agent_check->realname;
|
|
$name = $agent_check->realname;
|
|
$phone = $agent_check->phone;
|
|
$phone = $agent_check->phone;
|
|
}
|
|
}
|
|
- $editor->text($image_poster, $phone, 12, 29, 274, new Color("#eb7a48"), $font, 0);
|
|
|
|
- $editor->text($image_poster, '长按识别二维码 展示家具画册', 8, 5, 316, new Color("#666666"), $font, 0);
|
|
|
|
|
|
+ $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->open($image_qrcode, str_replace(env('CDN_URL'), public_path(), $info['qrcode']));
|
|
$editor->open($image_qrcode, str_replace(env('CDN_URL'), public_path(), $info['qrcode']));
|
|
- $editor->resizeExactWidth($image_qrcode, 70);
|
|
|
|
- $editor->resizeExactHeight($image_qrcode, 70);
|
|
|
|
- $editor->blend($image_poster, $image_qrcode, 'normal', 1, 'top-left', 150, 235);
|
|
|
|
- $editor->text($image_poster, $name, 8, 188 - (11 * (mb_strlen($name) / 2)), 316, new Color("#666666"), $font, 0);
|
|
|
|
|
|
+ $editor->resizeExactWidth($image_qrcode, 140);
|
|
|
|
+ $editor->resizeExactHeight($image_qrcode, 140);
|
|
|
|
+ $editor->blend($image_poster, $image_qrcode, 'normal', 1, 'top-left', 310, 500);
|
|
|
|
+ $editor->text($image_poster, $name, 16, 380 - (22 * (mb_strlen($name) / 2)), 645, new Color("#666666"), $font, 0);
|
|
$editor->save($image_poster, public_path() . '/download/' . $userAuth->id . '.png');
|
|
$editor->save($image_poster, public_path() . '/download/' . $userAuth->id . '.png');
|
|
$real_url = env('CDN_URL') . '/download/' . $userAuth->id . '.png';
|
|
$real_url = env('CDN_URL') . '/download/' . $userAuth->id . '.png';
|
|
return $this->api(compact('real_url'));
|
|
return $this->api(compact('real_url'));
|