提交修改

This commit is contained in:
quyixiao 2025-11-12 12:42:40 +08:00
parent 95f0f8b769
commit 8d5fcc2c70
2 changed files with 6 additions and 6 deletions

View File

@ -21,7 +21,9 @@ public class WeChatUtils {
* 微信 auth.code2Session 接口
*/
public final static String WECHAT_LOGIN_URL = "https://api.weixin.qq.com/sns/jscode2session";
public final static String WECHAT_APPID = "wx75fa59c097bd3dfd";
public final static String WECHAT_SECRET = "1837c382de696013a2dfc64591e6b854";
@ -33,6 +35,9 @@ public class WeChatUtils {
private static final String schemeUrl = "https://api.weixin.qq.com/wxa/generatescheme?access_token=";
public static final String wechatQrcodeUrl = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=";
@Autowired
private RedisUtils redisUtils;

View File

@ -11,7 +11,6 @@ import com.heyu.api.oss.OssFileUploadService;
import com.heyu.api.oss.OssUploadResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -23,8 +22,6 @@ import java.util.Map;
@RestController
@RequestMapping("/app/qrcode")
public class AppQrCodeController {
public static final String wechatQrcodeUrl = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=";
// 自行配置正式版为 "release"体验版为 "trial"开发版为 "develop"默认是正式版
@ -53,8 +50,7 @@ public class AppQrCodeController {
// 当前登录账号
String accountId = "123456";
String url = wechatQrcodeUrl + accessTokenDTO.getAccessToken();
String url = WeChatUtils.wechatQrcodeUrl + accessTokenDTO.getAccessToken();
Map<String, Object> body = new HashMap<>();
@ -80,7 +76,6 @@ public class AppQrCodeController {
}
OssUploadResult ossUploadResult = ossFileUploadService.uploadImageByBytes(bytes);
return R.ok().setData(ossUploadResult);
}