作者 lyh

gx

... ... @@ -22,6 +22,7 @@ use App\Models\Project\Payment;
use App\Models\Project\Project;
use App\Models\Task\Task;
use App\Utils\EncryptUtils;
use Hashids\Hashids;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
... ... @@ -180,6 +181,9 @@ class ProjectLogic extends BaseLogic
}
$data = $param['deploy_build'];
$data['project_id'] = $param['id'];
$hashids = new Hashids('test_domain', 5, 'abcdefghjkmnpqrstuvwxyz1234567890');
$code = $hashids->encode($this->project_id);
$data['test_domain'] = 'v6-' . $code . '.globalso.site';
$data['id'] = DeployBuild::where('project_id', $param['id'])->value('id');
// Arr::forget($data, ['test_domain', 'plan']);
return (new DeployBuildLogic)->save($data);
... ...
... ... @@ -22,12 +22,12 @@ class DeployBuild extends Base
return Arr::setToArr($value, 'trim');
}
public function getTestDomainAttribute(): string
{
$hashids = new Hashids('test_domain', 5, 'abcdefghjkmnpqrstuvwxyz1234567890');
$code = $hashids->encode($this->project_id);
return 'https://v6-' . $code . '.globalso.site';
}
// public function getTestDomainAttribute(): string
// {
// $hashids = new Hashids('test_domain', 5, 'abcdefghjkmnpqrstuvwxyz1234567890');
// $code = $hashids->encode($this->project_id);
// return 'https://v6-' . $code . '.globalso.site';
// }
public static function clearCache($row){
$cache_key = 'project_' . $row->original['test_domain'];
... ...