Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cof_vip
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
houdong
cof_vip
Commits
e3a14ff5
Commit
e3a14ff5
authored
Nov 16, 2022
by
houdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更多大赛
parent
ed8f8fd0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
159 deletions
+16
-159
PkTopAction.class.php
app/Lib/Action/Vip/PkTopAction.class.php
+1
-146
NiuModel.class.php
app/Lib/Model/NiuModel.class.php
+11
-11
index.html
app/Tpl/Vip/PkTop/index.html
+1
-1
pop.html
app/Tpl/Vip/PkTop/pop.html
+3
-1
No files found.
app/Lib/Action/Vip/PkTopAction.class.php
View file @
e3a14ff5
...
@@ -1207,158 +1207,13 @@ class PkTopAction extends IdentityAction{
...
@@ -1207,158 +1207,13 @@ class PkTopAction extends IdentityAction{
if
(
$res
[
'status'
]
==
2
)
{
if
(
$res
[
'status'
]
==
2
)
{
$this
->
ajaxReturn
([
'status'
=>
2
,
'info'
=>
$res
[
'info'
]]);
$this
->
ajaxReturn
([
'status'
=>
2
,
'info'
=>
$res
[
'info'
]]);
}
}
// $groupInfo=M('Group')->field('startTime,endTime')->where(['group_id'=>$gid])->find();
// $groupStatus=$this->getGroupStatus($groupInfo);
// if ($groupStatus==3) {
// $this->ajaxReturn(['status' => 0, 'info' => '大赛已经结束,不能报名!']);
// }
//
// if (!$smsCode) {
// $this->ajaxReturn(['status' => 0, 'info' => '请输入手机验证码!']);
// }
// if (CS('tel:'. $mobile . ':'.$code_type) != $smsCode) {
// $this->ajaxReturn(['status' => 0, 'info' => '对不起!手机验证码错误或已过期!']);
// }
//
// //如果该手机号的申请状态是未审核0和已通过1,应返回提示
// $oldData=M('Zhongjin')->where(['mobile'=>$mobile,'status'=>0])->count();
// if ($oldData) {
// $this->ajaxReturn(['status' => 0, 'info' => '您提交的信息正在审核中,请不要重复提交!']);
// }
// $oldData=M('Zhongjin')->where(['mobile'=>$mobile,'status'=>1])->count();
// if ($oldData) {
// $this->ajaxReturn(['status' => 0, 'info' => '该手机号已经开过户,不能重复报名!']);
// }
//已登录
// if($userId){
// $bmData=M('Zhongjin')->where(['mobile'=>$mobile,'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{
// $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' =>'m']);
//
//
//// 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 = D('Userinfo')->_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='老用户';
//
// $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'];
// }
// }
//
// $this->setUcLogin($userId);
//
// }
$res
=
D
(
'Niu'
)
->
joinZj
(
$mobile
,
$userId
,
$kaihuSource
);
$res
=
D
(
'Niu'
)
->
joinZj
(
$mobile
,
$userId
,
$kaihuSource
);
$info
=
'您提交的信息正在审核,通过后将以短信方式通知您'
;
$info
=
'您提交的信息正在审核,通过后将以短信方式通知您'
;
$this
->
ajaxReturn
([
'status'
=>
1
,
'joinStatus'
=>
$res
[
0
],
'userId'
=>
$userId
,
'debug'
=>
$res
[
0
],
'info'
=>
$info
]);
$this
->
ajaxReturn
([
'status'
=>
1
,
'joinStatus'
=>
$res
[
0
],
'userId'
=>
$userId
,
'debug'
=>
$res
[
0
],
'info'
=>
$info
]);
}
}
//加入大赛
// public function joinM2m(){
// $smsType=$this->smsType;
// $mobile = I('mobile', '');
// $smsCode = I('smsCode', '');
// $referer =I('referer', '');
// require_once './uc_client_php/client.php';
// //app外打开
// if($mobile){
// if (!$smsCode) {
// $this->ajaxReturn(['status' =>2, 'info' => '请输入手机验证码!']);
// }
//
//// if (CS('tel:'. $mobile . ':'.$smsType) != $smsCode) {
//// $this->ajaxReturn(['status' => 2, 'info' => '对不起!手机验证码错误或已过期!']);
//// }
// $param = ['mobile'=>$mobile,'code'=>$smsCode,'type'=>$smsType];
// if(D('Sms')->checkCode($param)){
// }else{
// $this->ajaxReturn(['status' => 2, 'info' => '对不起!手机验证码错误或已过期!']);
// }
// $ucUser = uc_get_user(['token' => $mobile]);
// //没有该用户,开始注册,status0有该用户,111表示用户不存在
// if($ucUser['status']==111){
// $ucData=$this->reg2020($mobile);
// }else{
// $ucData=$ucUser['data'];
// }
// $userId=$ucData['user_id'];
// $userName=$ucData['user_name'];
//
// //自动登录
// $this->setLogin(['userID'=>$userId,'userName'=>$userName]);
// //同步登陆
// uc_user_synlogin(['userId'=>$userId,'userName'=>$userName,'webId'=>$ucData['web_id']]);
//
// }else{
// $userId = $this->user['userID'];
// $userName = $this->user['userName'];
// $user_data = uc_get_user(['userId' => $userId,'type' => 3]);
// $mobile = $user_data['data']['mobile'];
// }
// //后台审核才能加入大赛,申请中0,审核通过1,审核未通过2
// $old=M('M2m')->where(['user_id'=>$userId])->find();
// if(empty($old)){
// M('M2m')->add(['user_id'=>$userId,'user_name'=>$userName,'mobile'=>$mobile,'add_time'=>time(),'status'=>0,'source'=>'m']);
// $this->ajaxReturn(['status' => 1]);
// }else{
// if($old['status']==0){
// $this->ajaxReturn(['status' => 2,'info'=>'报名参赛正在审核中']);
// }
// if($old['status']==1){
// $this->ajaxReturn(['status' => 2,'info'=>'登录成功']);
// }
// if($old['status']==2){
// $this->ajaxReturn(['status' => 2,'info'=>'报名参赛未通过审核']);
// }
// }
// }
}
}
?>
?>
...
...
app/Lib/Model/NiuModel.class.php
View file @
e3a14ff5
...
@@ -186,17 +186,17 @@ class NiuModel extends Model{
...
@@ -186,17 +186,17 @@ class NiuModel extends Model{
//后台审核才能加入大赛,申请中0,审核通过1,审核未通过2
//后台审核才能加入大赛,申请中0,审核通过1,审核未通过2
$STATUS
=
[
'0'
=>
'报名参赛正在审核中'
,
'1'
=>
'登录成功'
,
'2'
=>
'报名参赛未通过审核'
];
$STATUS
=
[
'0'
=>
'报名参赛正在审核中'
,
'1'
=>
'登录成功'
,
'2'
=>
'报名参赛未通过审核'
];
if
(
$gid
==
M2M_GROUP
){
//
if($gid==M2M_GROUP){
$old
=
M
(
'M2m'
)
->
where
([
'user_id'
=>
$userId
])
->
find
();
//
$old=M('M2m')->where(['user_id'=>$userId])->find();
if
(
empty
(
$old
)){
//
if(empty($old)){
M
(
'M2m'
)
->
add
([
'user_id'
=>
$userId
,
'user_name'
=>
$userName
,
'mobile'
=>
$mobile
,
'add_time'
=>
time
(),
'status'
=>
0
,
'source'
=>
'm'
]);
//
M('M2m')->add(['user_id'=>$userId,'user_name'=>$userName,'mobile'=>$mobile,'add_time'=>time(),'status'=>0,'source'=>'m']);
return
([
'status'
=>
1
,
'info'
=>
'报名申请已提交'
]);
//
return(['status' => 1,'info'=>'报名申请已提交']);
}
else
{
//
}else{
return
([
'status'
=>
2
,
'info'
=>
$STATUS
[
$old
[
'status'
]]]);
//
return(['status' => 2,'info'=>$STATUS[$old['status']]]);
}
//
}
}
//
}
if
(
in_array
(
$gid
,[
NIU_BAI_ID
,
NIU_SAN_ID
,
NIU_STRONG_ID
])){
//
if(in_array($gid,[NIU_BAI_ID,NIU_SAN_ID,NIU_STRONG_ID])){
$old
=
M
(
'Baoming'
)
->
where
([
'user_id'
=>
$userId
,
'group_id'
=>
$gid
])
->
find
();
$old
=
M
(
'Baoming'
)
->
where
([
'user_id'
=>
$userId
,
'group_id'
=>
$gid
])
->
find
();
if
(
empty
(
$old
)){
if
(
empty
(
$old
)){
M
(
'Baoming'
)
->
add
([
'user_id'
=>
$userId
,
'user_name'
=>
$userName
,
'mobile'
=>
$mobile
,
'add_time'
=>
time
(),
'status'
=>
0
,
'source'
=>
'm'
,
'group_id'
=>
$gid
]);
M
(
'Baoming'
)
->
add
([
'user_id'
=>
$userId
,
'user_name'
=>
$userName
,
'mobile'
=>
$mobile
,
'add_time'
=>
time
(),
'status'
=>
0
,
'source'
=>
'm'
,
'group_id'
=>
$gid
]);
...
@@ -204,7 +204,7 @@ class NiuModel extends Model{
...
@@ -204,7 +204,7 @@ class NiuModel extends Model{
}
else
{
}
else
{
return
([
'status'
=>
2
,
'info'
=>
$STATUS
[
$old
[
'status'
]]]);
return
([
'status'
=>
2
,
'info'
=>
$STATUS
[
$old
[
'status'
]]]);
}
}
}
//
}
}
}
public
function
setLogin
(
$userInfo
,
$remember
=
0
){
public
function
setLogin
(
$userInfo
,
$remember
=
0
){
cookie
(
'_userID'
,
$userInfo
[
'userID'
]);
cookie
(
'_userID'
,
$userInfo
[
'userID'
]);
...
...
app/Tpl/Vip/PkTop/index.html
View file @
e3a14ff5
...
@@ -365,7 +365,7 @@
...
@@ -365,7 +365,7 @@
}
}
return
false
;
return
false
;
}
else
{
}
else
{
animPop
(
'#baomingPOP'
);
//
animPop('#baomingPOP');
animPop
(
'#popPkTopSucc'
);
animPop
(
'#popPkTopSucc'
);
}
}
});
});
...
...
app/Tpl/Vip/PkTop/pop.html
View file @
e3a14ff5
...
@@ -113,7 +113,8 @@
...
@@ -113,7 +113,8 @@
}
else
{
}
else
{
$
.
post
(
"/PkTop/bmOtherGroup"
,{
gid
:
gid
},
function
(
data
){
$
.
post
(
"/PkTop/bmOtherGroup"
,{
gid
:
gid
},
function
(
data
){
if
(
data
.
status
==
1
){
if
(
data
.
status
==
1
){
layer
.
open
({
content
:
data
.
info
,
skin
:
'msg'
,
time
:
2
,
end
:
function
()
{
location
.
reload
();}});
// layer.open({content: data.info,skin: 'msg',time: 2,end:function () {location.reload();}});
layer
.
open
({
content
:
data
.
info
,
skin
:
'msg'
,
time
:
2
},
8
);
}
else
{
}
else
{
layer
.
open
({
content
:
data
.
info
,
skin
:
'msg'
,
time
:
2
},
8
);
layer
.
open
({
content
:
data
.
info
,
skin
:
'msg'
,
time
:
2
},
8
);
return
false
;
return
false
;
...
@@ -131,6 +132,7 @@
...
@@ -131,6 +132,7 @@
$
.
post
(
"/PkTop/bmOtherGroup"
,{
mobile
:
mobile
,
smsCode
:
smsCode
,
gid
:
$
(
this
).
attr
(
"gid"
)},
function
(
data
){
$
.
post
(
"/PkTop/bmOtherGroup"
,{
mobile
:
mobile
,
smsCode
:
smsCode
,
gid
:
$
(
this
).
attr
(
"gid"
)},
function
(
data
){
if
(
data
.
status
==
1
){
if
(
data
.
status
==
1
){
layer
.
open
({
content
:
data
.
info
,
skin
:
'msg'
,
time
:
2
,
end
:
function
()
{
location
.
reload
();}});
layer
.
open
({
content
:
data
.
info
,
skin
:
'msg'
,
time
:
2
,
end
:
function
()
{
location
.
reload
();}});
}
else
{
}
else
{
layer
.
open
({
content
:
data
.
info
,
skin
:
'msg'
,
time
:
2
},
8
);
layer
.
open
({
content
:
data
.
info
,
skin
:
'msg'
,
time
:
2
},
8
);
return
false
;
return
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment