You've already forked qlg.tsgz.moe
更新资源
This commit is contained in:
25
static/app2/js/index.js
Executable file → Normal file
25
static/app2/js/index.js
Executable file → Normal file
@ -33,12 +33,12 @@ mui.back = function() {
|
||||
}, 2000);
|
||||
return false;
|
||||
} else {
|
||||
if (new Date().getTime() - firstBackbutton < 2000) {
|
||||
if (mui.os.ios) {
|
||||
if (new Date().getTime() - firstBackbutton < 2000){
|
||||
if (mui.os.ios){
|
||||
const threadClass = plus.ios.importClass("NSThread");
|
||||
const mainThread = plus.ios.invoke(threadClass, "mainThread");
|
||||
plus.ios.invoke(mainThread, "exit");
|
||||
} else {
|
||||
} else{
|
||||
plus.runtime.quit();
|
||||
}
|
||||
}
|
||||
@ -46,25 +46,26 @@ mui.back = function() {
|
||||
};
|
||||
//获取cid用于推送
|
||||
mui.plusReady(function() {
|
||||
// var cid = plus.push.getClientInfo().clientid;
|
||||
var timer = 0;
|
||||
timer = setInterval(function() {
|
||||
getData();
|
||||
}, 3000)
|
||||
// var cid = plus.push.getClientInfo().clientid;
|
||||
// var timer = 0;
|
||||
// timer = setInterval(function() {
|
||||
// getData();
|
||||
// }, 3000)
|
||||
getData();
|
||||
|
||||
function getData() {
|
||||
|
||||
if (!localStorage.getItem('isFirstDownlodad')) {
|
||||
localStorage.setItem('isFirstDownlodad', true);
|
||||
|
||||
}
|
||||
mui.ajax('http://www.juzi199.com/get_version_new.php?' + Math.random(), {
|
||||
mui.ajax('http://qlg.tsgz.moe:233/get_version_new.php?' + Math.random(), {
|
||||
data: {},
|
||||
dataType: 'json', //服务器返回json格式数据
|
||||
type: 'post', //HTTP请求类型
|
||||
timeout: 10000, //超时时间设置为10秒;
|
||||
success: function(data) { //服务器返回响应,根据响应结果,分析是否登录成功;clearInterval(timer)
|
||||
clearInterval(timer);
|
||||
// clearInterval(timer);
|
||||
localStorage.setItem('version', data.version);
|
||||
if (0 == is_juzi_online) {
|
||||
localStorage.setItem('cssUrl', "../css/");
|
||||
@ -79,7 +80,7 @@ mui.plusReady(function() {
|
||||
var ipxSizeBottom = 0;
|
||||
if (/iphone/gi.test(navigator.userAgent) && ((screen.height == 812 && screen.width == 375) || (screen.height ==
|
||||
896 && screen.width == 414) || (screen.height == 1792 / 3 && screen.width == 828 / 3))) {
|
||||
|
||||
|
||||
ipxSizeTop = 24;
|
||||
ipxSizeBottom = 34;
|
||||
//$('.mui-bar').attr('style', "bottom: 34px;")
|
||||
@ -98,4 +99,4 @@ mui.plusReady(function() {
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user