commit
This commit is contained in:
@@ -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,29 +230,42 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
async onHandle(decodedText) {
|
||||
// 防重:如果正在处理,直接忽略
|
||||
if (this.isProcessing) return;
|
||||
try {
|
||||
// 防重:如果正在处理,直接忽略
|
||||
if (this.isProcessing) return;
|
||||
|
||||
// 立即设置为处理中,并停止扫描
|
||||
this.isProcessing = true;
|
||||
await this.closeScan()
|
||||
// 立即设置为处理中,并停止扫描
|
||||
this.isProcessing = true;
|
||||
await this.closeScan()
|
||||
|
||||
const { bizType, userId } = JSON.parse(decodedText)
|
||||
this.result = await this.$axios.post('/platform/scan/handle', {
|
||||
bizType: bizType,
|
||||
params: JSON.stringify({ userId: userId, handle: false }),
|
||||
})
|
||||
this.resultVisible = true
|
||||
const { bizType, userId } = JSON.parse(decodedText)
|
||||
this.result = await this.$axios.post('/platform/scan/handle', {
|
||||
bizType: bizType,
|
||||
params: JSON.stringify({ userId: userId, handle: false }),
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
this.result = {
|
||||
code: 99,
|
||||
msg: '请使用智慧工会系统身份二维码'
|
||||
}
|
||||
this.resultVisible = true
|
||||
}
|
||||
},
|
||||
|
||||
resultConfirm() {
|
||||
const { bizType, userId } = JSON.parse(this.decodedText)
|
||||
this.$axios.post('/platform/scan/handle', {
|
||||
bizType: bizType,
|
||||
params: JSON.stringify({ userId: userId, handle: true }),
|
||||
})
|
||||
this.isProcessing = false;
|
||||
this.initCamera()
|
||||
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()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user