作者 邓超

1

... ... @@ -41,7 +41,7 @@ class Home {
}
// 进行远程登录,验证
// Mail::login($formData['email'],$formData['password'],$formData['imap']);
Mail::login($formData['email'],$formData['password'],$formData['imap']);
// 是否存在
$id = db()->value(email::hasEmail($formData['email']));
... ... @@ -66,12 +66,9 @@ class Home {
if($ret){
app()->_json(
[
'token' => $data['token']
],
'login_success'
);
app()->_json([
'token' => $data['token']
]);
}
app()->e('login_error');
... ...
... ... @@ -15,6 +15,5 @@ return [
'server_error' => '服务器异常',
'login_success' => '登录成功',
'login_error' => '登录失败',
];
\ No newline at end of file
... ...
... ... @@ -201,9 +201,9 @@ class App {
* @author:dc
* @time 2023/2/13 11:03
*/
public function _json($data,$message=''){
public function _json($data){
$this->data['data'] = $data;
$this->data['message'] = __($message);
// $this->data['message'] = __($message);
throw new Err($message,200);
}
... ...