|
|
@@ -2,43 +2,7 @@
|
|
|
|
|
|
namespace App\Services;
|
|
|
|
|
|
-use App\PrintTemplate;
|
|
|
-use App\Traits\DrawImage;
|
|
|
-use App\Traits\ModelSearchWay;
|
|
|
-use App\Traits\ServiceAppAop;
|
|
|
-use Illuminate\Support\Str;
|
|
|
-use Intervention\Image\Facades\Image;
|
|
|
-
|
|
|
class PrintService
|
|
|
{
|
|
|
- use ModelSearchWay;
|
|
|
- use ServiceAppAop;
|
|
|
- use DrawImage;
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 处理打印参数 返回 打印图片
|
|
|
- * @param array $params
|
|
|
- * @return mixed
|
|
|
- */
|
|
|
- public function processingPrintData(array $params)
|
|
|
- {
|
|
|
-
|
|
|
-// $img_name = Str::uuid().'.png';
|
|
|
-// $path_arr = ['app','public','print'];
|
|
|
-// $dir_path = implode(DIRECTORY_SEPARATOR,$path_arr);
|
|
|
-// if (!file_exists(storage_path($dir_path))) mkdir(storage_path($dir_path));
|
|
|
-//
|
|
|
-// $path_arr[] = 'image';
|
|
|
-// $dir_path = implode(DIRECTORY_SEPARATOR,$path_arr);
|
|
|
-// if (!file_exists(storage_path($dir_path))) mkdir(storage_path($dir_path));
|
|
|
-//
|
|
|
-// $path_arr[] = $img_name;
|
|
|
-// $path = storage_path(implode(DIRECTORY_SEPARATOR,$path_arr));
|
|
|
-//
|
|
|
-// $img->save($path); // 图片保存
|
|
|
-// $file = file_get_contents($path);
|
|
|
-
|
|
|
- }
|
|
|
|
|
|
}
|