This commit is contained in:
aozhiwei 2024-08-19 16:27:23 +08:00
parent 28a61308c9
commit 6fcb3e1879
2 changed files with 12 additions and 0 deletions

View File

@ -406,6 +406,10 @@ class BaseController {
} }
} }
public static function verifySwitch($name) {
myself()->_callServiceStatic('ServerSwitchService', 'verifySwitch', $name);
}
public function _mergeAlikeItemKey($items){ public function _mergeAlikeItemKey($items){
$hashItems = array(); $hashItems = array();
foreach ($items as $item){ foreach ($items as $item){

View File

@ -41,6 +41,14 @@ class ServerSwitchService {
return false; return false;
} }
public static function verifySwitch($name) {
if (self::getConfig()[$name] > 0){
return;
}
myself()->_rspErr(1008, 'function is disabled');
die();
}
// private $switchConfig = null; // private $switchConfig = null;
// //
// private function initConfig(){ // private function initConfig(){