apicp.GetSetting.php 643 Bytes
<?php
    header('Access-Control-Allow-Origin:*');
    /**
     *  获取用户列表
     *  中奖用户列表会多给中奖类型和中奖时间
     */
    include "Common/JsonResponse.php";
    include "Common/mysqlHelper.php";
    include "Common/Encrypter.php";

    $mysql = new mysqlHelper();
    $setTing  = $mysql->fetchAll("SELECT * FROM setting");

    $setTing = array_column($setTing,null,'key');
    
    $res = [
        'data' => [
            'isStopSign' => (int)$setTing['isStopSign']['value'] ?? 0,
            'isStartVote' => (int)$setTing['isStartVote']['value'] ?? 0
        ]
    ];

    JsonResponse::result($res);