|
@@ -3,6 +3,7 @@
|
|
namespace app\api\controller\company;
|
|
namespace app\api\controller\company;
|
|
|
|
|
|
use app\common\controller\Apic;
|
|
use app\common\controller\Apic;
|
|
|
|
+use app\common\model\PcAdminLog;
|
|
use fast\Random;
|
|
use fast\Random;
|
|
use think\Config;
|
|
use think\Config;
|
|
use think\Validate;
|
|
use think\Validate;
|
|
@@ -38,7 +39,7 @@ class Index extends Apic
|
|
$ret = $this->auth->login($username, $password);
|
|
$ret = $this->auth->login($username, $password);
|
|
if ($ret) {
|
|
if ($ret) {
|
|
$data = $this->auth->getUserinfo_simple();
|
|
$data = $this->auth->getUserinfo_simple();
|
|
- $this->success(__('Logged in successful'), $data);
|
|
|
|
|
|
+ $this->success('登录成功', $data);
|
|
} else {
|
|
} else {
|
|
$msg = $this->auth->getError();
|
|
$msg = $this->auth->getError();
|
|
$msg = $msg ? $msg : __('Username or password is incorrect');
|
|
$msg = $msg ? $msg : __('Username or password is incorrect');
|
|
@@ -58,16 +59,14 @@ class Index extends Apic
|
|
$this->error(__('Invalid parameters'));
|
|
$this->error(__('Invalid parameters'));
|
|
}
|
|
}
|
|
$this->auth->logout();
|
|
$this->auth->logout();
|
|
- $this->success(__('Logout successful'));
|
|
|
|
|
|
+ $this->success('退出成功');
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
//用户详细资料
|
|
//用户详细资料
|
|
- public function getUserinfo($type = 1){
|
|
|
|
|
|
+ public function getUserinfo(){
|
|
$info = $this->auth->getUserinfo();
|
|
$info = $this->auth->getUserinfo();
|
|
- if($type == 'return'){
|
|
|
|
- return $info;
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
$this->success(__('success'),$info);
|
|
$this->success(__('success'),$info);
|
|
}
|
|
}
|
|
|
|
|