正在显示
8 个修改的文件
包含
89 行增加
和
35 行删除
| @@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
| 9 | 9 | ||
| 10 | namespace App\Console\Commands\Domain; | 10 | namespace App\Console\Commands\Domain; |
| 11 | 11 | ||
| 12 | +use App\Models\Project\CountryCustom; | ||
| 12 | use Illuminate\Console\Command; | 13 | use Illuminate\Console\Command; |
| 13 | use App\Models\Domain\DomainInfo as DomainInfoModel; | 14 | use App\Models\Domain\DomainInfo as DomainInfoModel; |
| 14 | 15 | ||
| @@ -37,7 +38,7 @@ class DomainInfo extends Command | @@ -37,7 +38,7 @@ class DomainInfo extends Command | ||
| 37 | */ | 38 | */ |
| 38 | public function handle() | 39 | public function handle() |
| 39 | { | 40 | { |
| 40 | - //更新域名到期时间 | 41 | + //更新主站域名有效时间 |
| 41 | $this->startUpdateDomain(); | 42 | $this->startUpdateDomain(); |
| 42 | 43 | ||
| 43 | //主站证书到期更新 | 44 | //主站证书到期更新 |
| @@ -46,6 +47,9 @@ class DomainInfo extends Command | @@ -46,6 +47,9 @@ class DomainInfo extends Command | ||
| 46 | //AMP站证书到期更新 | 47 | //AMP站证书到期更新 |
| 47 | $this->startUpdateAmpCert(); | 48 | $this->startUpdateAmpCert(); |
| 48 | 49 | ||
| 50 | + //创建的自定义小语种域名证书到期更新 | ||
| 51 | + $this->startUpdateCustomCert(); | ||
| 52 | + | ||
| 49 | return true; | 53 | return true; |
| 50 | } | 54 | } |
| 51 | 55 | ||
| @@ -138,7 +142,35 @@ class DomainInfo extends Command | @@ -138,7 +142,35 @@ class DomainInfo extends Command | ||
| 138 | } | 142 | } |
| 139 | 143 | ||
| 140 | /** | 144 | /** |
| 141 | - * @remark :更新正式 | 145 | + * 自定义小语种站证书到期更新 |
| 146 | + * @author Akun | ||
| 147 | + * @date 2024/03/23 10:08 | ||
| 148 | + */ | ||
| 149 | + public function startUpdateCustomCert() | ||
| 150 | + { | ||
| 151 | + $customModel = new CountryCustom(); | ||
| 152 | + $end_day = date('Y-m-d H:i:s', time() + 2 * 24 * 3600);//2天后到期 | ||
| 153 | + $list = $customModel->where('status', 1)->where('is_create', 1)->where(function ($query) use ($end_day) { | ||
| 154 | + $query->whereNull('certificate_end_time')->orWhere('certificate_end_time', '<', $end_day); | ||
| 155 | + })->get()->toArray(); | ||
| 156 | + foreach ($list as $v) { | ||
| 157 | + //更新证书到期时间 | ||
| 158 | + $data = []; | ||
| 159 | + $ssl = $this->updateDomainSsl($v['custom_domain']); | ||
| 160 | + $ssl['from'] && $data['certificate_start_time'] = $ssl['from']; | ||
| 161 | + $ssl['to'] && $data['certificate_end_time'] = $ssl['to']; | ||
| 162 | + | ||
| 163 | + $customModel->edit($data, ['id' => $v['id']]); | ||
| 164 | + | ||
| 165 | + if ($v['type'] == 1 && ($data['certificate_end_time'] ?? '') < $end_day) { | ||
| 166 | + //申请免费证书 | ||
| 167 | + $this->updateCustomPrivate($v['custom_domain']); | ||
| 168 | + } | ||
| 169 | + } | ||
| 170 | + } | ||
| 171 | + | ||
| 172 | + /** | ||
| 173 | + * @remark :更新主站证书 | ||
| 142 | * @name :updatePrivate | 174 | * @name :updatePrivate |
| 143 | * @author :lyh | 175 | * @author :lyh |
| 144 | * @method :post | 176 | * @method :post |
| @@ -168,7 +200,7 @@ class DomainInfo extends Command | @@ -168,7 +200,7 @@ class DomainInfo extends Command | ||
| 168 | } | 200 | } |
| 169 | 201 | ||
| 170 | /** | 202 | /** |
| 171 | - * 更新证书 | 203 | + * 更新amp站证书 |
| 172 | * @param $domain | 204 | * @param $domain |
| 173 | * @return array | 205 | * @return array |
| 174 | * @author Akun | 206 | * @author Akun |
| @@ -185,6 +217,26 @@ class DomainInfo extends Command | @@ -185,6 +217,26 @@ class DomainInfo extends Command | ||
| 185 | return $this->curlRequest($url, $param); | 217 | return $this->curlRequest($url, $param); |
| 186 | } | 218 | } |
| 187 | 219 | ||
| 220 | + /** | ||
| 221 | + * 更新小语种自定义站证书 | ||
| 222 | + * @param $domain | ||
| 223 | + * @return array | ||
| 224 | + * @author Akun | ||
| 225 | + * @date 2024/03/23 10:07 | ||
| 226 | + */ | ||
| 227 | + public function updateCustomPrivate($domain) | ||
| 228 | + { | ||
| 229 | + $url = 'http://' . $domain . '/api/applySsl'; | ||
| 230 | + $param = [ | ||
| 231 | + 'domain' => $domain, | ||
| 232 | + 'rewrite' => [], | ||
| 233 | + 'other_domain' => [], | ||
| 234 | + 'is_https' => 1 | ||
| 235 | + ]; | ||
| 236 | + | ||
| 237 | + return $this->curlRequest($url, $param); | ||
| 238 | + } | ||
| 239 | + | ||
| 188 | public static function getTopDomain($url) | 240 | public static function getTopDomain($url) |
| 189 | { | 241 | { |
| 190 | $url = strtolower($url); //首先转成小写 | 242 | $url = strtolower($url); //首先转成小写 |
| @@ -237,7 +289,7 @@ class DomainInfo extends Command | @@ -237,7 +289,7 @@ class DomainInfo extends Command | ||
| 237 | } | 289 | } |
| 238 | 290 | ||
| 239 | /** | 291 | /** |
| 240 | - * @remark :更新域名证书 | 292 | + * @remark :获取域名证书有效时间 |
| 241 | * @name :updateDomainSsl | 293 | * @name :updateDomainSsl |
| 242 | * @author :lyh | 294 | * @author :lyh |
| 243 | * @method :post | 295 | * @method :post |
| @@ -273,7 +325,7 @@ class DomainInfo extends Command | @@ -273,7 +325,7 @@ class DomainInfo extends Command | ||
| 273 | } | 325 | } |
| 274 | 326 | ||
| 275 | /** | 327 | /** |
| 276 | - * @remark :更新域名有限时间 | 328 | + * @remark :更新域名有效时间 |
| 277 | * @name :updateDomain | 329 | * @name :updateDomain |
| 278 | * @author :lyh | 330 | * @author :lyh |
| 279 | * @method :post | 331 | * @method :post |
| @@ -55,7 +55,7 @@ class UpdateRoute extends Command | @@ -55,7 +55,7 @@ class UpdateRoute extends Command | ||
| 55 | */ | 55 | */ |
| 56 | public function handle(){ | 56 | public function handle(){ |
| 57 | $projectModel = new Project(); | 57 | $projectModel = new Project(); |
| 58 | - $list = $projectModel->list(['id'=>1091]); | 58 | + $list = $projectModel->list(['id'=>23]); |
| 59 | $data = []; | 59 | $data = []; |
| 60 | foreach ($list as $v){ | 60 | foreach ($list as $v){ |
| 61 | echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; | 61 | echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; |
| @@ -63,7 +63,7 @@ class InquiryController extends BaseController | @@ -63,7 +63,7 @@ class InquiryController extends BaseController | ||
| 63 | * @name :editInquiryStatus | 63 | * @name :editInquiryStatus |
| 64 | * @author :lyh | 64 | * @author :lyh |
| 65 | * @method :post | 65 | * @method :post |
| 66 | - * @time :2024/3/22 15:31 | 66 | + * @time :2024/3/22 15:41 |
| 67 | */ | 67 | */ |
| 68 | public function editInquiryStatus(){ | 68 | public function editInquiryStatus(){ |
| 69 | $this->request->validate([ | 69 | $this->request->validate([ |
| @@ -30,7 +30,6 @@ class ATemplateModuleLogic extends BaseLogic | @@ -30,7 +30,6 @@ class ATemplateModuleLogic extends BaseLogic | ||
| 30 | */ | 30 | */ |
| 31 | public function aTemplateModuleLists($map,$page,$row,$order = 'created_at',$filed = ['*']){ | 31 | public function aTemplateModuleLists($map,$page,$row,$order = 'created_at',$filed = ['*']){ |
| 32 | $map['deleted_status'] = 0; | 32 | $map['deleted_status'] = 0; |
| 33 | - $map['status'] = 0; | ||
| 34 | $lists = $this->model->lists($map,$page,$row,$order,$filed); | 33 | $lists = $this->model->lists($map,$page,$row,$order,$filed); |
| 35 | return $this->success($lists); | 34 | return $this->success($lists); |
| 36 | } | 35 | } |
| @@ -4,8 +4,6 @@ namespace App\Models\Project; | @@ -4,8 +4,6 @@ namespace App\Models\Project; | ||
| 4 | 4 | ||
| 5 | use App\Helper\Arr; | 5 | use App\Helper\Arr; |
| 6 | use App\Models\Base; | 6 | use App\Models\Base; |
| 7 | -use App\Models\Devops\ServerConfig; | ||
| 8 | -use Illuminate\Support\Facades\Cache; | ||
| 9 | 7 | ||
| 10 | class DomainInfo extends Base | 8 | class DomainInfo extends Base |
| 11 | { | 9 | { |
| @@ -5,12 +5,16 @@ namespace App\Services\Html; | @@ -5,12 +5,16 @@ namespace App\Services\Html; | ||
| 5 | 5 | ||
| 6 | use App\Models\Blog\Blog; | 6 | use App\Models\Blog\Blog; |
| 7 | use App\Models\Blog\BlogCategory; | 7 | use App\Models\Blog\BlogCategory; |
| 8 | +use App\Models\CustomModule\CustomModuleCategory; | ||
| 9 | +use App\Models\CustomModule\CustomModuleExtentContent; | ||
| 8 | use App\Models\Module\Module; | 10 | use App\Models\Module\Module; |
| 9 | use App\Models\Module\ModuleCategory; | 11 | use App\Models\Module\ModuleCategory; |
| 10 | use App\Models\News\News; | 12 | use App\Models\News\News; |
| 11 | use App\Models\News\NewsCategory; | 13 | use App\Models\News\NewsCategory; |
| 12 | use App\Models\Product\Category; | 14 | use App\Models\Product\Category; |
| 13 | use App\Models\Product\Keyword; | 15 | use App\Models\Product\Keyword; |
| 16 | +use App\Models\RouteMap\RouteMap; | ||
| 17 | +use App\Models\Template\BCustomTemplate; | ||
| 14 | use App\Models\WebSetting\WebCustom; | 18 | use App\Models\WebSetting\WebCustom; |
| 15 | use App\Models\WebSetting\WebSetting; | 19 | use App\Models\WebSetting\WebSetting; |
| 16 | use App\Models\WebSetting\WebSettingSeo; | 20 | use App\Models\WebSetting\WebSettingSeo; |
| @@ -32,43 +36,43 @@ class TdkService{ | @@ -32,43 +36,43 @@ class TdkService{ | ||
| 32 | $phpQueryDom=phpQuery::newDocument($html); | 36 | $phpQueryDom=phpQuery::newDocument($html); |
| 33 | 37 | ||
| 34 | //首页TDK设置 | 38 | //首页TDK设置 |
| 35 | - if ($type == WebTemplateCommon::$indexName){ | 39 | + if ($type == RouteMap::SOURCE_INDEX){ |
| 36 | $tdkInfo = $this->indexTDK($project); | 40 | $tdkInfo = $this->indexTDK($project); |
| 37 | } | 41 | } |
| 38 | //单页面TDK设置 | 42 | //单页面TDK设置 |
| 39 | - if ($type == WebTemplateCommon::$pageName){ | 43 | + if ($type == RouteMap::SOURCE_PAGE){ |
| 40 | $tdkInfo = $this->pageTDK($project,$routerMap); | 44 | $tdkInfo = $this->pageTDK($project,$routerMap); |
| 41 | } | 45 | } |
| 42 | //自定义模块列表页TDK设置 | 46 | //自定义模块列表页TDK设置 |
| 43 | - if ($type == WebTemplateCommon::$extendCategoryName){ | 47 | + if ($type == RouteMap::SOURCE_MODULE_CATE){ |
| 44 | $tdkInfo = $this->moduleCategoryTDK($project,$routerMap); | 48 | $tdkInfo = $this->moduleCategoryTDK($project,$routerMap); |
| 45 | } | 49 | } |
| 46 | //自定义模块详情页TDK设置 | 50 | //自定义模块详情页TDK设置 |
| 47 | - if ($type == WebTemplateCommon::$extendName){ | 51 | + if ($type == RouteMap::SOURCE_MODULE){ |
| 48 | $tdkInfo = $this->moduleDetailsTDK($project,$routerMap); | 52 | $tdkInfo = $this->moduleDetailsTDK($project,$routerMap); |
| 49 | } | 53 | } |
| 50 | //新闻详情TDK设置 | 54 | //新闻详情TDK设置 |
| 51 | - if ($type == WebTemplateCommon::$newsName){ | 55 | + if ($type == RouteMap::SOURCE_NEWS){ |
| 52 | $tdkInfo = $this->newsDetailsTDK($project,$routerMap); | 56 | $tdkInfo = $this->newsDetailsTDK($project,$routerMap); |
| 53 | } | 57 | } |
| 54 | //博客详情TDK设置 | 58 | //博客详情TDK设置 |
| 55 | - if ($type == WebTemplateCommon::$blogName){ | 59 | + if ($type == RouteMap::SOURCE_BLOG){ |
| 56 | $tdkInfo = $this->blogDetailsTDK($project,$routerMap); | 60 | $tdkInfo = $this->blogDetailsTDK($project,$routerMap); |
| 57 | } | 61 | } |
| 58 | //聚合页TDK设置 | 62 | //聚合页TDK设置 |
| 59 | - if ($type == WebTemplateCommon::$productKeywordName){ | 63 | + if ($type == RouteMap::SOURCE_PRODUCT_KEYWORD){ |
| 60 | $tdkInfo = $this->productKeywordsTDK($project,$routerMap); | 64 | $tdkInfo = $this->productKeywordsTDK($project,$routerMap); |
| 61 | } | 65 | } |
| 62 | //新闻列表页TDK设置 | 66 | //新闻列表页TDK设置 |
| 63 | - if ($type == WebTemplateCommon::$newsCategoryName){ | 67 | + if ($type == RouteMap::SOURCE_NEWS_CATE){ |
| 64 | $tdkInfo = $this->newsCategoryTDK($project,$routerMap); | 68 | $tdkInfo = $this->newsCategoryTDK($project,$routerMap); |
| 65 | } | 69 | } |
| 66 | //博客列表页TDK设置 | 70 | //博客列表页TDK设置 |
| 67 | - if ($type == WebTemplateCommon::$blogCategoryName){ | 71 | + if ($type == RouteMap::SOURCE_BLOG_CATE){ |
| 68 | $tdkInfo = $this->blogCategoryTDK($project,$routerMap); | 72 | $tdkInfo = $this->blogCategoryTDK($project,$routerMap); |
| 69 | } | 73 | } |
| 70 | //产品列表页TDK设置 | 74 | //产品列表页TDK设置 |
| 71 | - if ($type == WebTemplateCommon::$productCategoryName){ | 75 | + if ($type == RouteMap::SOURCE_PRODUCT_CATE){ |
| 72 | $tdkInfo = $this->productCategoryTDK($project,$routerMap); | 76 | $tdkInfo = $this->productCategoryTDK($project,$routerMap); |
| 73 | } | 77 | } |
| 74 | 78 | ||
| @@ -304,7 +308,7 @@ class TdkService{ | @@ -304,7 +308,7 @@ class TdkService{ | ||
| 304 | public function moduleDetailsTDK($project,$routerMap): array | 308 | public function moduleDetailsTDK($project,$routerMap): array |
| 305 | { | 309 | { |
| 306 | $tdkInfo = []; | 310 | $tdkInfo = []; |
| 307 | - $moduleInfo = Module::where("project_id",$project->id)->where("status",0)->where("id",$routerMap->source_id)->first(); | 311 | + $moduleInfo = CustomModuleExtentContent::where("project_id",$project->id)->where("status",0)->where("id",$routerMap->source_id)->first(); |
| 308 | $webSetting = WebSetting::getWebSetting($project); | 312 | $webSetting = WebSetting::getWebSetting($project); |
| 309 | if (!empty($moduleInfo)){ | 313 | if (!empty($moduleInfo)){ |
| 310 | //title | 314 | //title |
| @@ -331,7 +335,7 @@ class TdkService{ | @@ -331,7 +335,7 @@ class TdkService{ | ||
| 331 | public function moduleCategoryTDK($project,$routerMap): array | 335 | public function moduleCategoryTDK($project,$routerMap): array |
| 332 | { | 336 | { |
| 333 | $tdkInfo = []; | 337 | $tdkInfo = []; |
| 334 | - $moduleCategoryInfo = ModuleCategory::getModuleCategoryAndExtendByRoute($project->id,$routerMap->route); | 338 | + $moduleCategoryInfo = CustomModuleCategory::getModuleCategoryAndExtendByRoute($project->id,$routerMap->route); |
| 335 | $webSetting = WebSetting::getWebSetting($project); | 339 | $webSetting = WebSetting::getWebSetting($project); |
| 336 | if (!empty($moduleCategoryInfo)){ | 340 | if (!empty($moduleCategoryInfo)){ |
| 337 | //title | 341 | //title |
| @@ -359,7 +363,7 @@ class TdkService{ | @@ -359,7 +363,7 @@ class TdkService{ | ||
| 359 | { | 363 | { |
| 360 | $tdkInfo = []; | 364 | $tdkInfo = []; |
| 361 | if (!empty($routerMap)){ | 365 | if (!empty($routerMap)){ |
| 362 | - $webCustom = WebCustom::where("id",$routerMap->source_id)->where("status",1)->first(); | 366 | + $webCustom = BCustomTemplate::where("id",$routerMap->source_id)->where("status",1)->first(); |
| 363 | //seo拼接 | 367 | //seo拼接 |
| 364 | $webSeo = WebSettingSeo::where("project_id",$project->id)->first(); | 368 | $webSeo = WebSettingSeo::where("project_id",$project->id)->first(); |
| 365 | //网站设置 | 369 | //网站设置 |
| @@ -3,8 +3,8 @@ | @@ -3,8 +3,8 @@ | ||
| 3 | 3 | ||
| 4 | namespace App\Services\Html; | 4 | namespace App\Services\Html; |
| 5 | 5 | ||
| 6 | -use App\Models\Project\UpdateLog; | ||
| 7 | -use App\Models\Project\UpdateOldInfo; | 6 | +use App\Models\Com\UpdateLog; |
| 7 | +use App\Models\Com\UpdateOldInfo; | ||
| 8 | 8 | ||
| 9 | class UpdateService | 9 | class UpdateService |
| 10 | { | 10 | { |
| @@ -6,15 +6,16 @@ namespace App\Services\Html; | @@ -6,15 +6,16 @@ namespace App\Services\Html; | ||
| 6 | use App\Console\Commands\ProjectService; | 6 | use App\Console\Commands\ProjectService; |
| 7 | use App\Helper\Str; | 7 | use App\Helper\Str; |
| 8 | use App\Helper\Translate; | 8 | use App\Helper\Translate; |
| 9 | +use App\Models\Com\UpdateProgress; | ||
| 9 | use App\Models\Devops\ServerConfig; | 10 | use App\Models\Devops\ServerConfig; |
| 11 | +use App\Models\Domain\DomainInfo; | ||
| 10 | use App\Models\Project\DeployOptimize; | 12 | use App\Models\Project\DeployOptimize; |
| 11 | -use App\Models\Project\DomainInfo; | ||
| 12 | use App\Models\Project\Project; | 13 | use App\Models\Project\Project; |
| 13 | use App\Models\Project\UpdateMasterWebsiteModel; | 14 | use App\Models\Project\UpdateMasterWebsiteModel; |
| 14 | use App\Models\Project\UpdateMinorLanguagesModel; | 15 | use App\Models\Project\UpdateMinorLanguagesModel; |
| 15 | use App\Models\Project\UpdateProgressModel; | 16 | use App\Models\Project\UpdateProgressModel; |
| 16 | -use App\Models\RouteMap; | ||
| 17 | use App\Models\WebSetting\WebSetting; | 17 | use App\Models\WebSetting\WebSetting; |
| 18 | +use App\Utils\EncryptUtils; | ||
| 18 | use Illuminate\Http\Exceptions\HttpResponseException; | 19 | use Illuminate\Http\Exceptions\HttpResponseException; |
| 19 | use Illuminate\Http\JsonResponse; | 20 | use Illuminate\Http\JsonResponse; |
| 20 | use Illuminate\Http\Request; | 21 | use Illuminate\Http\Request; |
| @@ -241,22 +242,22 @@ class WebInfoService{ | @@ -241,22 +242,22 @@ class WebInfoService{ | ||
| 241 | $this->connectMysql($item); | 242 | $this->connectMysql($item); |
| 242 | 243 | ||
| 243 | //主站 | 244 | //主站 |
| 244 | - $updateProgressModel = UpdateProgressModel::where("project_id",$item["project_id"])->where("type",1)->orderBy("id","desc")->first(); | 245 | + $updateProgressModel = UpdateProgress::where("project_id",$item["project_id"])->where("type",1)->orderBy("id","desc")->first(); |
| 245 | if (!empty($updateProgressModel)){ | 246 | if (!empty($updateProgressModel)){ |
| 246 | $totalNum = $updateProgressModel->total_num; | 247 | $totalNum = $updateProgressModel->total_num; |
| 247 | $currentNum = $updateProgressModel->current_num; | 248 | $currentNum = $updateProgressModel->current_num; |
| 248 | if ((int)$currentNum < (int)$totalNum){ | 249 | if ((int)$currentNum < (int)$totalNum){ |
| 249 | - UpdateProgressModel::where('id', $updateProgressModel->id)->update(['current_num' => $totalNum]); | 250 | + UpdateProgress::where('id', $updateProgressModel->id)->update(['current_num' => $totalNum]); |
| 250 | } | 251 | } |
| 251 | } | 252 | } |
| 252 | 253 | ||
| 253 | //小语种 | 254 | //小语种 |
| 254 | - $updateProgressModel = UpdateProgressModel::where("project_id",$item["project_id"])->where("type",2)->orderBy("id","desc")->first(); | 255 | + $updateProgressModel = UpdateProgress::where("project_id",$item["project_id"])->where("type",2)->orderBy("id","desc")->first(); |
| 255 | if (!empty($updateProgressModel)){ | 256 | if (!empty($updateProgressModel)){ |
| 256 | $totalNum = $updateProgressModel->total_num; | 257 | $totalNum = $updateProgressModel->total_num; |
| 257 | $currentNum = $updateProgressModel->current_num; | 258 | $currentNum = $updateProgressModel->current_num; |
| 258 | if ((int)$currentNum < (int)$totalNum){ | 259 | if ((int)$currentNum < (int)$totalNum){ |
| 259 | - UpdateProgressModel::where('id', $updateProgressModel->id)->update(['current_num' => $totalNum]); | 260 | + UpdateProgress::where('id', $updateProgressModel->id)->update(['current_num' => $totalNum]); |
| 260 | } | 261 | } |
| 261 | } | 262 | } |
| 262 | 263 | ||
| @@ -278,7 +279,6 @@ class WebInfoService{ | @@ -278,7 +279,6 @@ class WebInfoService{ | ||
| 278 | //获取项目 | 279 | //获取项目 |
| 279 | $projectByDomain = Project::getProjectByDomain($domain); | 280 | $projectByDomain = Project::getProjectByDomain($domain); |
| 280 | if (!empty($projectByDomain)){ | 281 | if (!empty($projectByDomain)){ |
| 281 | - $projectService = new ProjectService(); | ||
| 282 | $projectInfo["domain"] = $domain; | 282 | $projectInfo["domain"] = $domain; |
| 283 | $projectInfo["project_id"] = $projectByDomain->project_id; | 283 | $projectInfo["project_id"] = $projectByDomain->project_id; |
| 284 | $project = Project::where("id",$projectByDomain->project_id)->first(); | 284 | $project = Project::where("id",$projectByDomain->project_id)->first(); |
| @@ -287,11 +287,12 @@ class WebInfoService{ | @@ -287,11 +287,12 @@ class WebInfoService{ | ||
| 287 | $projectInfo["main_lang_id"] = $project->main_lang_id; | 287 | $projectInfo["main_lang_id"] = $project->main_lang_id; |
| 288 | $serverConfig = ServerConfig::where("id",$project->mysql_id)->first(); | 288 | $serverConfig = ServerConfig::where("id",$project->mysql_id)->first(); |
| 289 | if (!empty($serverConfig)){ | 289 | if (!empty($serverConfig)){ |
| 290 | + $encrypt = new EncryptUtils(); | ||
| 290 | $projectInfo["host"] = $serverConfig->host; | 291 | $projectInfo["host"] = $serverConfig->host; |
| 291 | - $projectInfo["port"] = (int)$projectService::unlock_url($serverConfig->port); | 292 | + $projectInfo["port"] = (int)$encrypt->unlock_url($serverConfig->port); |
| 292 | $projectInfo["database"] = "gl_data_".$projectByDomain->project_id; | 293 | $projectInfo["database"] = "gl_data_".$projectByDomain->project_id; |
| 293 | - $projectInfo["username"] = $projectService::unlock_url($serverConfig->user); | ||
| 294 | - $projectInfo["password"] = $projectService::unlock_url($serverConfig->password); | 294 | + $projectInfo["username"] = $encrypt->unlock_url($serverConfig->user); |
| 295 | + $projectInfo["password"] = $encrypt->unlock_url($serverConfig->password); | ||
| 295 | } | 296 | } |
| 296 | } | 297 | } |
| 297 | } | 298 | } |
-
请 注册 或 登录 后发表评论