You've already forked qlg.tsgz.moe
71 lines
2.0 KiB
JavaScript
Executable File
71 lines
2.0 KiB
JavaScript
Executable File
function hyhUrl(url) {
|
|
return 'http://www.juzi199.com/' + url;
|
|
}
|
|
function hyhImgUrl(url) {
|
|
return 'http://img.juzi199.com/' + url;
|
|
}
|
|
function chengUrl(url) {
|
|
return 'http://www.juzi199.com/' + url;
|
|
}
|
|
|
|
function toJson(str, notLimit) {
|
|
var json = {};
|
|
if(str) {
|
|
try {
|
|
if(typeof(str) == "object") {
|
|
json = str;
|
|
} else {
|
|
json = eval("(" + str + ")");
|
|
}
|
|
if(!notLimit) {
|
|
if(json.status && json.status == '-999') {
|
|
// console.log(str.msg)
|
|
inLogin();
|
|
|
|
}
|
|
}
|
|
} catch(e) {
|
|
alert("系统发生错误:" + e.getMessage);
|
|
json = {};
|
|
}
|
|
return json;
|
|
} else {
|
|
return;
|
|
}
|
|
}
|
|
|
|
function inLogin() {
|
|
mui.openWindow({
|
|
url: 'login.html',
|
|
id: 'login.html',
|
|
styles: {
|
|
top: '0px', //新页面顶部位置
|
|
bottom: '0px', //新页面底部位置
|
|
width: '100%', //新页面宽度,默认为100%
|
|
height: '100%' //新页面高度,默认为100%
|
|
},
|
|
extras: {
|
|
// data_href: data_href
|
|
// ..... //自定义扩展参数,可以用来处理页面间传值
|
|
},
|
|
createNew: false, //是否重复创建同样id的webview,默认为false:不重复创建,直接显示
|
|
show: {
|
|
// autoShow: true, //页面loaded事件发生后自动显示,默认为true
|
|
// aniShow: animationType, //页面显示动画,默认为”slide-in-right“;
|
|
// duration: animationTime, //页面动画持续时间,Android平台默认100毫秒,iOS平台默认200毫秒;
|
|
// event: 'titleUpdate', //页面显示时机,默认为titleUpdate事件时显示
|
|
// extras: {} //窗口动画是否使用图片加速
|
|
},
|
|
waiting: {
|
|
autoShow: true, //自动显示等待框,默认为true
|
|
title: '正在加载...', //等待对话框上显示的提示内容
|
|
options: {
|
|
// width: waiting - dialog - widht, //等待框背景区域宽度,默认根据内容自动计算合适宽度
|
|
// height: waiting - dialog - height, //等待框背景区域高度,默认根据内容自动计算合适高度
|
|
// ......
|
|
}
|
|
}
|
|
})
|
|
}
|
|
|