Commit 887da185b06b10998bdc5e7c377d3b0abab56d7c
1 parent
e0aa32f4
添加年会设置接口
Showing
1 changed file
with
23 additions
and
0 deletions
phpapi/apicp.GetSetting.php
0 → 100644
1 | +<?php | |
2 | + header('Access-Control-Allow-Origin:*'); | |
3 | + /** | |
4 | + * 获取用户列表 | |
5 | + * 中奖用户列表会多给中奖类型和中奖时间 | |
6 | + */ | |
7 | + include "Common/JsonResponse.php"; | |
8 | + include "Common/mysqlHelper.php"; | |
9 | + include "Common/Encrypter.php"; | |
10 | + | |
11 | + $mysql = new mysqlHelper(); | |
12 | + $setTing = $mysql->fetchAll("SELECT * FROM setting"); | |
13 | + | |
14 | + $setTing = array_column($setTing,null,'key'); | |
15 | + | |
16 | + $res = [ | |
17 | + 'data' => [ | |
18 | + 'isStopSign' => (int)$setTing['isStopSign']['value'] ?? 0, | |
19 | + 'isStartVote' => (int)$setTing['isStartVote']['value'] ?? 0 | |
20 | + ] | |
21 | + ]; | |
22 | + | |
23 | + JsonResponse::result($res); | |
0 | 24 | \ No newline at end of file | ... | ... |