| xqd
@@ -126,7 +126,7 @@ class AuthController extends Controller
|
|
|
$status =empty($user) ? 0 : $user->status;
|
|
|
if ($status == 0) return $this->error(ErrorCode::LOCK_USER);
|
|
|
if (Auth::attempt(['phone'=>$phone,'password'=>$password])) {
|
|
|
- $user = Auth::user();
|
|
|
+ $user = Auth::guard('api')->user();
|
|
|
/* if (!empty($wechat)) {
|
|
|
$user->wechat =$wechat;
|
|
|
$user->save();
|
| xqd
@@ -320,7 +320,7 @@ class AuthController extends Controller
|
|
|
|
|
|
public function isLogin()
|
|
|
{
|
|
|
- $user = Auth::user();
|
|
|
+ $user = Auth::guard('api')->user();
|
|
|
$res = true;
|
|
|
if(!$user) $res = false;
|
|
|
return $this->api([
|