瀏覽代碼

fixes bug

PLF 5 年之前
父節點
當前提交
d1e2ddfa38

+ 2 - 2
src/main/java/com/caimei/controller/order/OrderController.java

@@ -84,8 +84,8 @@ public class OrderController {
         map.put("referer", referer);
         map.put("referer", referer);
         String requestUrl = "https://api.weixin.qq.com/sns/jscode2session";
         String requestUrl = "https://api.weixin.qq.com/sns/jscode2session";
         Map<String, String> requestUrlParam = new HashMap<String, String>();
         Map<String, String> requestUrlParam = new HashMap<String, String>();
-        requestUrlParam.put("appid", env.getProperty("AppId" + organizeID));//小程序appId
-        requestUrlParam.put("secret", env.getProperty("AppSecret" + organizeID));//小程序appsecret
+        requestUrlParam.put("appid", env.getProperty("miniprogram.AppId" + organizeID));//小程序appId
+        requestUrlParam.put("secret", env.getProperty("miniprogram.AppSecret" + organizeID));//小程序appsecret
         requestUrlParam.put("js_code", code);//小程序端返回的code
         requestUrlParam.put("js_code", code);//小程序端返回的code
         requestUrlParam.put("grant_type", "authorization_code");//默认参数
         requestUrlParam.put("grant_type", "authorization_code");//默认参数
         //发送post请求读取调用微信接口获取openid用户唯一标识
         //发送post请求读取调用微信接口获取openid用户唯一标识

+ 3 - 3
src/main/java/com/caimei/controller/user/LoginController.java

@@ -48,9 +48,9 @@ public class LoginController {
         map.put("referer", referer);
         map.put("referer", referer);
         String requestUrl = "https://api.weixin.qq.com/sns/jscode2session";
         String requestUrl = "https://api.weixin.qq.com/sns/jscode2session";
         Map<String, String> requestUrlParam = new HashMap<String, String>();
         Map<String, String> requestUrlParam = new HashMap<String, String>();
-        requestUrlParam.put("appid", env.getProperty("AppId" + organizeID));//小程序appId
-        logger.info("" + env.getProperty("AppId" + organizeID));
-        requestUrlParam.put("secret", env.getProperty("AppSecret" + organizeID));//小程序appsecret
+        requestUrlParam.put("appid", env.getProperty("miniprogram.AppId" + organizeID));//小程序appId
+        logger.info("" + env.getProperty("miniprogram.AppId" + organizeID));
+        requestUrlParam.put("secret", env.getProperty("miniprogram.AppSecret" + organizeID));//小程序appsecret
         requestUrlParam.put("js_code", code);//小程序端返回的code
         requestUrlParam.put("js_code", code);//小程序端返回的code
         requestUrlParam.put("grant_type", "authorization_code");//默认参数
         requestUrlParam.put("grant_type", "authorization_code");//默认参数
         //发送post请求读取调用微信接口获取openid用户唯一标识
         //发送post请求读取调用微信接口获取openid用户唯一标识