Commit 40c63683 authored by houdong's avatar houdong

抽奖加登录

parent 668aafce
......@@ -94,7 +94,18 @@ $(function() {
$("#lottery .btn").on('click', function(event) {
$.get("/PkTop/checkLucky", {}, function (data) {
if (data.status == 0) {
// layer.open({content: data.info,skin: 'msg',time: 2});
if(data.uid==''){
if(mfrom[1]>0){
AppBridge.goLogin();
}else{
animPop('#baomingPOP');
}
}else{
layer.open({content: data.info,skin: 'msg',time: 2});
}
}else{
event.preventDefault();
lottery.init('lottery');
......
......@@ -1151,7 +1151,7 @@ class PkTopAction extends IdentityAction{
public function checkLucky() {
$userId = $this->user['userID'];
if($userId==0){
$this->ajaxReturn(['status' =>0,'info'=>'请登录后再操作']);
$this->ajaxReturn(['status' =>0,'info'=>'请登录后再操作','uid'=>'']);
}
//每个月1--7号可以抽奖
if(date('d')>7){
......@@ -1163,14 +1163,14 @@ class PkTopAction extends IdentityAction{
// $this->ajaxReturn(['status' =>0,'info'=>'您当月已经抽奖']);
// }
if(!empty($oldDog)){
$this->ajaxReturn(['status' =>0,'info'=>'您已经抽过奖了']);
$this->ajaxReturn(['status' =>0,'info'=>'您已经抽过奖了','uid'=>$userId]);
}
//检查是否开户
$kaihuStatus=M('PktopKaihu')->where(['user_id'=>$userId])->find();
if(empty($kaihuStatus)){
// $this->ajaxReturn(['status' =>0,'info'=>'您还未开户,不能抽奖,请点击链接开户']);
$this->ajaxReturn(['status' =>0,'info'=>'请联系管理员获取抽奖次数']);
$this->ajaxReturn(['status' =>0,'info'=>'请联系管理员获取抽奖次数','uid'=>$userId]);
}
$suffix = D('Userinfo')->getTable($this->GID);
......@@ -1179,7 +1179,7 @@ class PkTopAction extends IdentityAction{
if($lastmonthup<=0){
// $this->ajaxReturn(['status' =>0,'info'=>'上月收益必须大于0才能抽奖']);
}
$this->ajaxReturn(['status' =>1,'info'=>'']);
$this->ajaxReturn(['status' =>1,'info'=>'','uid'=>$userId]);
}
//取奖品
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment