|
@@ -8,6 +8,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+
|
|
|
/**
|
|
|
* @Description
|
|
|
* @Author bqyang
|
|
@@ -24,7 +26,9 @@ public class LoginController {
|
|
|
@PostMapping("/doLogin")
|
|
|
public AjaxResult login(@Validated @RequestBody LoginBody loginBody) {
|
|
|
String token = sysUserService.login(loginBody.getUsername(), loginBody.getPassword());
|
|
|
- return AjaxResult.success("操作成功",token);
|
|
|
+ AjaxResult ajax = AjaxResult.success();
|
|
|
+ ajax.put("token", token);
|
|
|
+ return ajax;
|
|
|
}
|
|
|
|
|
|
@PostMapping("/logout")
|
|
@@ -41,4 +45,9 @@ public class LoginController {
|
|
|
ajax.put("permissions", "");
|
|
|
return ajax;
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping("/getRouters")
|
|
|
+ public AjaxResult getRouters(){
|
|
|
+ return AjaxResult.success(new ArrayList<>());
|
|
|
+ }
|
|
|
}
|