This commit is contained in:
你的名字
2025-07-14 10:22:40 +08:00
commit 0483b4b364
1388 changed files with 219353 additions and 0 deletions

View File

@ -0,0 +1,65 @@
//active
function menuactice(sub_num,sub_num_son){
if(!sub_num){
var sub_num = 0;
}
if(!sub_num_son){
var sub_num_son = 0;
}
var childrens = $('.sidebar-menu').children();
$(childrens[sub_num]).attr('class','active');
var sub_childrens = $(childrens[sub_num]).children();
var sub_childrens = $(sub_childrens[1]).children();
$(sub_childrens[sub_num_son]).attr('class','active');
}
/**
* WP ajax post
* @author lukui 2017-02-15
* @param {[type]} formurl post url
* @param {[type]} data post data
* @param {[type]} locurl 成功后跳转的url
*/
function WPpost(formurl,data,locurl){
$.post(formurl,data,function(data){
if (data.type == 1) {
layer.msg(data.data, {icon: 1,time: 1000},function(){
if(locurl){
window.location.href=locurl;
}else{
return true;
}
});
}else if(data.type == -1){
layer.msg(data.data, {icon: 2});
}
});
}
/**
* WP ajax get
* @author lukui 2017-02-16
* @param {[type]} geturl [description]
* @param {[type]} locurl [description]
*/
function WPget(geturl,locurl){
$.get(geturl,function(data){
if (data.type == 1) {
layer.msg(data.data, {icon: 1,time: 1000},function(){
if (locurl) {
window.location.href=locurl;
}else{
return data;
}
});
}else if(data.type == -1){
layer.msg(data.data, {icon: 2});
}
});
}