weiwenhai 6 anni fa
parent
commit
5f0270cea2

+ 2 - 2
src/main/java/cn/com/qmth/examcloud/app/controller/SystemRestController.java

@@ -42,9 +42,9 @@ public class SystemRestController {
 
     @ApiOperation(value = "获取短信验证码接口")
     @RequestMapping(value = "/send/sms/code", method = {RequestMethod.GET, RequestMethod.POST})
-    public Result sendSmsCode(@RequestHeader String key, @RequestHeader String token, @RequestParam String phone) throws Exception {
+    public Result sendSmsCode(@RequestParam String phone) throws Exception {
         //return smsService.sendSmsCode(key, token, phone);
-        return userAuthService.sendSmsCode(key, token, phone);
+        return userAuthService.sendSmsCode(phone);
     }
 
     @ApiOperation(value = "校验短信验证码接口", hidden = true)

+ 1 - 1
src/main/java/cn/com/qmth/examcloud/app/service/UserAuthService.java

@@ -82,7 +82,7 @@ public interface UserAuthService {
      * @return
      * @throws Exception
      */
-    Result sendSmsCode(String key, String token, String phone) throws Exception;
+    Result sendSmsCode(String phone) throws Exception;
 
     /**
      * 保存用户绑定的手机号

+ 2 - 2
src/main/java/cn/com/qmth/examcloud/app/service/impl/UserAuthServiceImpl.java

@@ -131,13 +131,13 @@ public class UserAuthServiceImpl implements UserAuthService {
     }
 
     @Override
-    public Result sendSmsCode(String key, String token, String phone) throws Exception {
+    public Result sendSmsCode(String phone) throws Exception {
         //封装请求参数
         final String requestUrl = String.format("%s/api/ecs_core/auth/sendVerificationCode", propertyService.getUserAuthUrl());
         RequestBody formBody = new FormBody.Builder()
                 .add("phone", phone)
                 .build();
-        return HttpUtils.doPost(requestUrl, formBody, key, token);
+        return HttpUtils.doPost(requestUrl, formBody, null, null);
     }
 
     @Override