Joomla 2.5创建组件并保存数据

2024-02-28

我一直在使用这个文档(我在网上可以找到的唯一文档)来构建一个组件:http://docs.joomla.org/Developing_a_Model-View-Controller_Component/2.5/Introduction http://docs.joomla.org/Developing_a_Model-View-Controller_Component/2.5/Introduction

我能在一定程度上理解它,但它确实缺乏任何定义。我创建的组件在一定程度上可以工作,尽管我遇到了一些更奇怪的问题。

基本上,我需要该组件做的只是加载一个设置区域来设置一些值,并通过它能够更改这些值。这是我所拥有的内容的细分:

表单的视图,从数据库加载表单数据。 用于保存/应用和取消的工具栏设置。

这加载没有错误,并且根据我发现的 joomla 上的所有文档,通过使用模型中连接的 JTable 初始化 JControllerForm 实例,简单的表单保存应该会自动工作。然而,即使代码中绝对没有任何地方引用末尾带有 s 的视图(主视图是tireapi,表单总是重定向到tireapis)。

这会导致 500 错误,因为没有设置具有该视图的地点。该文档确实包含视图列表,但是我只需要编辑一行,因此列表毫无意义。我知道可以将参数设置为组件而不是创建数据库字段,但是我无法找到与之相关的任何文档。

我正在寻找的是如何阻止组件重定向到不存在的视图并正确保存数据的方向。不仅显示示例代码,而且描述功能及其工作方式的文档链接将是有益的。

这是一些代码,请随意指出我可能完全忽略的任何内容(我是创建组件的新手):

轮胎API.php:

<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

// import joomla controller library
jimport('joomla.application.component.controller');

// Get an instance of the controller prefixed by TireAPI
$controller = JController::getInstance('TireAPI');

// Get the task
$jinput = JFactory::getApplication()->input;
$task = $jinput->get('task', "", 'STR' );

// Perform the Request task
$controller->execute($task);

// Redirect if set by the controller
$controller->redirect();
?>

控制器.php:

<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

// import Joomla controller library
jimport('joomla.application.component.controller');

class TireAPIController extends JController{
    function display($cachable = false){
        // set default view if not set
        $input = JFactory::getApplication()->input;
        $input->set('view', $input->getCmd('view', 'TireAPI'));

        // call parent behavior
        parent::display($cachable);
    }
}
?>

控制器/tireapi.php:

<?php
// No direct access to this file
 defined('_JEXEC') or die('Restricted access');
// import Joomla controllerform library
jimport('joomla.application.component.controllerform');
class TireAPIControllerTireAPI extends JControllerForm{}
?>

模型/tireapi.php:

<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import the Joomla modellist library
jimport('joomla.application.component.modeladmin');
class TireAPIModelTireAPI extends JModelAdmin{
    protected $settings; //define settings

    public function getTable($type = 'TireAPI', $prefix = 'TireAPITable', $config = array()){
        return JTable::getInstance($type, $prefix, $config);
    }

    public function getSettings(){ //grab settings from database
        if(!isset($this->settings)){
            $table = $this->getTable();
            $table->load(1);
            $this->settings = $table;
        }
        return $this->settings;
    }
    public function getForm($data = array(), $loadData = true){
    // Get the form.
        $form = $this->loadForm('com_tireapi.tireapi', 'tireapi',
            array('control' => 'jform', 'load_data' => $loadData));
        if (empty($form)){
            return false;
        }
        return $form;
    }
    protected function loadFormData(){
        // Check the session for previously entered form data.
        $data = JFactory::getApplication()->getUserState('com_tireapi.edit.tireapi.data', array());
        if (empty($data)){
            $data = $this->getSettings();
        }
        return $data;
    }
}
?>

表/tireapi.php:

<?php
// No direct access
defined('_JEXEC') or die('Restricted access');

// import Joomla table library
jimport('joomla.database.table');
class TireAPITableTireAPI extends JTable
{
    function __construct( &$db ) {
        parent::__construct('#__tireapi', 'id', $db);
    }
}
?>

视图/tireapi/view.html.php:

<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

// import Joomla view library
jimport('joomla.application.component.view');

class TireAPIViewTireAPI extends JView{
        function display($tpl = null){

            $form = $this->get('Form');
            $item = $this->get('Settings');

            // Check for errors.
            if(count($errors = $this->get('Errors'))){
                JError::raiseError(500, implode('<br />', $errors));
                return false;
            }
            // Assign data to the view
            $this->item = $item;
            $this->form = $form;

            $this->addToolBar();

            // Display the template
            parent::display($tpl);
        }
        protected function addToolBar() {
            $input = JFactory::getApplication()->input;
            JToolBarHelper::title(JText::_('COM_TIREAPI_MANAGER_TIREAPIS'));
            JToolBarHelper::apply('tireapi.apply');
            JToolBarHelper::save('tireapi.save');
            JToolBarHelper::cancel('tireapi.cancel');
        }
}
?>

视图/tireapi/tmpl/default.php:

<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted Access');

// load tooltip behavior
JHtml::_('behavior.tooltip');
?>
<form action="<?php echo JRoute::_('index.php?option=com_tireapi&layout=edit&id='.(int) $this->item->id); ?>"
      method="post" name="adminForm" id="tireapi-form">
    <fieldset class="adminform">
            <legend><?php echo JText::_( 'COM_TIREAPI_DETAILS' ); ?></legend>
            <ul class="adminformlist">
    <?php foreach($this->form->getFieldset() as $field): ?>
                    <li><?php echo $field->label;echo $field->input;?></li>
    <?php endforeach; ?>
            </ul>
    </fieldset>
    <div>
        <input type="hidden" name="task" value="tireapi.edit" />
        <?php echo JHtml::_('form.token'); ?>
    </div>
</form>

这些是我能想到的所有可能重要的文件,请告诉我是否应该再包含。

更新: 现在我可以停止重定向问题,但它不会保存数据。 我收到此错误: 您不得使用该链接直接访问该页面 (#1)。

这是让这个极其基本的管理功能发挥作用的最后一个障碍。有任何想法吗? 为了澄清这一点,我通过 xml 文件设置表单并正确加载,甚至使用数据库中的正确数据填充它们。但是,当我单击“应用”时,它只是将我引导回带有上面列出的错误的表单,而不保存。


您未解决的主要问题是您希望它重定向到哪里? Joomla 默认情况下重定向到列表视图(除非您直接指定列表视图,否则通过在视图名称中添加“s”)。

您可以通过多种方式覆盖它:

在您的控制器 (controllers/tireapi.php) 中,设置您自己的列表视图。我认为你甚至可以将其视为相同的观点:

function __construct() {
    $this->view_list = 'tireapi';
    parent::__construct();
}

覆盖保存函数以更改保存后发生的重定向(再次在控制器中)。这是通过更改其他内容自然发生的重定向来实现的:

public function save($key = null, $urlVar = null) {
    $return = parent::save($key, $urlVar);
    $this->setRedirect(JRoute::_('index.php?option=com_tireapi&view=tireapi'));
    return $return;
}

其中之一应该可以满足您的需要。

** 更新

为了让项目最初结帐,您将需要更改组件处理未设置视图的方式。现在您只需设置视图,让我们重定向!更新后的controller.php如下。

<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

// import Joomla controller library
jimport('joomla.application.component.controller');

class TireAPIController extends JController{
    function display($cachable = false){
        // set default view if not set
        $input = JFactory::getApplication()->input;
        $view = $input->get('view');
        if (!$view) {
            JFactory::getApplication()->redirect('index.php?option=com_tireapi&task=tireapi.edit&id=1');
            exit();
        }

        // call parent behavior
        parent::display($cachable);
    }
}
?>

注意:如果超过一个人需要编辑此内容,则效果会非常差,因为如果您在保存后将其重定向回此页面,则系统会在您打开组件时对其进行检查。因为这样它将始终被签出到最后编辑它的人,因此下一个人将无法打开它。如果只有一个人编辑就可以了。

第二个注意:如果您不想破解结帐系统,您也可以在保存过程中忽略它,这基本上是相同级别的黑客攻击。

下面是来自controllerform.php的保存函数的副本libraries/joomla/application/component/。这是通常在保存时运行的内容(因为您继承的位置。我已经删除了该项目是否签出的检查。因此,如果您将其放入您的tireapi.php控制器中,parent::save...是的,它会运行,而您不必费心检查该项目(即忽略所有评论......)。 (老实说,就您而言,您可能可以删除更多内容,但这就是保存时发生的情况,顺便说一句!)

public function save($key = null, $urlVar = null)
{
    // Check for request forgeries.
    JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));

    // Initialise variables.
    $app   = JFactory::getApplication();
    $lang  = JFactory::getLanguage();
    $model = $this->getModel();
    $table = $model->getTable();
    $data  = JRequest::getVar('jform', array(), 'post', 'array');
    $checkin = property_exists($table, 'checked_out');
    $context = "$this->option.edit.$this->context";
    $task = $this->getTask();

    // Determine the name of the primary key for the data.
    if (empty($key))
    {
        $key = $table->getKeyName();
    }

    // To avoid data collisions the urlVar may be different from the primary key.
    if (empty($urlVar))
    {
        $urlVar = $key;
    }

    $recordId = JRequest::getInt($urlVar);

    // Populate the row id from the session.
    $data[$key] = $recordId;

    // The save2copy task needs to be handled slightly differently.
    if ($task == 'save2copy')
    {
        // Check-in the original row.
        if ($checkin && $model->checkin($data[$key]) === false)
        {
            // Check-in failed. Go back to the item and display a notice.
            $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError()));
            $this->setMessage($this->getError(), 'error');

            $this->setRedirect(
                JRoute::_(
                    'index.php?option=' . $this->option . '&view=' . $this->view_item
                    . $this->getRedirectToItemAppend($recordId, $urlVar), false
                )
            );

            return false;
        }

        // Reset the ID and then treat the request as for Apply.
        $data[$key] = 0;
        $task = 'apply';
    }

    // Access check.
    if (!$this->allowSave($data, $key))
    {
        $this->setError(JText::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'));
        $this->setMessage($this->getError(), 'error');

        $this->setRedirect(
            JRoute::_(
                'index.php?option=' . $this->option . '&view=' . $this->view_list
                . $this->getRedirectToListAppend(), false
            )
        );

        return false;
    }

    // Validate the posted data.
    // Sometimes the form needs some posted data, such as for plugins and modules.
    $form = $model->getForm($data, false);

    if (!$form)
    {
        $app->enqueueMessage($model->getError(), 'error');

        return false;
    }

    // Test whether the data is valid.
    $validData = $model->validate($form, $data);

    // Check for validation errors.
    if ($validData === false)
    {
        // Get the validation messages.
        $errors = $model->getErrors();

        // Push up to three validation messages out to the user.
        for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++)
        {
            if ($errors[$i] instanceof Exception)
            {
                $app->enqueueMessage($errors[$i]->getMessage(), 'warning');
            }
            else
            {
                $app->enqueueMessage($errors[$i], 'warning');
            }
        }

        // Save the data in the session.
        $app->setUserState($context . '.data', $data);

        // Redirect back to the edit screen.
        $this->setRedirect(
            JRoute::_(
                'index.php?option=' . $this->option . '&view=' . $this->view_item
                . $this->getRedirectToItemAppend($recordId, $urlVar), false
            )
        );

        return false;
    }

    // Attempt to save the data.
    if (!$model->save($validData))
    {
        // Save the data in the session.
        $app->setUserState($context . '.data', $validData);

        // Redirect back to the edit screen.
        $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_SAVE_FAILED', $model->getError()));
        $this->setMessage($this->getError(), 'error');

        $this->setRedirect(
            JRoute::_(
                'index.php?option=' . $this->option . '&view=' . $this->view_item
                . $this->getRedirectToItemAppend($recordId, $urlVar), false
            )
        );

        return false;
    }

    // Save succeeded, so check-in the record.
    if ($checkin && $model->checkin($validData[$key]) === false)
    {
        // Save the data in the session.
        $app->setUserState($context . '.data', $validData);

        // Check-in failed, so go back to the record and display a notice.
        $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError()));
        $this->setMessage($this->getError(), 'error');

        $this->setRedirect(
            JRoute::_(
                'index.php?option=' . $this->option . '&view=' . $this->view_item
                . $this->getRedirectToItemAppend($recordId, $urlVar), false
            )
        );

        return false;
    }

    $this->setMessage(
        JText::_(
            ($lang->hasKey($this->text_prefix . ($recordId == 0 && $app->isSite() ? '_SUBMIT' : '') . '_SAVE_SUCCESS')
                ? $this->text_prefix
                : 'JLIB_APPLICATION') . ($recordId == 0 && $app->isSite() ? '_SUBMIT' : '') . '_SAVE_SUCCESS'
        )
    );

    // Redirect the user and adjust session state based on the chosen task.
    switch ($task)
    {
        case 'apply':
            // Set the record data in the session.
            $recordId = $model->getState($this->context . '.id');
            $this->holdEditId($context, $recordId);
            $app->setUserState($context . '.data', null);
            $model->checkout($recordId);

            // Redirect back to the edit screen.
            $this->setRedirect(
                JRoute::_(
                    'index.php?option=' . $this->option . '&view=' . $this->view_item
                    . $this->getRedirectToItemAppend($recordId, $urlVar), false
                )
            );
            break;

        case 'save2new':
            // Clear the record id and data from the session.
            $this->releaseEditId($context, $recordId);
            $app->setUserState($context . '.data', null);

            // Redirect back to the edit screen.
            $this->setRedirect(
                JRoute::_(
                    'index.php?option=' . $this->option . '&view=' . $this->view_item
                    . $this->getRedirectToItemAppend(null, $urlVar), false
                )
            );
            break;

        default:
            // Clear the record id and data from the session.
            $this->releaseEditId($context, $recordId);
            $app->setUserState($context . '.data', null);

            // Redirect to the list screen.
            $this->setRedirect(
                JRoute::_(
                    'index.php?option=' . $this->option . '&view=' . $this->view_list
                    . $this->getRedirectToListAppend(), false
                )
            );
            break;
    }

    // Invoke the postSave method to allow for the child class to access the model.
    $this->postSaveHook($model, $validData);

    return true;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Joomla 2.5创建组件并保存数据 的相关文章

  • CSS 宽度属性不受尊重

    我正在 Joomla 中向一个具有 virtualmart 的网站添加一些格式化的 div 标签 到目前为止我在这方面已经取得了成功 我修改了我们使用的模板 以包含一个 css 文件 article css 其中包含我的自定义内容 我所拥有
  • django模型管理添加表单卡住了

    考虑一下这个 admin register Personal site admin site class PersonalAdmin admin ModelAdmin form ChangePersonalForm add form Add
  • 如何在telnet客户端上实现命令历史记录? (向上/向下箭头)

    我有一台接受 telnet 连接进行管理的服务器 我错过了命令历史记录 因此我想让我的 telnet 会话支持它 我的问题 1 我是否必须在服务器端实现这一点 以便服务器将过去的命令发送到客户端 然后客户端可以重新执行 2 是否有办法在te
  • 如何使用 InstallShield 在没有管理员权限的情况下为每个用户注册互操作 .net 程序集

    我正在执行一项任务 在使用 installshield 安装期间注册 net 程序集时 不提示普通用户弹出窗口 UAC 以批准安装 Windows Addin 应用程序 在 Windows XP 上 它工作正常 但在 Vista 和 Win
  • 如何使用 PostgreSQL 计数估计来加速 Django 的管理页面?

    众所周知 当数据库表有很多行时 Django 的管理列表视图会变得相当慢 这是因为 Django 分页器默认使用 慢 PostgreSQLCOUNT query 因为估计对我们来说很好 而且速度要快得多 例如 SELECT reltuple
  • 验证码 重新验证码不再起作用

    昨天工作正常 但今天验证码不再出现 我调试了代码 我意识到我的 joomla 插件 captcharecaptcha 在将页面渲染为 javascript 文件时包含此文件 http api recaptcha net js recaptc
  • Laravel 5 委托一条路由 - 根据角色加载不同的控制器

    所以我刚刚开始学习 Laravel 并且我已经实现了 Entrust Role Permission 包 效果非常好 现在我的问题是 我想要一个 仪表板 页面 如下所示 example com dashboard 问题是 我不确定如何设置
  • 当cmd以管理员身份运行时如何将输入发送到命令?

    我创建了一个将键盘输入发送到的应用程序cmd exe 这在运行时有效cmd作为普通用户但失败时cmd以管理员身份运行 这是我的代码 Var Wnd hwnd begin wnd FindWindow ConsoleWindowClass 0
  • 如何将变量从控制器传递到视图 joomla mvc

    根据此示例 如何将变量从 joomla 子控制器传递到视图 class MYControllerControllerParser extends JController public function construct default a
  • 为初学者覆盖 Magento 管理控制器

    在 Magento 管理部分 我想覆盖核心 Mage 的 Sales Order ShipmentController php 控制器文件 我尝试使用 from 和 to 标签重写URL 但没有成功 我不知道这样做的实际和正确方法是什么 因
  • 有没有办法将 Google Analytics(分析)资产转移到新帐户?

    当我最初创建 Google 分析帐户时 我将所有网站 属性 添加到一个帐户中 现在我想将它们转移到他们自己的个人帐户 但我似乎找不到任何可用此选项的地方 我可以轻松创建一个新帐户 但这似乎需要创建一个新的属性和视图 如果可能的话 我想保留
  • Joomla 2.5创建组件并保存数据

    我一直在使用这个文档 我在网上可以找到的唯一文档 来构建一个组件 http docs joomla org Developing a Model View Controller Component 2 5 Introduction http
  • 如何在 templatete js 之后包含组件 js

    我在 templatete index php 上添加了 javascript doc JFactory getDocument doc gt addScript this gt baseurl templates this gt temp
  • CMS 软件中的空白 index.html 而不是 .htaccess

    我注意到 Joomla Wordpress 和其他 CMS 在其所有子文件夹中都有空白的 index html 文件 以防止人们窥视文件夹结构 我的问题是为什么他们不能禁止使用 htaccess 文件查看文件夹 而不是将空白的 index
  • 如何通过 PHP 更改 Joomla 管理员 URL - 无插件

    由于我是 Joomla 的新手 我想知道是否有办法通过以下方式更改管理员 URL使用PHP而不是使用插件或扩展 据我所知 使用第三方组件是有风险的 我真的不想在我的网站中使用第三方扩展 我怎样才能完成它 默认情况下 Joomla 管理员 U
  • 共享主机上的 403 禁止 Laravel

    我有一个共享主机 我正在尝试让我的 laravel 项目在其上运行 我正在使用 voyager 进行管理面板 我将我的应用程序公共文件夹放在 public html 中 并将项目的其余部分放在 public html 的同一级别上 所以它看
  • 没有人拥有者(99 99)在FTP中由php功能引起?

    我有一个脚本 Joomla 可以在服务器上创建文件和目录 问题是它在所有者 99 99 无人 下创建它们 并且在没有服务器管理员帮助的情况下我无法通过 FTP 删除或修改它们 我认为那是move uploaded filephp 的函数 W
  • Joomla 2.5 中基于类别的文章的替代布局

    目前 我的 Joomla 2 5 安装中的文章有 2 个 布局 default php default links php feature link php feature link php 当在 文章管理器 的 替代布局 下的 编辑文章
  • joomla 中的文章存储在哪里?

    抱歉 这可能是一个新手问题 我要进入管理的文章管理器部分 我确实看到了一些文章 但我想知道这是存储这些文章的表 我只是在数据库中看到很多表 但我无法猜测哪些表存储了文章管理器的内容 Thanks jos content是保存文章的表 jos
  • 如何删除垂直滚动条 SyntaxHighlighter 块?

    我是网络开发的新手 可能有一个主要问题 我已经在我的网站上安装了 Joomla 2 5 CMS 下载 安装并打开语法荧光笔 http alexgorbatchev com SyntaxHighlighter 插入 然后启用bash语法并在我

随机推荐

  • Android 媒体播放器在 ICS 上永远循环

    我想播放通知声音 但我的问题是声音永远循环 而它应该只响一次 我尝试过两种方法 notification sound Uri parse content media internal audio media 38 and mMediaPla
  • 如何使用 Jersey Rest Webservices 和 Java 解析 JSON 数组

    我从 iOS 客户端获取 Json 数组 并希望使用 Java jersey 和 Gson 在服务器端解析 Json 我正在从 iOS 发送 POST 方法中的 JSON 数组 我想使用 json 但坚持如何在 Java 类中保存 json
  • C++ 的链接迭代器

    Python 的 itertools 实现了chain http docs python org library itertools html itertools chain迭代器本质上连接了许多不同的迭代器以提供单个迭代器的所有内容 C
  • jQuery 等效选择器

    以下内容完全等价吗 你使用哪种习语 为什么 form1 edit field input form1 edit field find input edit field input form1 input form1 edit field 我
  • EF 4.1 Code First:类型中的每个属性名称必须是唯一的查找表关联错误

    这是我第一次尝试创建自己的 EF 模型 我发现自己在尝试使用 Code First 创建查找表关联时陷入困境 以便我可以访问 myProduct Category AltCategoryID 我已经设置了模型和映射 据我所知是正确的 但继续
  • 在R中寻找SIR模型参数的问题

    我正在尝试使用 R 中的 SIR 模型来模拟冠状病毒感染率 但是 如您所见 我的 beta 控制易感者和感染者之间的过渡 和 gamma 控制感染者和康复者之间的过渡 值不正确 beta gamma 1 0000000 0 8407238
  • 如果存在则不能批量工作

    我正在尝试创建一个 bat 文件来创建一个简单的文本文件 我的问题是 Windows XP 主文件夹是C Documents and Settings而 vista 及以上C Users 我正在运行这个 无论我为路径名输入什么 我总是得到i
  • Express 中跨子域的会话

    我正在使用 Express 中的 vhost 功能和 Node 来管理我的应用程序的多个子域 该应用程序使用相同的会话密钥和密钥 并且我相信我已经使用了正确的会话 cookie 设置 cookie path domain example c
  • 如何在 Azure AD B2C 中存储来自 IdentityServer 3 的声明或仅将其包含在 AAD B2C 颁发的令牌中

    我想知道是否可以将 oid 声明或基本上由 Identity Server 3 发出的任何其他声明传播到 AAD B2C 并使其成为 Azure AD B2C 发出的令牌的一部分 我们需要在客户端拥有一个原始 ID 而我们从 sub 和 o
  • 没有框架的javascript ajax请求

    有谁知道如何在不使用 jQuery 等 javascript 框架的情况下制作跨浏览器的 ajax 请求功能 The XMLHttpRequest对象实际上使用起来并不那么复杂 为了广泛兼容 您必须玩一些游戏来创建对象 但之后的简单操作就相
  • 如何在浏览器窗口调整大小时调整CSS中的梯形大小

    当我调整浏览器窗口大小时 我试图调整梯形形状的大小 我试图通过使用来做到这一点box resize但还是没用 是否可以通过使用定义 创建的梯形来做到这一点border黑客 还有什么其他方法可以使梯形能够在调整浏览器窗口大小时调整大小 div
  • Codeigniter - 提交后验证失败时重新填充表单

    我有一个表单 要求用户输入一些信息 如果他们未能填写必填字段 他们将被重新提交表格 页面顶部通知他们需要哪些字段 并且我启用了粘性表单 set value 这样他们的输入就不会丢失 我使用 flashdata 向用户显示消息 即 如果他们输
  • 从 listWidget 中删除选定的项目

    如何从列表中删除选定的项目QListWidget 我尝试编写以下代码 但它不起作用 QList
  • 使用 Moya 获取响应标头

    我在我的 swift 应用程序中使用 Moya 来处理网络请求 我能够使用 Moya Object Mapper 获取请求并映射结果 我之前使用过 alamofire 熟悉如何发布 获取请求和读取响应头 然而 我似乎不明白如何在 Moya
  • Ag-grid 捆绑包尺寸太大

    我正在使用 Angular 6 开发一个 Web 应用程序 我有一个 Ag grid 企业版 Ag grid 文档说 我们必须导入所有农业网格角 农业网格社区 and 农业电网企业与农网企业合作 编译后 主包总大小超过 1 5 MB 在那里
  • Firebase 函数问题以及 .add() 与 .doc().set() 之间的区别

    几周以来我遇到了以下问题 以前不是问题 1 添加 数据 const saveNewDoc functions https onCall data NewDocWrite context CallableContext gt return a
  • 两个类之间的递归java泛型

    这是一个类似于中提出的问题两个类之间可能递归的 Java 泛型 https stackoverflow com questions 5929689 possibly recursive java generics between two c
  • 从派生类初始化列表调用基类构造函数的顺序

    struct B int b1 b2 B int int struct D B int d1 d2 which is technically better D int i int j int k int l B i j d1 k d2 l
  • AttributeError:“模块”对象没有属性“get_frontal_face_ detector”

    我试图使用 python 的 dlib 库来检测面部标志 我正在使用上面给出的例子人脸检测器 http dlib net face landmark detection py html 我在安装dlib之前已经安装了所有依赖项 首先 我使用
  • Joomla 2.5创建组件并保存数据

    我一直在使用这个文档 我在网上可以找到的唯一文档 来构建一个组件 http docs joomla org Developing a Model View Controller Component 2 5 Introduction http