瀏覽代碼

测试登录

彭俊 6 年之前
父節點
當前提交
ae930f5f8e
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 1 4
      Biz/Account/AccountManager.php
  2. 3 0
      Biz/Account/Repository/AccountRepository.php

+ 1 - 4
Biz/Account/AccountManager.php

@@ -19,9 +19,7 @@ class AccountManager {
 
     public function __construct() {
         $this->model = lm('account', 'Commons');
-        echo 1;
-//        $this->repository = new AccountRepository();
-        echo 2;
+        $this->repository = new AccountRepository();
     }
 
     /**
@@ -33,7 +31,6 @@ class AccountManager {
      */
     public function login($account, $password) {
 
-        echo 3;
         $password = trim($password);
         $account = strtolower(trim($account));
         define("OVERTIME", 1800);

+ 3 - 0
Biz/Account/Repository/AccountRepository.php

@@ -216,9 +216,12 @@ class AccountRepository {
      * @throws \Exception
      */
     public function updateEffectiveTime($accountIdentity, $token) {
+        echo 1;
         lm('account_token', 'Commons')->where('account_identity', $accountIdentity)->update(['effective_time' => strtotime('now'), 'last_time' => date('Y-m-d H:i:s')]);
         lm('account_detailed', 'Commons')->where('account_identity', $accountIdentity)->update(['last_time' => date('Y-m-d H:i:s')]);
+        echo 3;
         $userInfo = $this->tokenManager->getAccountInfo($token);
+        echo 2;
         if (!$userInfo)
             return ['data' => '', 'status' => '-4001', 'msg' => lang()->get('-4001')];
         $data = $_SESSION['uinfo'] = $userInfo->toArray();