登录bug修改

This commit is contained in:
墨大叔 2024-07-22 10:23:48 +08:00
parent a44c907099
commit a05fe97eb8

View File

@ -31,16 +31,10 @@ public class AppAuthController extends BaseController {
@Autowired @Autowired
private SysLoginService loginService; private SysLoginService loginService;
@Value("${debug}")
private Boolean debug;
@Deprecated @Deprecated
@ApiOperation("前台用户账号密码登录(临时测试接口)") @ApiOperation("前台用户账号密码登录")
@PostMapping("/login") @PostMapping("/login")
public AjaxResult login(@RequestBody LoginBody body) { public AjaxResult login(@RequestBody LoginBody body) {
if (!this.debug) {
return AjaxResult.error("该接口不允许访问");
}
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
// 生成令牌 // 生成令牌
String token = loginService.appLogin(body.getUsername(), body.getPassword()); String token = loginService.appLogin(body.getUsername(), body.getPassword());