caolinxuan hai 2 semanas
pai
achega
c24ba70dfd

+ 18 - 18
src/main/java/com/zhentao/config/CorsConfig.java

@@ -1,18 +1,18 @@
-package com.zhentao.config;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.servlet.config.annotation.CorsRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-
-@Configuration
-public class CorsConfig implements WebMvcConfigurer {
-
-    @Override
-    public void addCorsMappings(CorsRegistry registry) {
-        registry.addMapping("/**")
-                .allowedOrigins("*")
-                .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
-                .maxAge(3600);
-    }
-
-}
+//package com.zhentao.config;
+//
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.web.servlet.config.annotation.CorsRegistry;
+//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+//
+//@Configuration
+//public class CorsConfig implements WebMvcConfigurer {
+//
+//    @Override
+//    public void addCorsMappings(CorsRegistry registry) {
+//        registry.addMapping("/**")
+//                .allowedOrigins("*")
+//                .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
+//                .maxAge(3600);
+//    }
+//
+//}

+ 3 - 3
src/main/java/com/zhentao/controller/WechatLoginController.java

@@ -18,8 +18,8 @@ import java.util.Map;
 @RestController
 public class WechatLoginController {
 
-    private static final String APPID = "wxc8a6a80ca6808238";
-    private static final String SECRET = "96f6ef6782c1080b1c33016c0d0555b5";
+    private static final String APPID = "wx8246d27305af5834";
+    private static final String SECRET = "8badbee7a035911171cdccb13c67de30";
     private static final ObjectMapper objectMapper = new ObjectMapper(); // JSON 解析器
 
     @PostMapping("/api/wx-login")
@@ -78,4 +78,4 @@ public class WechatLoginController {
         response.put("error", message);
         return response;
     }
-}
+}