diff --git a/src/main/java/com/gxwebsoft/auto/service/impl/QrLoginServiceImpl.java b/src/main/java/com/gxwebsoft/auto/service/impl/QrLoginServiceImpl.java index 4876c48..9832787 100644 --- a/src/main/java/com/gxwebsoft/auto/service/impl/QrLoginServiceImpl.java +++ b/src/main/java/com/gxwebsoft/auto/service/impl/QrLoginServiceImpl.java @@ -138,7 +138,9 @@ public class QrLoginServiceImpl implements QrLoginService { String apiUrl = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + accessToken; HashMap params = new HashMap<>(); - params.put("scene", "token=" + token); // 场景值,扫码后会透传 + // scene 必须是字符串,最大 32 字符,直接传 token(32位UUID)刚好满足限制 + // 小程序端通过 router.params.scene 获取此 token + params.put("scene", token); params.put("page", "pages/public/qr-confirm/index"); // 小程序确认页面路径 params.put("env_version", "release"); // 正式版小程序 params.put("width", 280); // 二维码宽度