|
|
@@ -7,10 +7,7 @@ import com.nju.edu.pay.web.response.ErrorResponse;
|
|
|
import com.nju.edu.pay.web.response.Response;
|
|
|
import com.nju.edu.pay.web.response.SuccessResponse;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/api/auth")
|
|
|
@@ -30,7 +27,7 @@ public class AuthController {
|
|
|
String phone= loginDTO.getPhone();
|
|
|
String password=loginDTO.getPassword();
|
|
|
if (phone.equals(rootProperties.getPhone())&& password.equals(rootProperties.getPassword())){
|
|
|
- return new SuccessResponse(jwtUtil.createToken(rootProperties.getName()));
|
|
|
+ return new SuccessResponse("Bear "+jwtUtil.createToken(rootProperties.getName()));
|
|
|
}else {
|
|
|
return new ErrorResponse(500,"登录失败");
|
|
|
}
|