Files
2026-03-03 13:56:44 +08:00

49 lines
1.2 KiB
JavaScript
Raw Permalink 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.
function dh(ty){
if(!ty){
ty = 'main';
}
$(".tab .xfl").removeClass('tab_dhs');
$("#tab_"+ty).addClass('tab_dhs');
loadnr(ty);
}
function loadnr(ty){
var w_width =$(window).width();
var w_height =$(window).height();
var left_height = w_height-25;
var right_width = w_width-120;
layer.open({type:2,shade:false});
$.get('/dh/', {
ty : ty,
gameid : gid
}, function(data, status) {
$("#content").html(data);
$(".pf-left").height(left_height);
$(".gdinfo").width(right_width);
});
}
function test(){
alert(11);
}
function exchange(eid,grade,dgrade){
if(dgrade > grade){
var cgrade = dgrade-grade;
layer.open({content: '您的经验值不够<br>还差'+cgrade+'经验<br>来继续游戏赚经验吧!',style: 'width:180px;',btn: '我知道了'});
}else{
if(eid > 4){
var contt = "您将扣除"+dgrade+"经验值<br>请联系微信客服领取wnmj68";
}else{
var contt = "您将扣除"+dgrade+"经验值";
}
layer.open({content: contt,style: 'width:200px;',btn: ['确定领取', '取消'],yes: function(index){
$.get('/dh/jp.php', {
eid : eid,
gameid : gid
}, function(dat, status) {
layer.open({content: dat,style: 'width:180px;',btn: '我知道了',yes: function(index){
window.location.reload();
}});
});
}});
}
}
loadnr('main');