增加删除扫码接口

This commit is contained in:
liaofei 2023-06-26 09:24:30 +08:00
parent 3bf7444a20
commit 0774aeb563
2 changed files with 16 additions and 1 deletions

View File

@ -151,6 +151,19 @@ class SystemAttachment extends AuthController
return app('json')->success(['url' => $url]);
}
/**
* 删除二维码
* @return \think\Response
* @author 等风来
* @email 136327134@qq.com
* @date 2023/6/26
*/
public function removeUploadQrcode()
{
$this->service->cacheDriver()->delete('scan_upload');
return app('json')->success();
}
/**
* 获取扫码上传的图片数据
* @param $scan_token

View File

@ -36,7 +36,7 @@ Route::group('file', function () {
'update' => '修改附件分类管理',
'delete' => '删除附件分类管理'
],
]);
//获取上传类型
Route::get('upload_type', 'v1.file.SystemAttachment/uploadType')->option(['real_name' => '上传类型']);
@ -45,6 +45,8 @@ Route::group('file', function () {
//获取扫码上传页面链接以及参数
Route::get('scan_upload/qrcode', 'v1.file.SystemAttachment/scanUploadQrcode')->option(['real_name' => '扫码上传页面链接']);
//删除扫码上传token
Route::delete('scan_upload/qrcode', 'v1.file.SystemAttachment/removeUploadQrcode')->option(['real_name' => '删除扫码上传页面链接']);
//获取扫码上传的图片数据
Route::get('scan_upload/image/:scan_token', 'v1.file.SystemAttachment/scanUploadImage')->option(['real_name' => '获取扫码上传的图片数据']);
//网络图片上传