3 Star 20 Fork 1

Ocink / XPlayerConsole

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Clone or download
Common.php 1.05 KB
Copy Edit Web IDE Raw Blame History
Ocink authored 2020-10-24 15:32 . 仅供学习使用
<?php
namespace app\controller;
use app\BaseController;
use think\facade\Db;
use think\facade\Config;
use think\facade\View;
use app\util\geetest\GeetestLib;
use app\model\Users;
use app\model\Player;
use app\model\SongSheet;
use app\model\Plays;
use app\model\PlayerAuth;
class Common extends BaseController
{
function __construct()
{
$config = Db::name('configs')->column('v', 'k');
$config['version']='3002beat';
Config::set($config, 'web');
$data=[
'music' => 'http://music.emapi.cn/music.php',
'getksc' => 'http://music.emapi.cn/getksc.php'
];
Config::set($data, 'api');
}
protected function getSide(){
$userInfo = Users::getLoginUser();
// 获取用户拥有的播放器
$userPlayers = Player::where('user_id',$userInfo['uid'])->select();
// 获取用户所拥有的歌单
$userSongSheets = SongSheet::where('user_id',$userInfo['uid'])->select();
// 设置到session域中
View::assign('userPlayers',$userPlayers);
View::assign('userSongSheets',$userSongSheets);
}
}

Comment ( 0 )

Sign in for post a comment

PHP
1
https://git.oschina.net/ocink/xplayer-console.git
git@git.oschina.net:ocink/xplayer-console.git
ocink
xplayer-console
XPlayerConsole
master

Search