You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
981 B

<?php
namespace app\base\model\platform;
use think\model\concern\SoftDelete;
class PlatformAliOss extends Base
{
use SoftDelete;
// 设置当前模型对应的完整数据表名称
protected $table = 'base_platform_ali_oss';
/**
* 获取移动应用配置
* @date 2022-12-05
*/
public function getPlatformParam()
{
$where = [
['uid', '=', $this->mid]
];
$field = 'access_key_id,access_key_secret,bucket,region,bucket_default_url,end_point,show_url,first_directory';
$data = $this->getOneData($where, $field);
if (\think\facade\Request::scheme() == 'http') {
$data['bucket_default_url'] = str_replace("https://", "http://", $data['bucket_default_url']);
$data['end_point'] = str_replace("https://", "http://", $data['end_point']);
$data['show_url'] = str_replace("https://", "http://", $data['show_url']);
}
return $data;
}
}