This commit is contained in:
全栈小学生 2025-05-30 17:14:54 +08:00
parent a4fdcce61a
commit f3a0db8a56
2 changed files with 2 additions and 9 deletions

View File

@ -50,7 +50,7 @@ class CoreNiuSmsService extends BaseAdminService
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
$niushop_url_prefix = env('NIU_SHOP_PREFIX', 'https://www.niushop.com/openapi'); $niushop_url_prefix = env('NIU_SHOP_PREFIX', 'https://api.niucloud.com/openapi');
if (empty($niushop_url_prefix)) { if (empty($niushop_url_prefix)) {
throw new \Exception('URL_NOT_FOUND'); throw new \Exception('URL_NOT_FOUND');
} else { } else {

View File

@ -76,18 +76,11 @@ class CoreFileService extends BaseCoreService
/** /**
* 实例化上传引擎 * 实例化上传引擎
* @param int $site_id * @param int $site_id
* @param string $storage_type * @param string $storage_type `非空则是强制使用某种存储方式 为空则是走后台设置`
* @return UploadLoader * @return UploadLoader
* @throws Exception * @throws Exception
*/ */
public function driver(int $site_id, string $storage_type = ''){ public function driver(int $site_id, string $storage_type = ''){
//是租户且设置的为默认 则按照超级管理员的默认来使用
$tenant_is_default = ($site_id != 0 && $storage_type == StorageDict::LOCAL);
if ($tenant_is_default){
$site_id = 0;
$storage_type = '';
}
if(empty($storage_type)){ if(empty($storage_type)){
$core_storage_service = new CoreStorageService(); $core_storage_service = new CoreStorageService();
$storage_config = $core_storage_service->getDefaultStorage($site_id); $storage_config = $core_storage_service->getDefaultStorage($site_id);