* Use oldPages in framework control display function.

This commit is contained in:
songchenxuan
2023-11-27 13:55:38 +08:00
parent 4d64cc4fe6
commit c7ef380399
3 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -941,7 +941,9 @@ class baseControl
$modulePath = $this->app->getModulePath($this->appName, $moduleName);
$viewType = $this->viewType == 'mhtml' ? 'html' : $this->viewType;
$mainViewFile = $modulePath . 'ui' . DS . $this->devicePrefix . strtolower($methodName) . '.' . $viewType . '.php';
if($moduleName != 'screen' || $methodName != 'view') return $this->render($moduleName, $methodName);
if($moduleName != 'index') $this->app->loadModuleConfig('index');
if(!in_array("{$moduleName}-{$methodName}", $this->config->index->oldPages)) return $this->render($moduleName, $methodName);
}
if(empty($this->output)) $this->parse($moduleName, $methodName);
+1
View File
@@ -24,3 +24,4 @@ $config->index->appGroup['user'] = 'admin';
$config->index->oldPages = array();
$config->index->oldPages[] = 'screen-view';
$config->index->oldPages[] = 'screen-burn';
+1
View File
@@ -67,6 +67,7 @@ class screenModel extends model
public function getByID(int $screenID, int $year = 0, int $dept = 0, string $account = ''): object|bool
{
$screen = $this->dao->select('*')->from(TABLE_SCREEN)->where('id')->eq($screenID)->fetch();
if($screen->id == 5) return $screen;
if(!$screen) return false;
if(empty($screen->scheme)) $screen->scheme = file_get_contents(__DIR__ . '/json/screen.json');