|
@@ -107,7 +107,13 @@ class SettingController extends Controller
|
|
|
|
|
|
$text = str_replace_array('{days}', [15], $share_text_pos->value);
|
|
$text = str_replace_array('{days}', [15], $share_text_pos->value);
|
|
|
|
|
|
- $image = Image::make(url($share_image->val))->text($text, $pos[0], $pos[1]);
|
|
|
|
|
|
+ $image = Image::make(url($share_image->val));
|
|
|
|
+
|
|
|
|
+ if($pos[0] > $image->width() || $pos[1] > $image->height()) {
|
|
|
|
+ return $this->showWarning('分享文字位置错误');
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $image = $image->text($text, $pos[0], $pos[1]);
|
|
|
|
|
|
$size = $image->filesize();
|
|
$size = $image->filesize();
|
|
|
|
|