登录封禁返回 301

This commit is contained in:
2025-09-23 21:43:11 +08:00
parent 6e67b896af
commit 983a3a2cdc

View File

@@ -107,16 +107,16 @@ class Login extends Model
$block = db::name('block')->where(['type_text' => $user_info['id'],'type' => 1])->find(); $block = db::name('block')->where(['type_text' => $user_info['id'],'type' => 1])->find();
if ($block) { if ($block) {
return ['code' => 0, 'msg' => '用户已被封禁', 'data' => null]; return ['code' => 301, 'msg' => '用户已被封禁', 'data' => null];
} }
$block = db::name('block')->where(['type_text' => $login_device,'type' => 2])->find(); $block = db::name('block')->where(['type_text' => $login_device,'type' => 2])->find();
if ($block) { if ($block) {
return ['code' => 0, 'msg' => '设备已被封禁', 'data' => null]; return ['code' => 301, 'msg' => '设备已被封禁', 'data' => null];
} }
$ip = request()->ip(); $ip = request()->ip();
$block = db::name('block')->where(['type_text' => $ip,'type' => 3])->find(); $block = db::name('block')->where(['type_text' => $ip,'type' => 3])->find();
if ($block) { if ($block) {
return ['code' => 0, 'msg' => 'ip已被封禁', 'data' => null]; return ['code' => 301, 'msg' => 'ip已被封禁', 'data' => null];
} }
$save_data = []; $save_data = [];