|
@@ -8,27 +8,32 @@ import com.ruoyi.system.domain.wx.AppletSessionDTO;
|
|
|
import com.ruoyi.system.domain.wx.WxPayV3Bean;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.context.annotation.Configuration;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
/**
|
|
|
*小程序工具类
|
|
|
*/
|
|
|
+@Component
|
|
|
public class WxCodeSessionUtil {
|
|
|
|
|
|
- private static final String JSCODE_SESSION_API = "https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=JSCODE&grant_type=authorization_code";
|
|
|
+ private static final String JSCODE_SESSION_API = "https://api.weixin.qq.com/sns/jscode2session?appid=wx4492fe7554b0cb0a&secret=4b0d27de8fe102c788acaa757e421f78&js_code=JSCODE&grant_type=authorization_code";
|
|
|
|
|
|
/**
|
|
|
* 小程序appId
|
|
|
*/
|
|
|
@Value("${wx.appId}")
|
|
|
- private static String appId;
|
|
|
+ private static String appId = "wx4492fe7554b0cb0a";
|
|
|
|
|
|
/**
|
|
|
* 小程序密钥
|
|
|
*/
|
|
|
@Value("${wx.appSecret}")
|
|
|
- private static String appSecret;
|
|
|
+ private static String appSecret = "4b0d27de8fe102c788acaa757e421f78";
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 根据code获取小程序openid和unionid
|
|
|
*
|