保持代码最新版。

This commit is contained in:
2025-08-12 14:18:59 +08:00
parent 406079433c
commit 4a209c6398
10 changed files with 56 additions and 23 deletions

View File

@@ -10,14 +10,14 @@ class UserToken extends Model
public function check_login_token($token)
{
if (empty($token)) {
return ['code' => 301, 'msg' => '登录失效', 'data' =>null];
return ['code' => 301, 'msg' => '登录失效!', 'data' =>null];
}
$user_token = $this->where('token', $token)->find();
if (empty($user_token)) {
return ['code' => 301, 'msg' => '登录失效', 'data' => null];
return ['code' => 301, 'msg' => '登录失效!!', 'data' => null];
}
if ($user_token['expiretime'] < time()) {
return ['code' => 301, 'msg'=> '登录失效', 'data' => null];
return ['code' => 301, 'msg'=> '登录失效!!!', 'data' => null];
}
$block1 = db::name('block')->where(['type' => 1,'type_text' => $user_token['user_id']])->find();