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
40c63683
Commit
40c63683
authored
May 17, 2023
by
houdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
抽奖加登录
parent
668aafce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
lottery.js
Public/Home/js/lottery.js
+12
-1
PkTopAction.class.php
app/Lib/Action/Vip/PkTopAction.class.php
+4
-4
No files found.
Public/Home/js/lottery.js
View file @
40c63683
...
...
@@ -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
});
// 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'
);
...
...
app/Lib/Action/Vip/PkTopAction.class.php
View file @
40c63683
...
...
@@ -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
]);
}
//取奖品
...
...
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