修正oss类

This commit is contained in:
2023-02-22 11:54:08 +08:00
parent fe23aee366
commit 2c04c5e192
2 changed files with 17 additions and 3 deletions
+16 -2
View File
@@ -17,7 +17,7 @@ class SafeService extends BaseService
public function getOssSign(): array
{
$user_type = $this->request->input('user_type');
$path = $this->request->input('path');
$scene = $this->request->input('scene');
$user_info = $this->request->getAttribute("userInfo") ?? [];
if (empty($user_info)){
@@ -32,7 +32,21 @@ class SafeService extends BaseService
$dir = "applet/pharmacist/";
}
$dir = $dir . $path;
$dir = $dir . $scene;
switch ($scene) {
case 1:
// 头像
$dir = $dir . 'avatar/';
break;
case 2:
// 证书
$dir = $dir . 'cert/';
break;
default:
// code...
break;
}
// 获取用户数据
$params = array();