Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
php
/
sx-prize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7b6b3dbc
authored
Jul 07, 2019
by
张恒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
j
parent
bc829280
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
3 deletions
+10
-3
.idea/workspace.xml
+0
-0
Application/Home/Controller/IndexController.class.php
+1
-0
Application/Home/View/default/Index_index.tpl
+5
-1
Public/static/js/index.js
+4
-2
No files found.
.idea/workspace.xml
View file @
7b6b3dbc
This diff is collapsed.
Click to expand it.
Application/Home/Controller/IndexController.class.php
View file @
7b6b3dbc
...
...
@@ -82,6 +82,7 @@ class IndexController extends Controller
))
->
count
();
if
(
$type
==
1
)
{
if
(
$c
>=
10
)
{
continue
;
}
...
...
Application/Home/View/default/Index_index.tpl
View file @
7b6b3dbc
...
...
@@ -51,7 +51,11 @@
<body
ontouchmove=
"return false;"
>
<div
id=
"container"
>
<div
class=
"btn-prize"
style=
"display: none"
>
点击抽奖
</div>
<div
class=
"btn-prize"
style=
"display: none"
>
点击抽奖
</div>
<div
class=
"prize-type"
style=
"display: none"
></div>
</div>
<script>
...
...
Public/static/js/index.js
View file @
7b6b3dbc
...
...
@@ -30,7 +30,6 @@ $(document).ready(function () {
}
$
(
'.btn-prize'
).
on
(
'click'
,
function
()
{
if
(
prize_lock
==
2
){
my_notify
(
'点击太快'
);
return
;
}
btnPrize
();
...
...
@@ -38,6 +37,7 @@ $(document).ready(function () {
});
function
btnPrize
()
{
prize_lock
=
2
;
$
(
'.btn-prize'
).
text
(
'抽奖中...'
);
$
.
ajax
({
url
:
'/index/tryPrize'
,
type
:
'post'
,
...
...
@@ -51,9 +51,11 @@ function btnPrize() {
if
(
resp
.
data
.
prize
==
0
)
{
my_notify
(
prize_word
[
rank
])
}
else
{
$
(
'.btn-prize'
).
hide
();
$
(
'.prize-type'
).
text
(
'已中奖,请麻烦找官方登记信息'
).
show
();
}
}
$
(
'.btn-prize'
).
text
(
'点击抽奖'
);
prize_lock
=
1
;
},
error
:
function
()
{
...
...
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