|
...
|
...
|
@@ -514,4 +514,48 @@ class ImageController extends Controller |
|
|
|
$data = ['image_download'=>url('a/download_images?path='.$info['path']), 'name' => $info['name']];
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :设置图片水印
|
|
|
|
* @name :setWatermark
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2024/8/21 9:15
|
|
|
|
*/
|
|
|
|
public function setWatermark(){
|
|
|
|
$this->request->validate([
|
|
|
|
'url'=>['required'],
|
|
|
|
],[
|
|
|
|
'url.required'=>'请填写需要处理图片的相对路径',
|
|
|
|
]);
|
|
|
|
$cos = new CosService();
|
|
|
|
$url = $cos->addFieldImage($this->param['url'], $this->param['data'],true);
|
|
|
|
$this->response('success',Code::SUCCESS,['url'=>$url]);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取字体
|
|
|
|
* @name :getFont
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2024/8/21 9:47
|
|
|
|
*/
|
|
|
|
public function getFont(){
|
|
|
|
$cos = new CosService();
|
|
|
|
$data = $cos->getFont();
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :处理9宫格数据
|
|
|
|
* @name :getPosition
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2024/8/21 9:47
|
|
|
|
*/
|
|
|
|
public function getPosition(){
|
|
|
|
$cos = new CosService();
|
|
|
|
$data = $cos->getPosition();
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|