|
@@ -514,4 +514,48 @@ class ImageController extends Controller |
|
@@ -514,4 +514,48 @@ class ImageController extends Controller |
|
514
|
$data = ['image_download'=>url('a/download_images?path='.$info['path']), 'name' => $info['name']];
|
514
|
$data = ['image_download'=>url('a/download_images?path='.$info['path']), 'name' => $info['name']];
|
|
515
|
$this->response('success',Code::SUCCESS,$data);
|
515
|
$this->response('success',Code::SUCCESS,$data);
|
|
516
|
}
|
516
|
}
|
|
|
|
517
|
+
|
|
|
|
518
|
+ /**
|
|
|
|
519
|
+ * @remark :设置图片水印
|
|
|
|
520
|
+ * @name :setWatermark
|
|
|
|
521
|
+ * @author :lyh
|
|
|
|
522
|
+ * @method :post
|
|
|
|
523
|
+ * @time :2024/8/21 9:15
|
|
|
|
524
|
+ */
|
|
|
|
525
|
+ public function setWatermark(){
|
|
|
|
526
|
+ $this->request->validate([
|
|
|
|
527
|
+ 'url'=>['required'],
|
|
|
|
528
|
+ ],[
|
|
|
|
529
|
+ 'url.required'=>'请填写需要处理图片的相对路径',
|
|
|
|
530
|
+ ]);
|
|
|
|
531
|
+ $cos = new CosService();
|
|
|
|
532
|
+ $url = $cos->addFieldImage($this->param['url'], $this->param['data'],true);
|
|
|
|
533
|
+ $this->response('success',Code::SUCCESS,['url'=>$url]);
|
|
|
|
534
|
+ }
|
|
|
|
535
|
+
|
|
|
|
536
|
+ /**
|
|
|
|
537
|
+ * @remark :获取字体
|
|
|
|
538
|
+ * @name :getFont
|
|
|
|
539
|
+ * @author :lyh
|
|
|
|
540
|
+ * @method :post
|
|
|
|
541
|
+ * @time :2024/8/21 9:47
|
|
|
|
542
|
+ */
|
|
|
|
543
|
+ public function getFont(){
|
|
|
|
544
|
+ $cos = new CosService();
|
|
|
|
545
|
+ $data = $cos->getFont();
|
|
|
|
546
|
+ $this->response('success',Code::SUCCESS,$data);
|
|
|
|
547
|
+ }
|
|
|
|
548
|
+
|
|
|
|
549
|
+ /**
|
|
|
|
550
|
+ * @remark :处理9宫格数据
|
|
|
|
551
|
+ * @name :getPosition
|
|
|
|
552
|
+ * @author :lyh
|
|
|
|
553
|
+ * @method :post
|
|
|
|
554
|
+ * @time :2024/8/21 9:47
|
|
|
|
555
|
+ */
|
|
|
|
556
|
+ public function getPosition(){
|
|
|
|
557
|
+ $cos = new CosService();
|
|
|
|
558
|
+ $data = $cos->getPosition();
|
|
|
|
559
|
+ $this->response('success',Code::SUCCESS,$data);
|
|
|
|
560
|
+ }
|
|
517
|
} |
561
|
} |