您现在的位置是:首页 > Javascript
当前栏目
js循环调用接口
2023-04-18 14:53:02 时间
longPolling: function()
{
var _this = this;
var obj = {
passport: _this.params.passport,
};
if(!_this.params.messagelock){
Pub.post('/admin/vip.new.message', Pub.postParams(obj), function(response){
if(response.code === 0){
/* $('#alertContent').html('有新的消息');
$('#winpop').modal('show');*/
_this.params.messagelock =false;
if(response.data.recharge_record != 0 || response.data.transfer_record != 0 || response.data.withdrawal_record != 0){
_this.params.message = response.data;
_this.playsound();
_this.titleBlink();
setTimeout(function(){
_this.longPolling();
},60*1000);
}else {
document.title=_this.params.myTitle;
setTimeout(function(){
_this.longPolling();
},20000);
}
}else{
setTimeout(function(){
_this.longPolling();
_this.params.messagelock =true;
},20000);
}
});
}else {
setTimeout(function(){
_this.params.messagelock =true;
_this.longPolling();
},60*1000);
}
},
复制代码
相关文章
- SSR 服务端渲染
- Vue 核心之数据劫持
- #Vue 简单的 store 模式
- Spring boot整合JWT
- SpringBoot 自动配置
- SpringBoot 统一响应体
- Flutter 中 TextField 组件必然会遇到的问题
- 推荐阅读 | 如何部署 LAMP & LNMP网站架构实践?
- 如何使用xdebug更好的调试代码
- FuzzScanner:一个批量快速的信息搜集工具
- Vuex 入门及详解
- 你会写Web简单的脚本么?
- 配置通过Web网管登录交换机/路由器
- anaconda创建环境失败出现http问题
- SpringBoot面试题
- 解决SpringMVC项目Jquery引入不生效问题
- DjangoForm组件
- 前端之清除浮动的方式
- CSS
- jQuery中$.each()常见使用方法有哪些