修改微信appid
This commit is contained in:
@@ -139,3 +139,18 @@ mybatis-plus:
|
||||
|
||||
file:
|
||||
upload-dir: /data/file
|
||||
|
||||
#微信小程序
|
||||
wx:
|
||||
appid: wx4aa34488b965a331
|
||||
secret: 558780ecc2750f87e556b0e5496773c9
|
||||
|
||||
#统一门户认证
|
||||
oauth:
|
||||
appid: aa
|
||||
clientsecretkey: bb
|
||||
getToken: http://ip:80/serviceAPI/getToken
|
||||
getUserInfo: http://ip:80/serviceAPI/getUserInfo
|
||||
connect-timeout: 10
|
||||
read-timeout: 30
|
||||
write-timeout: 30
|
||||
@@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
@@ -28,8 +29,17 @@ public class WechatUtil {
|
||||
/**
|
||||
* 生成signature
|
||||
**/
|
||||
private static String appid = "wx9d1cbc11c8c40ba7";
|
||||
private static String secret = "38e87cf6251945446e8ac091a0ba9ab2";
|
||||
/*private static String appid = "wx9d1cbc11c8c40ba7";
|
||||
private static String secret = "38e87cf6251945446e8ac091a0ba9ab2";*/
|
||||
|
||||
// 令牌自定义标识
|
||||
@Value("${wx.appid}")
|
||||
private String appid;
|
||||
|
||||
// 令牌秘钥
|
||||
@Value("${wx.secret}")
|
||||
private String secret;
|
||||
|
||||
public AppWechatEntity sign(String url) {
|
||||
Map<String, String> ret = new HashMap();
|
||||
String nonceStr = create_nonce_str();
|
||||
|
||||
Reference in New Issue
Block a user