Files
cms/src/main/resources/static/js/common.js
2018-02-09 15:28:27 +08:00

30 lines
688 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
/!*
* the first time to call
*!/
setTimeout(function () {
Push();
// alert("setTimeout called");
}, 200);
setInterval(function () {
Push();
//alert("setInterval called");
}, 3000);
//con.showMsg('登录成功');
function Push() {
$.ajax({
type: "POST",
url: "../CheckLoginServlet?dt=" + new Date().getTime(),//why getTime and wont use
data: {},
beforeSend: function () {
},
success: function (data) {
var obj = eval("(" + data + ")");//eval使用前要先加括号才能得到完整的json数据
if (obj.msg != 0) {
con.showMsg(obj.msg);
}
}
})
};*/