fix(qrLogin): 修正二维码场景值传递问题

- 将 scene 参数由 "token=" + token 改为直接传 token
- 确保 scene 为字符串且长度不超过 32 字符
- 便于小程序端通过 router.params.scene 获取 token
- 优化注释说明二维码参数限制和使用方式
This commit is contained in:
2026-04-07 21:14:44 +08:00
parent 1c9c2dfd82
commit ed9c59dae6

View File

@@ -171,3 +171,37 @@ A bean with that name has already been defined in class path resource [com/gxweb
- 修改后的方案消除了参数依赖避免Spring误解
- 启用bean定义覆盖作为安全备份确保即使有其他bean冲突也能启动
## Hutool库API兼容性修复 (21:07)
### 问题描述
编译错误:`HttpResponse` 类没有 `bytes()` 方法
```
/Users/gxwebsoft/JAVA/com.gxwebsoft.core/src/main/java/com/gxwebsoft/auto/service/impl/QrLoginServiceImpl.java:156:19
java: cannot find symbol
symbol: method bytes()
location: class cn.hutool.http.HttpResponse
```
### 原因分析
- 项目使用的是Hutool 5.8.25版本
- 在Hutool 5.x版本中`HttpResponse`类没有`bytes()`方法
- 正确的方法应该是`bodyBytes()`用于获取二进制响应,或`body()`用于获取字符串响应
### 修复方法
修改 `QrLoginServiceImpl.java` 第156行
```java
// 修改前错误的API
.execute().bytes();
// 修改后正确的API
.execute().bodyBytes();
```
### 影响
修复后项目可以成功编译,微信小程序码生成功能可以正常工作。
### 版本兼容性说明
- Hutool 4.x版本可能支持`.bytes()`方法
- Hutool 5.x版本使用`.bodyBytes()`和`.body()`方法
- 项目中使用的是Hutool 5.8.25应保持API一致性