This commit is contained in:
@jyuhsin
2026-01-04 16:11:43 +08:00
parent 8d30f2bb4b
commit d622d70b6c
2 changed files with 32 additions and 19 deletions
@@ -44,7 +44,7 @@ public class ScanController {
@SaCheckLogin
public Object handle(@Param("bizType") String bizType, @Param("params") String params) {
if(StrUtil.isBlank(bizType)) {
return Result.error("参数缺失");
return Result.error("请使用智慧工会系统二维码");
}
Map<String, Object> paramsMap = Json.fromJson(Map.class, params);
return dispatcher.dispatch(bizType, paramsMap);
@@ -230,6 +230,7 @@ layout("/layouts/platform_h5.html"){
},
async onHandle(decodedText) {
try {
// 防重:如果正在处理,直接忽略
if (this.isProcessing) return;
@@ -242,18 +243,30 @@ layout("/layouts/platform_h5.html"){
bizType: bizType,
params: JSON.stringify({ userId: userId, handle: false }),
})
} catch (e) {
this.result = {
code: 99,
msg: '请使用智慧工会系统身份二维码'
}
this.resultVisible = true
}
},
resultConfirm() {
try {
const { bizType, userId } = JSON.parse(this.decodedText)
this.$axios.post('/platform/scan/handle', {
bizType: bizType,
params: JSON.stringify({ userId: userId, handle: true }),
})
} catch (e) {
} finally {
this.isProcessing = false;
this.initCamera()
}
}
},
async created() {