You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
735 B

<?php
namespace app\auth\logic;
use app\BaseLogic;
class Base extends BaseLogic
{
protected $mid;
protected $userAgent;
/**
* 构造函数
* @date 2020-07-27
*/
public function __construct(array $data = [])
{
parent::__construct($data);
if (isset($data['uid'])) {
$mid = $data['uid'];
} else {
if (defined('UID')) {
$mid = UID;
}
}
if (isset($data['user_agent'])) {
$this->userAgent = $data['user_agent'];
} else {
if (defined('USER_AGENT')) {
$this->userAgent = USER_AGENT;
}
}
$this->mid = isset($mid) ? $mid : 2;
}
}