Commit 7a2d006b authored by houdong's avatar houdong

更多大赛页面

parent bef36d01
......@@ -70,7 +70,7 @@
width: 12px;
}
.ds-time-btn .join-btn{
width: 98px;height: 32px;
width: 82px;height: 32px;
background-color: #E1503F;
color: #ffffff;font-size: 14px;
line-height: 28px;
......@@ -80,7 +80,7 @@
.ds-time-btn .join-btn img{
height: 100%;width: 16px;
position: relative;
left: -16px;
left: 0px;
}
.ds-time-btn .join-btn span{
position: relative;top: -11px;
......
Public/images/h5/g2020/right_icon3.png

17.1 KB | W: | H:

Public/images/h5/g2020/right_icon3.png

1009 Bytes | W: | H:

Public/images/h5/g2020/right_icon3.png
Public/images/h5/g2020/right_icon3.png
Public/images/h5/g2020/right_icon3.png
Public/images/h5/g2020/right_icon3.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -37,8 +37,6 @@ _popadstr += '<ul class="right-qq1">';
_popadstr += ' <li class="right-li right-one right-entrance1">' +
'<a href="javascript:;" class="li-a">' +
'<img src="/Public/images/h5/g2020/right_icon1.png" alt=""></a><div class="hover-kf"><ul class="kf-box">' +
'</ul><span class="right-box"></span></div></li>';
_popadstr += ' <li class="right-two right-li" onMouseover="QRCodeshowDiv();" onMouseout="QRCodehideDiv();">' +
......@@ -51,6 +49,9 @@ _popadstr += ' </div>';
_popadstr += ' </div>';
_popadstr += ' </li>';
_popadstr += ' <li class="right-three right-li left-card1" >' +
'<a href="/index/moreDs" class="li-a"><img src="/Public/images/2022/right_moreDs.png" alt=""></a>';
_popadstr += ' <li class="right-three right-li left-card1" >' +
'<a href="javascript:;" class="li-a"><img src="/Public/images/h5/g2020/right_icon3.png" alt=""></a>';
......
......@@ -1087,146 +1087,46 @@ class IndexAction extends IdentityAction {
$this->display();
}
public function bmOtherGroup(){
$userId = $this->user['userID'];
$userName = $this->user['userName'];
$mobile = I('mobile', '');
$smsCode = I('smsCode', '');
$gid =I('gid');
if($gid==ZHONGJIN_GROUP){
$this->joinZj();
}
if(in_array($gid,[M2M_GROUP,NIU_BAI_ID,NIU_SAN_ID,NIU_STRONG_ID])){
$res=D('Niu')->joinNiu($mobile,$smsCode,$userId,$userName,$gid);
}
$this->ajaxReturn($res);
}
//加入中金赛
public function joinZj(){
$groupId=ZHONGJIN_GROUP;
$code_type = 38;
//报名大赛
$mobile = I('mobile', '');
$smsCode = I('smsCode', '');
$kaihuSource = I('kaihuSource', '');
$kaihuSource=$kaihuSource?$kaihuSource:cookie('kaihuSource');
//通过输入手机号报名,userId变为空
// $userId=$mobile?0:$this->user['userID'];
$userId=$this->user['userID'];
$res=D('Niu')->joinZjBefore($mobile,$smsCode,$userId);
if ($res['status']==2) {
$this->ajaxReturn(['status' =>2, 'info' =>$res['info']]);
}
//
// $groupInfo=M('Group')->field('startTime,endTime')->where(['group_id'=>$groupId])->find();
//
// //1未开始,2是进行中,3已结束
// $groupStatus=is_end($groupInfo['endTime'])?3:($groupInfo['startTime']>time()?1:2);
//
// if ($groupStatus==3) {
// $this->ajaxReturn(['status' => 0, 'info' => '该大赛已经结束,不能报名!']);
// }
//
// public function bmOtherGroup(){
// $userId = $this->user['userID'];
// $userName = $this->user['userName'];
// $mobile = I('mobile', '');
// $smsCode = I('smsCode', '');
////
// if ($mobile) {
// $map=['mobile'=>$mobile,'code'=>$smsCode,'type'=>$code_type,'add_time'=>['gt',NOW_TIME-1800]];
// $row = M('Sms')->where($map)->find();
// if(empty($row)){
// $this->ajaxReturn(['status'=>0,'info'=>'验证码失效或者错误!']);
// }
// //如果该手机号的申请状态是未审核0和已通过1,应返回提示
// $oldData1=M('Zhongjin')->where(['mobile'=>$mobile,'status'=>0])->count();
// $oldData2=M('Zhongjin')->where(['mobile'=>$mobile,'status'=>1])->count();
// }else{
// //如果该手机号的申请状态是未审核0和已通过1,应返回提示
// $oldData1=M('Zhongjin')->where(['user_id'=>$userId,'status'=>0])->count();
// $oldData2=M('Zhongjin')->where(['user_id'=>$userId,'status'=>1])->count();
// }
// if ($oldData1) {
// $this->ajaxReturn(['status' => 0, 'info' => '您提交的信息正在审核中,请不要重复提交!']);
// $gid =I('gid');
//
// if($gid==ZHONGJIN_GROUP){
// $this->joinZj();
// }
// if ($oldData2) {
// $this->ajaxReturn(['status' => 0, 'info' => '您已经开过户,不能重复报名!']);
// if(in_array($gid,[M2M_GROUP,NIU_BAI_ID,NIU_SAN_ID,NIU_STRONG_ID])){
// $res=D('Niu')->joinNiu($mobile,$smsCode,$userId,$userName,$gid);
// }
// $this->ajaxReturn($res);
// }
cookie('kaihuSource',$kaihuSource);
//已登录
// if($userId){
// $bmData=M('Zhongjin')->where(['user_id'=>$userId,'status'=>['in',[0,1]]])->find();
// if(empty($bmData)){
// $uc = uc_get_user(['userId' => $userId,'type'=>3]);
//// var_dump($uc);exit;
// if($uc['status']==0&&!empty($uc['data'])){
// $ucData = $uc['data'];
// }
//
// M('Zhongjin')->add(['user_id'=>$userId,'user_name'=>$ucData['user_name'],'mobile'=>$mobile,
// 'nick'=>$ucData['nick'],'add_time'=>time(),'source'=>$kaihuSource]);
// $joinStatus=0;
// }else{
// $joinStatus=empty($bmData)?-1:$bmData['status'];
// }
// $debug='已登录用户';
// }else{
//
//// echo 33;exit;
// $uc = uc_get_user(['token' => $mobile]);
// $ucData=$uc['data'];
// //没有该用户,开始注册,status0有该用户,111表示用户不存在
// if($uc['status']==111){
// $userName = randUsername('股神',$mobile);
// $password = substr(md5($userName), 18);
// $uc = uc_user_register(['userName' => $userName, 'password' => $password, 'ip' => get_client_ip(),
// 'mobile' => $mobile,'mobile_status' => 1,'sourse' =>'www']);
//// var_dump($uc);exit;
// //status0是注册成功
// if ($uc['status']) {
// $this->ajaxReturn(['status' => 0, 'info' => '注册失败!']);
// }
// //注册成功
// $ucData = $uc['data'];
// $userId=$ucData['user_id'];
// $info = ['user_id'=>$userId,'user_name'=>$userName,'mobile'=>$mobile,'mobile_status'=>1];
// $res = $this->_addUser($info);
//
// if ($res <= 0) {
// $this->ajaxReturn(['status' => 0, 'info' => '添加用户失败!']);
// }
// $debug='新注册';
// M('Zhongjin')->add(['user_id'=>$userId,'user_name'=>$userName,'nick'=>$userName,'mobile'=>$mobile,
// 'add_time'=>time(),'source'=>$kaihuSource]);
// $joinStatus=0;
// }else{
// $debug='老用户';
//加入中金赛
// public function joinZj(){
// $groupId=ZHONGJIN_GROUP;
// $code_type = 38;
// //报名大赛
// $mobile = I('mobile', '');
// $smsCode = I('smsCode', '');
// $kaihuSource = I('kaihuSource', '');
// $kaihuSource=$kaihuSource?$kaihuSource:cookie('kaihuSource');
//
// $bmData=M('Zhongjin')->where(['mobile'=>$mobile,'status'=>['in',[0,1]]])->find();
// if(empty($bmData)){
// M('Zhongjin')->add(['user_id'=>$ucData['user_id'],'user_name'=>$ucData['user_name'],'mobile'=>$mobile,
// 'nick'=>$ucData['nick'],'add_time'=>time(),'source'=>$kaihuSource]);
// $joinStatus=0;
// }else{
// $joinStatus=empty($bmData)?-1:$bmData['status'];
// }
// }
// //通过输入手机号报名,userId变为空
//// $userId=$mobile?0:$this->user['userID'];
// $userId=$this->user['userID'];
// $res=D('Niu')->joinZjBefore($mobile,$smsCode,$userId);
// if ($res['status']==2) {
// $this->ajaxReturn(['status' =>2, 'info' =>$res['info']]);
// }
// cookie('kaihuSource',$kaihuSource);
//
// //注册后用让其自动登录
// require_once './uc_client_php/client.php';
// $this->setLogin(['userID'=>$ucData['user_id'],'userName'=>$ucData['user_name']]);
// //同步登陆
// uc_user_synlogin(['userId'=>$ucData['user_id'],'userName'=>$ucData['user_name'],'nick'=>$ucData['nick']]);
// $res=D('Niu')->joinZj($mobile,$userId,$kaihuSource);
//
// }
$res=D('Niu')->joinZj($mobile,$userId,$kaihuSource);
$info='您提交的信息正在审核,通过后将以短信方式通知您';
$this->ajaxReturn(['status' => 1, 'joinStatus' =>$res[0],'userId'=>$userId,'debug'=>$res[1],'info'=>$info]);
}
// $info='您提交的信息正在审核,通过后将以短信方式通知您';
// $this->ajaxReturn(['status' => 1, 'joinStatus' =>$res[0],'userId'=>$userId,'debug'=>$res[1],'info'=>$info]);
// }
}
......
......@@ -13,7 +13,20 @@ class NiuModel extends Model{
// $MAP[PRIZE_GROUP_2021]='/';
// $MAP[ZHONGJIN_GROUP]=WWW_URL.'/Zjds';
// }
$MAP=[ZHONGJIN_GROUP=>1,PRIZE_GROUP_2021=>2,M2M_GROUP=>3,NIU_BAI_ID=>4,NIU_SAN_ID=>5,NIU_STRONG_ID=>6];
// $MAP=[ZHONGJIN_GROUP=>1,PRIZE_GROUP_2021=>2,M2M_GROUP=>3,NIU_BAI_ID=>4,NIU_SAN_ID=>5,NIU_STRONG_ID=>6];
$MAP=[ZHONGJIN_GROUP=>[WWW_URL.'/Zjds',1],PRIZE_GROUP_2021=>['/',2],M2M_GROUP=>[M_URL.'/M2m',3],NIU_BAI_ID=>[M_URL.'/Niubai',4],
NIU_SAN_ID=>[M_URL.'/Niusan',5],NIU_STRONG_ID=>[M_URL.'/Strong',6]];
// $MAP=[NIU_BAI_ID=>[M_URL.'/Niubai',''],NIU_SAN_ID=>[M_URL.'/Niusan',''],NIU_STRONG_ID=>[M_URL.'/Strong',''],
// M2M_GROUP=>[M_URL.'/M2m','']];
//// if($source=='m'){
//// $MAP[PRIZE_GROUP_2021]=[VIP_URL.'/PkTop',''];
//// $MAP[ZHONGJIN_GROUP]=[M_URL.'/Zjds',''];
//// }else{
// $MAP[PRIZE_GROUP_2021]=[VIP_URL,''];
// $MAP[ZHONGJIN_GROUP]=['/Zjds',''];
// }
$where=['a.group_id'=>['in',array_keys($MAP)]];
$gList = M('Group a')->join('left join cofool_group_info b on a.group_id=b.group_id')
......@@ -24,8 +37,9 @@ class NiuModel extends Model{
$gid=$g['group_id'];
$g['active']=$gid==PRIZE_GROUP_2021?1:0;
$g['joinStatus']=in_array($gid,$ids)?1:0;
// $g['url']=$MAP[$gid];
$g['order']=$MAP[$gid];
$gUrl=$MAP[$gid];
$g['url']=$gUrl[0];
$g['order']=$gUrl[1];
$len=$source=='m'?40:60;
if(mb_strlen($g['introduction'])>$len){
$g['introduction'] = msubstr($g['introduction'],0,$len,'utf-8').'...';
......
......@@ -3,20 +3,9 @@ footer 开始
============================== -->
<!--客服-->
<style>
.left-contest{
top: 100px;
position: fixed;
left: 13px;width: 227px;
}
.left-contest img{
display: block;
}
.more-btn{
font-size: 12px;
text-align: center;
position: relative;
}
.left-contest{ top: 100px; position: fixed; left: 13px;width: 227px; }
.left-contest img{ display: block; }
.more-btn{ font-size: 12px; text-align: center; position: relative; }
.more-btn a{
display: block;
width: 74%;
......@@ -38,14 +27,14 @@ footer 开始
<a href="/" target="_blank">
<img style="width: 74%" src="__PUBLIC__/images/2022/contest-left2.png" alt=""/>
</a>
<a href="/" target="_blank">
<a href="{:M_URL}/Strong" target="_blank">
<img style="width: 74%" src="__PUBLIC__/images/2022/contest-left3.png" alt=""/>
</a>
<a href="/" target="_blank">
<a href="{:M_URL}/Niusan" target="_blank">
<img style="width: 74%" src="__PUBLIC__/images/2022/contest-left4.png" alt=""/>
</a>
<div class="more-btn">
<a href="javascript:;">更多有奖大赛 <img class="more" src="__PUBLIC__/images/2022/contest-more.png" alt=""></a>
<a href="/index/moreDs">更多有奖大赛 <img class="more" src="__PUBLIC__/images/2022/contest-more.png" alt=""></a>
<img style="width: 74%" src="__PUBLIC__/images/2022/contest-left5.png" alt=""/>
</div>
</div>
......
......@@ -44,16 +44,17 @@
<div class="ds-des">{$vo.introduction}</div>
<div class="ds-time-btn">
<span class="time-span"><img src="__PUBLIC__/images/h5/g2020/time-icon.png" alt="">比赛时间:{$vo.startTime} ~ {$vo.endTime} </span>
<eq name="vo.joinStatus" value="1">
<a href="{$Think.config.WWW_URL}/Trade/Stock/index/gid/{$_GET.gid|default=PRIZE_GROUP_2021}" class="join-btn">进入交易</a>
<else/>
<!--<a href="javascript:;" class="join-btn baoming">报名参赛</a>-->
<if condition="$gid eq $vo['group_id']">
<a href="javascript:;" class="join-btn baoming">报名参赛</a>
<else/>
<a href="javascript:;" class="join-btn bmOtherGroupStep1" gid="{$vo.group_id}">报名参赛</a>
</if>
</eq>
<empty name="user.userID">
<a href="javascript:;" class="join-btn baoming">报名参赛</a>
<else/>
<eq name="vo.joinStatus" value="1">
<a href="{$Think.config.WWW_URL}/Trade/Stock/index/gid/{$_GET.gid|default=PRIZE_GROUP_2021}" class="join-btn">进入交易</a>
<else/>
<a href="{$vo.url}" class="join-btn" target="_blank">报名参赛</a>
</eq>
</empty>
</div>
</div>
......@@ -87,9 +88,17 @@
$(function(){
$(".t-pop-close,.pop-close,.mask").click(function () {
$(".mask").hide();
$(this).parents('.pops').hide();
// $(".mask").hide();
// $(this).parents('.pops').hide();
if($(this).attr('refresh')==1){
location.reload();
}else{
$(".mask").hide();
$(this).parents('.pops').hide();
}
});
$(".mask").click(function () {
$(".mask").hide();
$('.pops').hide();
......
......@@ -37,7 +37,7 @@
<input class="code-input base2" placeholder="请输入短信验证码" maxlength="6">
<span class="part-line">|</span><input type="button" class="code-btn" value="获取验证码">
</div>
<input class="form-info-btn bmOtherGroupStep2" type="button" value="立即报名" gid="0">
<input class="form-info-btn bmOtherGroupStep2__" type="button" value="立即报名" gid="0">
</div>
</div>
......@@ -74,7 +74,7 @@
</p>
</div>
<span class="t-pop-close"><img src="__PUBLIC__/images/h5/g2020/pop-close.png" alt=""></span>
<span class="t-pop-close" refresh="1"><img src="__PUBLIC__/images/h5/g2020/pop-close.png" alt=""></span>
</div>
<!--<div class="pop-out pops" style="display: none" id="pop_pk">-->
......@@ -148,39 +148,39 @@
});
//加入其他的大赛
$(".bmOtherGroupStep1").click(function () {
var gid=$(this).attr("gid");
if('{$user.userID}'==''){
$(".mask").show();
$("#popBase").show();
$(".bmOtherGroupStep2").attr('gid',gid);
}else{
$.post("/Index/bmOtherGroup",{gid:gid},function(data){
if(data.status == 1){
layer.alert(data.info, 1, function(){layer.close(location.reload());});
}else{
layer.alert(data.info, 8);
return false;
}
});
}
});
// $(".bmOtherGroupStep1__").click(function () {
// var gid=$(this).attr("gid");
// if('{$user.userID}'==''){
// $(".mask").show();
// $("#popBase").show();
// $(".bmOtherGroupStep2").attr('gid',gid);
// }else{
// $.post("/Index/bmOtherGroup",{gid:gid},function(data){
// if(data.status == 1){
// layer.alert(data.info, 1, function(){layer.close(location.reload());});
// }else{
// layer.alert(data.info, 8);
// return false;
// }
// });
// }
// });
//输入手机号,验证码后点击报名按钮
$(".bmOtherGroupStep2").click(function () {
var mobile=$(".base1").val();
if(mobile==''){layer.msg('请输入手机号');return;}
var smsCode=$(".base2").val();
if(smsCode==''){layer.msg('请输入验证码');return;}
$.post("/Index/bmOtherGroup",{mobile:mobile,smsCode:smsCode,gid:$(this).attr("gid")},function(data){
if(data.status == 1){
layer.alert(data.info, 1, function(){layer.close(location.reload());});
}else{
layer.alert(data.info, 8);
return false;
}
});
});
// $(".bmOtherGroupStep2").click(function () {
// var mobile=$(".base1").val();
// if(mobile==''){layer.msg('请输入手机号');return;}
// var smsCode=$(".base2").val();
// if(smsCode==''){layer.msg('请输入验证码');return;}
// $.post("/Index/bmOtherGroup",{mobile:mobile,smsCode:smsCode,gid:$(this).attr("gid")},function(data){
// if(data.status == 1){
// layer.alert(data.info, 1, function(){layer.close(location.reload());});
// }else{
// layer.alert(data.info, 8);
// return false;
// }
// });
// });
var clipboard = new Clipboard('.copyBtn');
clipboard.on('success', function(e) {layer.msg('复制链接成功',1,1);});
......
......@@ -18,19 +18,20 @@
</div>
<div class="ds-time-btn">
<span class="time-span"><img src="__PUBLIC__/Home/images/g2020/time-icon.png" alt="">比赛时间:{$vo.startTime} ~ {$vo.endTime} </span>
<eq name="vo.joinStatus" value="1">
<a href="javascript:;" class="join-btn gotoTrade" gotoTrade="{$vo.gotoTrade}">
<img src="__PUBLIC__/Home/images/g2020/cs-left.png" alt=""><span>进入交易</span>
</a>
<empty name="user.userID">
<a href="javascript:;" class="join-btn baoming"><img src="__PUBLIC__/Home/images/g2020/cs-left.png" alt=""><span>报名参赛</span></a>
<else/>
<if condition="$gid__ eq $vo['group_id']">
<a href="javascript:;" class="join-btn baoming"><img src="__PUBLIC__/Home/images/g2020/cs-left.png" alt=""><span>报名参赛</span></a>
<else/>
<a href="{:M_URL}{:U('/Match/detail',['id'=>$vo['group_id']])}" class="join-btn " gid="{$vo.group_id}">
<img src="__PUBLIC__/Home/images/g2020/cs-left.png" alt=""><span>报名参赛</span>
<eq name="vo.joinStatus" value="1">
<a href="javascript:;" class="join-btn gotoTrade" gotoTrade="{$vo.gotoTrade}">
<img src="__PUBLIC__/Home/images/g2020/cs-left.png" alt=""><span>进入交易</span>
</a>
</if>
</eq>
<else/>
<a href="{:M_URL}{:U('/Match/detail',['id'=>$vo['group_id']])}" class="join-btn " gid="{$vo.group_id}">
<img src="__PUBLIC__/Home/images/g2020/cs-left.png" alt=""><span>报名参赛</span>
</a>
</eq>
</empty>
</div>
</div>
</foreach>
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