增加docke部署
This commit is contained in:
55
codes/agent/game-docker/api/source/apis/loginBack.php
Normal file
55
codes/agent/game-docker/api/source/apis/loginBack.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
header("Access-Control-Allow-Origin: *");
|
||||
header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, PATCH, DELETE");
|
||||
header("Access-Control-Allow-Headers: Content-Type, Authorization, Content-Length, X-Requested-With");
|
||||
header("Access-Control-Allow-Credentials: true");
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
/**
|
||||
* 登录相关接口
|
||||
*/
|
||||
use phprs\util\Verify;
|
||||
use phprs\util\exceptions\Forbidden;
|
||||
use phprs\util\Logger;
|
||||
use phprs\util\exceptions\NotFound;
|
||||
use phprs\ezsql\Sql;
|
||||
use phprs\util\exceptions\BadRequest;
|
||||
|
||||
require_once 'apiBase.php';
|
||||
|
||||
/**
|
||||
*
|
||||
* 登录管理
|
||||
* @path("/back_login")
|
||||
*/
|
||||
class LoginBack extends apiBase
|
||||
{
|
||||
/**
|
||||
* 获得登录方式
|
||||
* @route({"GET","/"})
|
||||
* @throws({"phprs\util\exceptions\Forbidden","res", "403 Forbidden",{"error":"Forbidden"}}) cookie不可用
|
||||
* @return("body")
|
||||
*/
|
||||
public function getLoginType()
|
||||
{
|
||||
$result = array();
|
||||
$result[0]["name"] = "微信登录";
|
||||
$result[0]["url"] = $this->getFullUrl('/api/login/weixin');
|
||||
$result[0]["third"] = "weixin";
|
||||
//$result[1]["name"] = "QQ登录";
|
||||
//$result[1]["url"] = $this->getFullUrl('/api/login/qq');
|
||||
//$result[1]["third"] = "qq";
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/** @inject("ioc_factory") */
|
||||
private $factory;
|
||||
/**
|
||||
* @property({"default":"@db"})
|
||||
* @var PDO
|
||||
*/
|
||||
public $db;
|
||||
// 此处删除了代码
|
||||
}
|
||||
Reference in New Issue
Block a user