var buybtn = $('.ytuser-buy-box input');
if (buybtn.val()){
var butbtnval = buybtn.val(buybtn.val().replace('积分','积分'));
}
function YtSbuy(){
$.post(bloghost+'zb_users/plugin/YtUserVest/cmd.php?act=buybtn',
{
"LogID":$("input[name='LogID']").val()
},
function(data){
var s =data;
if(s == ''){
layer.confirm('您还未登录账户!', {
btn: ['登录','取消']
}, function(){
window.location=bloghost+'?Login';
});
}else if (s.search("notenough")>0){
layer.confirm(s, {
btn: ['立即充值','取消']
}, function(){
window.open('http://changshayidon.com/?User&termini=Integral');
});
}else{
layer.confirm(s, {
btn: ['确认购买','取消']
}, function(){
$.post(bloghost+'zb_users/plugin/YtUser/YtSbuy.php',
{
"LogID":$("input[name='LogID']").val(),
"verifycode":$("input[name='verifycode']").val(),
},
function(data){
var s =data;
if((s.search("faultCode")>0)&&(s.search("faultString")>0))
{
layer.msg(s.match(".+?")[0].replace("","").replace("","").replace("积分","积分"), {icon: 0})
}else{
var s =data;
layer.msg(s, {icon: 1});
setTimeout('window.location.reload()',1000);
}
}
);
});
}
}
);
}
$(".signbtn").on("click",function(){
$.post(bloghost+'zb_users/plugin/YtUserVest/cmd.php?act=sign',{},
function(data){
var s =data;
if(s=='') {
layer.alert('您还未登录账户!', {icon: 0});
}else{
layer.alert(s);
$('.layui-badge-dot').removeClass('layui-badge-dot');
}
}
);
})