diff --git a/app/command/CleanViteJs.php b/app/command/CleanViteJs.php index 86199f3..ae905e1 100644 --- a/app/command/CleanViteJs.php +++ b/app/command/CleanViteJs.php @@ -99,8 +99,8 @@ class CleanViteJs extends Command if(strpos($file, 'window.location.protocol.indexOf("https")>=0')!==false){ //index $file = str_replace('(window.location.protocol.indexOf("https")>=0)', '1', $file); - $file = preg_replace('!setTimeout\(\(\(\)=>\w+\(\)\),3e3\)!', '', $file); - $file = preg_replace('!setTimeout\(\(function\(\)\{return \w+\(\)\}\),3e3\)!', '', $file); + $file = preg_replace('!setTimeout\(\(\(\)=>\{\w+\(\)\}\),3e3\)!', '', $file); + $file = preg_replace('!setTimeout\(\(function\(\)\{\w+\(\)\}\),3e3\)!', '', $file); $file = preg_replace('!recommendShow:\w+,!', 'recommendShow:!1,', $file); $code = $this->getExtendCode($file, '"需求反馈"', 2); if($code){ @@ -124,16 +124,20 @@ class CleanViteJs extends Command $end = strpos($file, $code)+strlen($code); $code = substr($file, $start, $end - $start + 1); $file = str_replace($code, '', $file); - $file = preg_replace('!,isCalc:\w+,isInput:\w+,isCheck:\w+,!', ',isCalc:!1,isInput:!1,isCheck:!1,', $file); - $file = preg_replace('!computed\(\(\(\)=>"calc"===\w+\.type\|\|"checkConfirm"===\w+\.type\)\)!', '!1', $file); - $file = preg_replace('!computed\(\(\(\)=>"input"===\w+\.type\)\)!', '!1', $file); - $file = preg_replace('!computed\(\(\(\)=>"check"===\w+\.type\|\|"checkConfirm"===\w+\.type\)\)!', '!1', $file); - $file = preg_replace('!computed\(\(function\(\)\{return"calc"===\w+\.type\|\|"checkConfirm"===\w+\.type\}\)\)!', '!1', $file); - $file = preg_replace('!computed\(\(function\(\)\{return"input"===\w+\.type\}\)\)!', '!1', $file); - $file = preg_replace('!computed\(\(function\(\)\{return"check"===\w+\.type\|\|"checkConfirm"===\w+\.type\}\)\)!', '!1', $file); $file = str_replace('startNegotiate(),', '', $file); $flag = true; } + + if(strpos($file, '"calc"') !== false && strpos($file, '"checkConfirm"') !== false){ //main2 + $file = preg_replace('!,isCalc:\w+,isInput:\w+,isCheck:\w+,!', ',isCalc:!1,isInput:!1,isCheck:!1,', $file); + $file = preg_replace('!\w+\(\(\(\)=>"calc"===\w+\.type\|\|"checkConfirm"===\w+\.type\)\)!', '!1', $file); + $file = preg_replace('!\w+\(\(\(\)=>"input"===\w+\.type\)\)!', '!1', $file); + $file = preg_replace('!\w+\(\(\(\)=>"check"===\w+\.type\|\|"checkConfirm"===\w+\.type\)\)!', '!1', $file); + $file = preg_replace('!\w+\(\(function\(\)\{return"calc"===\w+\.type\|\|"checkConfirm"===\w+\.type\}\)\)!', '!1', $file); + $file = preg_replace('!\w+\(\(function\(\)\{return"input"===\w+\.type\}\)\)!', '!1', $file); + $file = preg_replace('!\w+\(\(function\(\)\{return"check"===\w+\.type\|\|"checkConfirm"===\w+\.type\}\)\)!', '!1', $file); + $flag = true; + } if(strpos($file, '请冷静几秒钟,确认以下要删除的数据')!==false && strpos($file, '"计算结果:"')!==false){ //site $code = $this->getExtendCode($file, '"计算结果:"', 2, '[', ']'); @@ -148,21 +152,21 @@ class CleanViteJs extends Command $flag = true; } - if(strpos($file, '"bt-waf-gray"')!==false){ //site.popup + /*if(strpos($file, '"bt-waf-gray"')!==false){ //site.popup $code = $this->getExtendCode($file, '"bt-waf-gray"', 2); $code = $this->getExtendCode($file, $code, 1, '[', ']'); $code = $this->getExtendFunction($file, $code); $file = str_replace($code, '""', $file); $flag = true; - } + }*/ if(strpos($file, '"商用SSL证书"')!==false){ //site-ssl $code = $this->getExtendFunction($file, '"商用SSL证书"', '{', '}'); $file = str_replace($code, '', $file); $code = $this->getExtendFunction($file, '"测试证书"', '{', '}'); $file = str_replace($code, '', $file); - $file = preg_replace('!\w+\.value="currentCertInfo":\w+\.value="busSslList"!', 'i.value="currentCertInfo":i.value="currentCertInfo"', $file); - $file = preg_replace('!\{\w+\.value="busSslList",\w+\(\)\}!', '{i.value="letsEncryptList"}', $file); + $file = str_replace('"currentCertInfo":"busSslList"', '"currentCertInfo":"currentCertInfo"', $file); + $file = preg_replace('!\{(\w+)\.value="busSslList",\w+\(\)\}!', '{$1.value="letsEncryptList"}', $file); $flag = true; } @@ -172,6 +176,20 @@ class CleanViteJs extends Command $file = str_replace($code, '', $file); $flag = true; } + + if(strpos($file, '"recom-view"')!==false){ //soft + $code = getExtendFunction($file, '"recom-view"'); + $file = str_replace($code, 'void(0)', $file); + $flag = true; + } + + if(strpos($file, '"打开插件文件目录"')!==false){ //soft.table + $code = getExtendFunction($file, '"(续费)"'); + $file = str_replace($code, '""', $file); + $code = getExtendFunction($file, '"(续费)"'); + $file = str_replace($code, '""', $file); + $flag = true; + } for($i=0;$i<5;$i++){ $code = $this->getExtendCode($file, 'content:"需求反馈"', 2); diff --git a/app/controller/Index.php b/app/controller/Index.php index 3fb6a73..6367894 100644 --- a/app/controller/Index.php +++ b/app/controller/Index.php @@ -8,13 +8,13 @@ class Index extends BaseController { public function index() { - return 'Server is ok'; + return ''; } public function download() { if(config_get('download_page') == '0' && !request()->islogin){ - return redirect('/admin/login'); + return 'need login'; } View::assign('siteurl', request()->root(true)); return view(); diff --git a/app/script/convert.sh b/app/script/convert.sh index 511e59b..4436d96 100644 --- a/app/script/convert.sh +++ b/app/script/convert.sh @@ -1,8 +1,8 @@ #!/bin/bash -Linux_Version="8.1.0" -Windows_Version="7.9.0" -Btm_Version="2.2.9" +Linux_Version="8.2.0" +Windows_Version="8.0.0" +Btm_Version="2.3.0" FILES=( public/install/src/panel6.zip diff --git a/app/view/admin/login.html b/app/view/admin/login.html index 7d51a75..00ad09e 100644 --- a/app/view/admin/login.html +++ b/app/view/admin/login.html @@ -23,7 +23,7 @@ - 宝塔第三方云端管理中心 + Cloud