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
6e8463dd
Commit
6e8463dd
authored
Feb 15, 2022
by
houdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
参赛bug
parent
ce0dfdaa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
pk.js
Public/js/pk.js
+1
-1
GroupModel.class.php
app/Lib/Model/GroupModel.class.php
+9
-6
index.html
app/Tpl/Vip/Index/index.html
+2
-1
No files found.
Public/js/pk.js
View file @
6e8463dd
...
...
@@ -36,7 +36,7 @@ function baoming(userId,wwwUrl){
$
(
".mask"
).
show
();
$
(
"#pop1"
).
show
();
}
else
{
$
.
post
(
"
Vip
/index/join"
,{},
function
(
data
){
$
.
post
(
"/index/join"
,{},
function
(
data
){
if
(
data
.
status
==
1
){
$
(
'#baoming'
).
text
(
'进入交易'
);
$
(
'#pop1'
).
hide
();
...
...
app/Lib/Model/GroupModel.class.php
View file @
6e8463dd
...
...
@@ -280,6 +280,14 @@ class GroupModel extends Model{
if
(
empty
(
$group
)){
return
array
(
'status'
=>
1
,
'error'
=>
'参数错误'
);
}
//参加的未开赛和正在进行中的大赛如果超过10个,禁止加入,
//必须放在清缓存前面判断,否则清除缓存后还生成旧的参加大赛列表的缓存
$myCount
=
$this
->
checkMyGroupCount
(
$user_id
);
if
(
$myCount
[
0
]
+
$myCount
[
1
]
>
10
){
return
[
'status'
=>
1
,
'error'
=>
'你参加的未结束大赛超过10个,不能再报名'
];
}
//清空缓存
$this
->
clearGroupCache
(
$user_id
);
//如果是练习组只能加入一个
...
...
@@ -296,12 +304,7 @@ class GroupModel extends Model{
return
array
(
'status'
=>
1
,
'error'
=>
'您已经加入过该小组'
,
'joinStatus'
=>
1
);
}
//参加的未开赛和正在进行中的大赛如果超过10个,禁止加入
$myCount
=
$this
->
checkMyGroupCount
(
$user_id
);
// var_dump($myCount);exit;
if
(
$myCount
[
0
]
+
$myCount
[
1
]
>
10
){
return
[
'status'
=>
1
,
'error'
=>
'你参加的未结束大赛超过10个,不能再报名'
];
}
$res
=
M
(
'UserGroup'
)
->
add
(
array
(
'user_id'
=>
$user_id
,
...
...
app/Tpl/Vip/Index/index.html
View file @
6e8463dd
...
...
@@ -17,6 +17,7 @@
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/clipboard.min.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/slider/js/jquery.bxslider.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/pk.js{$Think.config.js_version}11"
></script>
<script
src=
"../../../../Public/js/pk.js"
></script>
</head>
<body>
...
...
@@ -349,4 +350,4 @@
</html>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/popad_mini_pk.js{$Think.config.js_version}"
></script>
<!--userId:{$user.userID}-userName:{$user.userName}-popType:{$popType}->
<!--userId:{$user.userID}-userName:{$user.userName}-popType:{$popType}-
-
>
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