我正在使用 setFlash 函数在页面顶部显示一条消息,但我想更改它显示多长时间(目前在 .js 文件中它是 3000,但我希望它显示 20 秒而不是 3 )
有没有办法对特定 setFlash 的页面停留时间进行编码?而不是更改网站范围内的 setFlash 默认值?
这是我在控制器页面中的代码。
$this->Session->setFlash(__l('There is not enough in escrow to close the project ') , 'default', null, 'error');
$this->redirect(array(
'controller' => 'escrow_accounts',
'action' => 'add',
'project' => $escrowAccount['Project']['id']
));