* Pass the 'method' parameter to the 'getFieldList' function in the datatableModel class to ensure the retrieval of correct field settings for the data table on the product view list page of the program module

This commit is contained in:
chentao
2023-06-14 15:26:37 +08:00
parent f6a824a43f
commit 81d6bcb30f
+2 -3
View File
@@ -90,14 +90,13 @@ class datatableModel extends model
{
$method = $this->app->getMethodName();
$datatableId = $module . ucfirst($method);
$mode = isset($this->config->datatable->$datatableId->mode) ? $this->config->datatable->$datatableId->mode : 'table';
$cfgMethod = ($module == 'program' && $method == 'productview') ? $method : '';
$module = zget($this->config->datatable->moduleAlias, "$module-$method", $module);
if(!isset($this->config->$module)) $this->loadModel($module);
if(isset($this->config->datatable->$datatableId->cols)) $setting = json_decode($this->config->datatable->$datatableId->cols, true);
$fieldList = $this->getFieldList($module);
$fieldList = $this->getFieldList($module, $cfgMethod);
if(empty($setting))
{
$setting = $this->formatFields($module, $fieldList);