|
...
|
...
|
@@ -12,9 +12,11 @@ use App\Models\Project\Project; |
|
|
|
use App\Models\SyncSubmitTask\SyncSubmitTask;
|
|
|
|
use App\Models\Visit\Visit;
|
|
|
|
use App\Models\WebSetting\WebLanguage;
|
|
|
|
use App\Models\WebSetting\WebSettingFormBack;
|
|
|
|
use App\Services\CosService;
|
|
|
|
use App\Services\ProjectServer;
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -59,7 +61,34 @@ class InquiryController extends BaseController |
|
|
|
if(!SyncSubmitTask::addTask(SyncSubmitTask::TYPE_INQUIRY, $data)){
|
|
|
|
return $this->error();
|
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
//return $this->success();
|
|
|
|
//新增表单提,返回跳转链接
|
|
|
|
return $this->response($this->inquiryResult());
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 新增表单提交返回跳转链接
|
|
|
|
*/
|
|
|
|
protected function inquiryResult(){
|
|
|
|
$domain = request()->getHost();
|
|
|
|
$cache_key = 'inquiry_form_back_' . $domain;
|
|
|
|
$result = Cache::get($cache_key);
|
|
|
|
if(!$result){
|
|
|
|
$result = [
|
|
|
|
'message' => "",
|
|
|
|
'url' => "",
|
|
|
|
'other' => ""
|
|
|
|
];
|
|
|
|
$projectDomain = Project::getProjectByDomain($domain);
|
|
|
|
$webFormBack = WebSettingFormBack::where("project_id", $projectDomain['project_id']??0)->first();
|
|
|
|
if (!empty($webFormBack)) {
|
|
|
|
$result["message"] = $webFormBack->message ?? "";
|
|
|
|
$result["url"] = $webFormBack->url ?? "";
|
|
|
|
$result["other"] = $webFormBack->other ?? "";
|
|
|
|
Cache::put($cache_key, $result, 3600);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $result;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
|