作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !931
... ... @@ -8,8 +8,10 @@ use App\Models\Project\DeployBuild;
use App\Models\Project\Project;
use App\Models\User\User;
use App\Models\Visit\SyncSubmitTask;
use App\Models\WebSetting\WebSettingFormBack;
use App\Services\CosService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Redis;
class SelfSiteController extends BaseController
... ... @@ -88,7 +90,34 @@ class SelfSiteController extends BaseController
'user_agent' => $user_agent
];
SyncSubmitTask::createTask($array, $type, $traffic);
return $this->success([]);
$result = [];
if ($type == SyncSubmitTask::TYPE_INQUIRY) {
$result = $this->inquiryResult($pid, $domain);
}
return $this->success($result);
}
protected function inquiryResult($pid, $domain)
{
$cache_key = 'inquiry_form_back_' . $domain;
$result = Cache::get($cache_key);
if (!$result) {
$result = [
'message' => "",
'url' => "",
'other' => ""
];
$webFormBack = WebSettingFormBack::getBack($pid);
if (!empty($webFormBack)) {
$result["message"] = $webFormBack->message ?? "";
$result["url"] = $webFormBack->url ?? "";
$result["other"] = $webFormBack->other ?? "";
Cache::put($cache_key, $result, 3600);
}
}
return $result;
}
/**
... ...