refactor(qa-prevention-xgf-app): 优化二维码扫描功能- 修改二维码扫描结果的解析逻辑

- 更新用户信息获取方式- 调整二维码类型处理逻辑
- 优化电子工牌页面跳转注释
- 更新签到二维码处理方式

refactor(xgf_gwj_vue_2.0): 修改二维码对话框显示逻辑

- 将二维码图片以 JSON 格式存储
- 添加二维码类型信息
hyx_2025-01-13_xgf2.0
wangyan 2025-03-07 16:38:14 +08:00
parent 932f5955ca
commit d630c82b07
1 changed files with 14 additions and 14 deletions

View File

@ -124,14 +124,14 @@ export default {
success: async (res) => { success: async (res) => {
// let obj = JSON.parse(res.result) // let obj = JSON.parse(res.result)
// let type = obj[0].CODE_TYPE // let type = obj[0].CODE_TYPE
const { classId, type } = JSON.parse(response.result) const { classId, type, RELEVANT_UNIT_NAME } = JSON.parse(res.result)
const classInfo = await this.handleGetListAll(classId); const classInfo = await this.handleGetListAll(classId);
switch(type) { switch(type) {
case "0": { case "0": {
let info = await setEntryV1({ let info = await setEntryV1({
userId: this.userInfo.USER_ID, userId: this.userInfo.USER_ID,
corpinfoId: obj[0].CORPINFO_ID, // corpinfoId: obj[0].CORPINFO_ID,
RELEVANT_UNIT_NAME: obj[0].RELEVANT_UNIT_NAME, RELEVANT_UNIT_NAME: RELEVANT_UNIT_NAME,
postMethod: 'application/json' postMethod: 'application/json'
}) })
if (info.code === 200) { if (info.code === 200) {
@ -141,17 +141,17 @@ export default {
} }
break; break;
}; };
case "1": { // case "1": {
// type=1 // // type=1
uni.$u.route({ // uni.$u.route({
url: '/pages/electronic_work_card/index', // url: '/pages/electronic_work_card/index',
params: { // params: {
USER_ID: obj[0].USER_ID, // USER_ID: obj[0].USER_ID,
CODE_TYPE: obj[0].CODE_TYPE // CODE_TYPE: obj[0].CODE_TYPE
} // }
}) // })
break; // break;
}; // };
case "2": { case "2": {
// , [type: 2 --> ] // , [type: 2 --> ]
if (classInfo) { if (classInfo) {