Commit 3c5f5277 authored by houdong's avatar houdong

更多大赛

parent 43912cc7
......@@ -87,15 +87,16 @@ function submitBaoming(userType,tradeUrl){
if(tradeUrl==''){
window.location.reload();
}else{
//因登录窗重用,不出现下面的弹窗了
layer.alert('登录成功', 1, function(){location.reload();});
return;
var index = $.layer({
type: 1,title: ' ',border : [5, 0.5, '#666'],btns: 2,btn: ['关闭', '去交易'],
area: ['240px', '130px'],
page: {html: '<p style="margin-left: 48px;margin-top: 16px;">您已经加入过该大赛</p>'},
success: function(layero){ },
yes: function(index) {
// layer.close(index);
window.location.reload();
// location.href='/?view='+view;
},
no: function(index) {
//必须回车
......
......@@ -375,7 +375,7 @@ class PkTopAction extends IdentityAction{
//app外打开
if($mobile){
if (!$smsCode) {
$this->ajaxReturn(array('status' => 0, 'info' => '请输入手机验证码!'));
$this->ajaxReturn(['status' => 0, 'info' => '请输入手机验证码!']);
}
// if (S('tel:'. $mobile . ':'.$code_type) != $smsCode) {
// $this->ajaxReturn(array('status' => 0, 'info' => '对不起!手机验证码错误或已过期!'));
......@@ -400,7 +400,7 @@ class PkTopAction extends IdentityAction{
$groupStatus=$this->getGroupStatus($groupInfo);
if ($groupStatus==3) {
$this->ajaxReturn(array('status' => 0, 'info' => '大赛已经结束,不能报名!'));
$this->ajaxReturn(['status' => 0, 'info' => '大赛已经结束,不能报名!']);
}
if($mfrom==1||$mfrom==2){
......@@ -560,9 +560,9 @@ class PkTopAction extends IdentityAction{
}else{
//如果被踢出则恢复
if($row['grade'] == -2){
M('UserGroup')->where(array('user_id'=>$userId,'group_id'=>$groupId))->save(array('grade'=>0,'add_time'=>time()));
M('UserGroup')->where(['user_id'=>$userId,'group_id'=>$groupId])->save(['grade'=>0,'add_time'=>time()]);
}else{
return array('status'=>0,'info'=>'您已经参加过该大赛','debug'=>$userId,'flag'=>1);
return ['status'=>0,'info'=>'您已经参加过该大赛','debug'=>$userId,'flag'=>1];
}
}
......
......@@ -301,7 +301,7 @@ class GroupModel extends Model{
$user = M('UserGroup')->where(array('user_id'=>$user_id,'group_id'=>$group_id))->find();
if(!empty($user)){
return array('status'=>1,'error'=>'您已经加入过该小组','joinStatus'=>1);
return ['status'=>1,'error'=>'您已经加入过该小组','joinStatus'=>1];
}
......
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