<?php
namespace app\admin\controller\rose;

use app\admin\controller\AuthController;
use app\models\user\UserCode;
use app\models\user\UserCodeInfo;
use app\admin\model\user\{User as UserModel};
use crmeb\services\{
    UtilService as Util,
    JsonService as Json
};
class User extends AuthController
{
    public function index()
    {
        return $this->fetch();
    }
    /**
     * 获取user表
     *
     * @return json
     */
    public function get_user_list()
    {
        $where = Util::getMore([
            ['page', 1],
            ['limit', 20],
            ['nickname', ''],
            ['status', ''],
            ['data', ''],
            ['user_time_type', ''],
            ['user_time', ''],
            ['level',6]
        ]);
        UserCode::lst($where);
        return Json::successlayui(UserModel::getUserList($where));
    }
    public function see()
    {
        $uid = input('uid',0);
        $list = UserCodeInfo::where('uid',$uid)->select()->toArray();
        $this->assign('list',$list);
        return $this->fetch();
    }

}
