mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
29 lines
618 B
PHP
29 lines
618 B
PHP
<?php
|
|
/**
|
|
*
|
|
* @since 2016-02-18
|
|
* @author zhaoxiang <zhaoxiang051405@outlook.com>
|
|
*/
|
|
|
|
namespace app\admin\controller;
|
|
|
|
|
|
use think\Request;
|
|
|
|
class User extends Base {
|
|
public function login(){
|
|
$request = Request::instance();
|
|
if( $request->isPost() ){
|
|
$username = $request->post('username');
|
|
$password = $request->post('password');
|
|
if( !$username || !$password ){
|
|
$this->error('缺少关键数据!');
|
|
}
|
|
if( $request->post('name') ){
|
|
|
|
}
|
|
}else{
|
|
return $this->fetch();
|
|
}
|
|
}
|
|
} |