81 lines
2.5 KiB
JavaScript
81 lines
2.5 KiB
JavaScript
|
|
function dh(ty){
|
|||
|
|
if(!ty){
|
|||
|
|
ty = 'mobile';
|
|||
|
|
}
|
|||
|
|
$(".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/index2.php', {
|
|||
|
|
ty : ty,
|
|||
|
|
gameid : gid
|
|||
|
|
}, function(data, status) {
|
|||
|
|
$("#content").html(data);
|
|||
|
|
$(".pf-left").height(left_height);
|
|||
|
|
$(".gdinfo").width(right_width);
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
function test(){
|
|||
|
|
alert(11);
|
|||
|
|
}
|
|||
|
|
function duihuan(sid,yuanbao,dyuanbao,stitle){
|
|||
|
|
if(dyuanbao > yuanbao){
|
|||
|
|
var cyuanbao = dyuanbao-yuanbao;
|
|||
|
|
layer.open({content: '<27><><EFBFBD><EFBFBD>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br><3E><><EFBFBD><EFBFBD>'+cyuanbao+'<27><>Ԫ<EFBFBD><D4AA><br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϷԪ<D7AC><D4AA><EFBFBD>ɣ<EFBFBD>',style: 'width:180px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>'});
|
|||
|
|
}else{
|
|||
|
|
if(sid == 5 || sid == 6){
|
|||
|
|
layer.open({content: '<27>뵽<EFBFBD><EBB5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD>鿴<EFBFBD><E9BFB4>',style: 'width:180px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>'});
|
|||
|
|
return "";
|
|||
|
|
}else if(sid > 6){
|
|||
|
|
var contt = "<22><><EFBFBD><EFBFBD><EFBFBD>۳<EFBFBD>"+dyuanbao+"<22><>Ԫ<EFBFBD><D4AA><br><3E><><EFBFBD><EFBFBD>ϵ<CFB5>ſͷ<C5BF><CDB7><EFBFBD>ȡ<EFBFBD><C8A1>wnmj68";
|
|||
|
|
}else{
|
|||
|
|
var contt = "<22><><EFBFBD><EFBFBD><EFBFBD>۳<EFBFBD>"+dyuanbao+"<22><>Ԫ<EFBFBD><D4AA>";
|
|||
|
|
}
|
|||
|
|
layer.open({content: contt,style: 'width:200px;',btn: ['ȷ<><C8B7><EFBFBD><EFBFBD>ȡ', 'ȡ<><C8A1>'],yes: function(index){
|
|||
|
|
$.get('/dh/jp.php', {
|
|||
|
|
sid : sid,
|
|||
|
|
gameid : gid
|
|||
|
|
}, function(dat, status) {
|
|||
|
|
layer.open({content: dat,style: 'width:180px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>',yes: function(index){
|
|||
|
|
var d = new Date(),str = '';
|
|||
|
|
str = d.getMonth() + 1+'-'+d.getDate()+' '+d.getHours()+':'+d.getMinutes()+':'+d.getSeconds();
|
|||
|
|
$("#shop_log").prepend("<li>"+nickname+"<br><3E>һ<EFBFBD> "+stitle+"<br><font color='red'><3E><><EFBFBD><EFBFBD></font> "+str+"</li>");
|
|||
|
|
var ybs = $("#yuanbao").text();
|
|||
|
|
$("#yuanbao").text(parseInt(ybs)-parseInt(dyuanbao));
|
|||
|
|
//window.location.reload();
|
|||
|
|
layer.closeAll();
|
|||
|
|
}});
|
|||
|
|
});
|
|||
|
|
}});
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
/*
|
|||
|
|
function exchange(eid,grade,dgrade){
|
|||
|
|
if(dgrade > grade){
|
|||
|
|
var cgrade = dgrade-grade;
|
|||
|
|
layer.open({content: '<27><><EFBFBD>ľ<EFBFBD><C4BE><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><br><3E><><EFBFBD><EFBFBD>'+cgrade+'<27><><EFBFBD><EFBFBD><br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<CFB7><D7AC><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD>',style: 'width:180px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>'});
|
|||
|
|
}else{
|
|||
|
|
if(eid > 4){
|
|||
|
|
var contt = "<22><><EFBFBD><EFBFBD><EFBFBD>۳<EFBFBD>"+dgrade+"<22><><EFBFBD><EFBFBD>ֵ<br><3E><><EFBFBD><EFBFBD>ϵ<CFB5>ſͷ<C5BF><CDB7><EFBFBD>ȡ<EFBFBD><C8A1>wnmj68";
|
|||
|
|
}else{
|
|||
|
|
var contt = "<22><><EFBFBD><EFBFBD><EFBFBD>۳<EFBFBD>"+dgrade+"<22><><EFBFBD><EFBFBD>ֵ";
|
|||
|
|
}
|
|||
|
|
layer.open({content: contt,style: 'width:200px;',btn: ['ȷ<><C8B7><EFBFBD><EFBFBD>ȡ', 'ȡ<><C8A1>'],yes: function(index){
|
|||
|
|
$.get('/dh/jp.php', {
|
|||
|
|
eid : eid,
|
|||
|
|
gameid : gid
|
|||
|
|
}, function(dat, status) {
|
|||
|
|
layer.open({content: dat,style: 'width:180px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>',yes: function(index){
|
|||
|
|
window.location.reload();
|
|||
|
|
}});
|
|||
|
|
});
|
|||
|
|
}});
|
|||
|
|
}
|
|||
|
|
}*/
|
|||
|
|
loadnr('ds');
|