From d32d5b310d1dc557c4ff0fdaf08b12601260599d Mon Sep 17 00:00:00 2001 From: liujun Date: Tue, 24 Dec 2024 18:49:00 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E8=AF=9D=202=E3=80=81=E6=8E=A5=E5=8F=A3=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E7=A4=BA=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 5ef432e..0d2cb64 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -88,7 +88,7 @@ export default { this.fnUpdateVersion(false) }, methods: { - async fnScan() { + async fnScan() { uni.scanCode({ success: async (res) => { let obj = JSON.parse(res.result) @@ -99,12 +99,11 @@ export default { CORPINFO_ID: obj[0].CORPINFO_ID, RELEVANT_UNIT_NAME: obj[0].RELEVANT_UNIT_NAME }); - if (info.code === 200){ + if (info.code === 200) { uni.$u.toast('入职成功') - }else { - uni.$u.toast('入职失败,请联系管理员') + } else { + uni.$u.toast(info.msg ? info.msg : '系统异常请联系管理员') } - } else if (type === '1') { // type=1时跳转电子工牌页面 uni.$u.route({ @@ -118,8 +117,8 @@ export default { } }); }, - fnIsShow(index){ - if(index === 5) return !!this.userInfo.CORPINFO_ID + fnIsShow(index) { + if (index === 5) return !!this.userInfo.CORPINFO_ID return true }, fnNavigator(e) {