作者 燕梦迪

设置redis

... ... @@ -8,9 +8,9 @@
// +----------------------------------------------------------------------
namespace app\base\controller\admin\system;
use app\base\model\admin\system\BasicModel;
use think\facade\Db;
use app\base\controller\BaseAdmin;
use app\base\model\admin\system\BasicModel;
use Ramsey\Uuid\Uuid;
use think\facade\Session;
... ...
... ... @@ -22,7 +22,7 @@ class BasicModel extends BaseModel
* 获取基本配置信息
* uid 登录时存储的uid 唯一
*/
static public function getSite(){
public static function getSite(){
$uid = Session::get("uid");
$res = Db::table("kt_base_agent")->where(["id"=>$uid])->find();
$res['isadmin'] = self::isAdmin($uid) ? true : false;
... ...