wenhongquan 1 anno fa
parent
commit
2f2d27f611

+ 6 - 2
ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java

@@ -13,6 +13,7 @@ import cn.hutool.core.util.StrUtil;
 import cn.hutool.http.HttpRequest;
 import cn.hutool.http.HttpResource;
 import cn.hutool.http.HttpResponse;
+import cn.hutool.json.JSONObject;
 import cn.hutool.json.JSONUtil;
 import jakarta.servlet.http.HttpServletRequest;
 import lombok.RequiredArgsConstructor;
@@ -208,7 +209,10 @@ public class AuthController {
     }
 
     @PostMapping("/loginByPhoneCodeAndLoginCode")
-    public R<LoginVo> registerByPhonecode(@RequestParam String logincode,@RequestParam String phonecode) throws WxErrorException {
+    public R<LoginVo> registerByPhonecode(@RequestBody String loginbody) throws WxErrorException {
+        JSONObject jsonObject = JSONUtil.parseObj(loginbody);
+        String logincode = jsonObject.getStr("logincode");
+        String phonecode = jsonObject.getStr("phonecode");
 
         AuthRequest authRequest = SocialUtils.getAuthRequest("wechat_mini_program", socialProperties);
         AuthResponse<AuthUser> response = authRequest.login(AuthCallback.builder().code(logincode).build());
@@ -249,7 +253,7 @@ public class AuthController {
             sysSocialService.updateByBo(bo);
         }
 
-        SysClient client = clientService.queryByClientId("39769a71109d3579c97f2e007f8afdaf");
+        SysClient client = clientService.queryByClientId("e5cd7e4891bf95d1d19206ce24a7b32e");
         LoginUser loginUser = loginService.buildLoginUser(userVo);
         loginUser.setClientKey(client.getClientKey());
         loginUser.setDeviceType(client.getDeviceType());

+ 2 - 2
ruoyi-admin/src/main/resources/logback-plus.xml

@@ -40,7 +40,7 @@
             <!-- 日志文件名格式 -->
             <fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
             <!-- 日志最大的历史 60天 -->
-            <maxHistory>60</maxHistory>
+            <maxHistory>3</maxHistory>
         </rollingPolicy>
         <encoder>
             <pattern>${log.pattern}</pattern>
@@ -62,7 +62,7 @@
             <!-- 日志文件名格式 -->
             <fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
             <!-- 日志最大的历史 60天 -->
-            <maxHistory>60</maxHistory>
+            <maxHistory>3</maxHistory>
         </rollingPolicy>
         <encoder>
             <pattern>${log.pattern}</pattern>