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
9eb0b04d
authored
Jul 16, 2019
by
zhangheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
j
parent
85b305af
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
6 deletions
+28
-6
.idea/inspectionProfiles/Project_Default.xml
+0
-0
.idea/workspace.xml
+0
-0
Application/Home/Controller/IndexController.class.php
+16
-2
Application/User/Controller/ReportController.class.php
+5
-4
Public/static/js/index.js
+7
-0
No files found.
.idea/inspectionProfiles/Project_Default.xml
View file @
9eb0b04d
This diff is collapsed.
Click to expand it.
.idea/workspace.xml
View file @
9eb0b04d
This diff is collapsed.
Click to expand it.
Application/Home/Controller/IndexController.class.php
View file @
9eb0b04d
...
@@ -42,6 +42,12 @@ class IndexController extends Controller
...
@@ -42,6 +42,12 @@ class IndexController extends Controller
//}
//}
public
function
index
()
public
function
index
()
{
{
$openSate
=
M
(
'Sate'
)
->
wher
(
array
(
'id'
=>
1
))
->
find
(
'getField'
);
if
(
$openSate
==
0
){
die
();
}
$user
=
$this
->
get_user_info_from_cookie
();
$user
=
$this
->
get_user_info_from_cookie
();
if
(
!
$user
)
{
if
(
!
$user
)
{
$this
->
request_auth
(
$this
->
get_url
());
$this
->
request_auth
(
$this
->
get_url
());
...
@@ -49,7 +55,6 @@ class IndexController extends Controller
...
@@ -49,7 +55,6 @@ class IndexController extends Controller
}
}
$prize_type
=
M
(
'Prize'
)
->
where
(
array
(
'user_id'
=>
$user
[
'id'
]))
->
find
();
$prize_type
=
M
(
'Prize'
)
->
where
(
array
(
'user_id'
=>
$user
[
'id'
]))
->
find
();
if
(
$prize_type
)
{
if
(
$prize_type
)
{
$type
=
1
;
$type
=
1
;
}
else
{
}
else
{
...
@@ -121,6 +126,13 @@ class IndexController extends Controller
...
@@ -121,6 +126,13 @@ class IndexController extends Controller
));
));
return
;
return
;
}
}
if
(
$user
[
'play_num'
]
==
0
){
$this
->
ajaxReturn
(
array
(
'errcode'
=>
2
,
'errmsg'
=>
null
));
return
;
}
$type_list
=
array
(
'6JTjh8cPcQ6Rh4Zs'
,
'wrwSQkP7aBSTSz6Q'
,
'DQxcxExXHmrrJhpW'
,
'Mx7cz5zBhJ4XTWWw'
,
'BnFaQJ23ddQ6CcfG'
,
'4fzkwfPHZZZmnQJx'
,
'NCnWMkSN5jSBErP6'
,
'Ce238NWT3GAkmXNB'
,
'7QnGFjs7JDxWe2xQ'
,
'5Qtk2aKHsG42PbRz'
);
$type_list
=
array
(
'6JTjh8cPcQ6Rh4Zs'
,
'wrwSQkP7aBSTSz6Q'
,
'DQxcxExXHmrrJhpW'
,
'Mx7cz5zBhJ4XTWWw'
,
'BnFaQJ23ddQ6CcfG'
,
'4fzkwfPHZZZmnQJx'
,
'NCnWMkSN5jSBErP6'
,
'Ce238NWT3GAkmXNB'
,
'7QnGFjs7JDxWe2xQ'
,
'5Qtk2aKHsG42PbRz'
);
$channel_urt
=
$_POST
[
'channel'
];
$channel_urt
=
$_POST
[
'channel'
];
$c_z
=
in_array
(
$channel_urt
,
$type_list
);
$c_z
=
in_array
(
$channel_urt
,
$type_list
);
...
@@ -133,8 +145,10 @@ class IndexController extends Controller
...
@@ -133,8 +145,10 @@ class IndexController extends Controller
)
)
));
));
return
;
return
;
}
}
M
(
'User'
)
->
where
(
array
(
'id'
=>
$user
[
'id'
]
))
->
setDec
(
'play_num'
);
$channel
=
M
(
'Prize'
)
->
where
(
array
(
$channel
=
M
(
'Prize'
)
->
where
(
array
(
'channel'
=>
$channel_urt
'channel'
=>
$channel_urt
))
->
find
();
))
->
find
();
...
...
Application/User/Controller/ReportController.class.php
View file @
9eb0b04d
...
@@ -70,7 +70,7 @@ class ReportController extends BaseUserController
...
@@ -70,7 +70,7 @@ class ReportController extends BaseUserController
}
}
public
function
export_photo
()
public
function
export_photo
()
{
{
$sql
=
"select a.id,a.nickname,a.headimgurl,a.region,b.take_time from user a left join prize b on b.user_id = a.id where is_get=1 "
;
$sql
=
"select a.id,a.nickname,a.headimgurl,a.region,b.take_time
,b.channel
from user a left join prize b on b.user_id = a.id where is_get=1 "
;
$list
=
M
()
->
query
(
$sql
);
$list
=
M
()
->
query
(
$sql
);
$default_0
=
function
(
$v
)
{
$default_0
=
function
(
$v
)
{
if
(
isset
(
$v
))
{
if
(
isset
(
$v
))
{
...
@@ -83,9 +83,10 @@ class ReportController extends BaseUserController
...
@@ -83,9 +83,10 @@ class ReportController extends BaseUserController
array
(
'名字'
,
'nickname'
,
$default_0
),
array
(
'名字'
,
'nickname'
,
$default_0
),
array
(
'地区'
,
'region'
,
$default_0
),
array
(
'地区'
,
'region'
,
$default_0
),
array
(
'头像'
,
'headimgurl'
,
$default_0
),
array
(
'头像'
,
'headimgurl'
,
$default_0
),
array
(
'渠道'
,
'channel'
,
$default_0
),
array
(
'时间'
,
'take_time'
,
$default_0
),
array
(
'时间'
,
'take_time'
,
function
(
$v
){
return
date
(
'Y年m月d日-H:i:s'
,
$v
);
}),
);
);
$file_name
=
'prize_'
.
date
(
'Y-m-d_H:i:s'
);
$file_name
=
'prize_'
.
date
(
'Y-m-d_H:i:s'
);
ExcelExporter
::
export
(
$file_name
,
$columns
,
$list
,
'prize'
);
ExcelExporter
::
export
(
$file_name
,
$columns
,
$list
,
'prize'
);
...
...
Public/static/js/index.js
View file @
9eb0b04d
...
@@ -47,9 +47,16 @@ function btnPrize() {
...
@@ -47,9 +47,16 @@ function btnPrize() {
if
(
resp
.
errcode
!=
0
)
{
if
(
resp
.
errcode
!=
0
)
{
my_notify
(
prize_word
[
rank
]);
my_notify
(
prize_word
[
rank
]);
}
else
{
}
else
{
if
(
resp
.
errcode
==
2
){
my_notify
(
"抽奖次数已用完,感谢支持。"
)
return
;
}
else
{
$
(
'.btn-prize'
).
hide
();
$
(
'.btn-prize'
).
hide
();
$
(
'.prize-type'
).
show
();
$
(
'.prize-type'
).
show
();
}
}
}
$
(
'.btn-prize'
).
text
(
prize_word
[
rank
]);
$
(
'.btn-prize'
).
text
(
prize_word
[
rank
]);
},
},
...
...
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