如何使登录ajax请求后不重定向cakephp 3
我使用better noti在不刷新页面的情况下获取新通知。但当我登录到系统时,重定向到noticount函数如何使登录ajax请求后不重定向cakephp 3,php,ajax,redirect,cakephp-3.0,Php,Ajax,Redirect,Cakephp 3.0,我使用better noti在不刷新页面的情况下获取新通知。但当我登录到系统时,重定向到noticount函数 <script> $(document).ready(function(){ $("#notification").notify_better({ interval: 8000, url: "<?=$this->url->build('/bookings/noticount
<script>
$(document).ready(function(){
$("#notification").notify_better({
interval: 8000,
url: "<?=$this->url->build('/bookings/noticount')?>",
type:'GET',
updateFavicon: {
id: "favicon",
location: "full",
shape: "circle"
},
done: function() {
$(".main > p").html("Notification retrieved. Check out the <strong>favicon</strong> above!<br><small>You can clear all these by clicking the clear button.</small>")
}
});
</script>
$(文档).ready(函数(){
$(“#通知”)。更好地通知({
间隔时间:8000,
url:“”,
类型:'GET',
更新版本:{
id:“法维康”,
位置:“完整”,
形状:“圆”
},
完成:函数(){
$(“.main>p”).html(“已检索通知。请查看上面的favicon!
您可以通过单击“清除”按钮清除所有这些通知。”)
}
});
据我所知,您可能想使用。请正确解释。您重定向时我不明白。@Tonystark当我登录时,登录被重定向到/bookings/noticeount ajax rquest。