| | |
| | | return ; |
| | | } |
| | | that.repeatClick = true |
| | | const { |
| | | code, |
| | | data, |
| | | msg |
| | | } = await request('/saveOutTaskSts/'+that.barcode,{}, 'get') |
| | | if (code === 200) { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: "success" |
| | | }) |
| | | // 确认后清空,支持再次扫描 |
| | | that.clear() |
| | | |
| | | }else if(code == 401){ |
| | | setTimeout(() => { |
| | | uni.removeStorageSync('token'); |
| | | uni.reLaunch({ |
| | | url: "/pages/login/login" |
| | | }); |
| | | }, 1000); |
| | | }else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: "none", |
| | | position: 'top' |
| | | }) |
| | | try { |
| | | const { |
| | | code, |
| | | data, |
| | | msg |
| | | } = await request('/saveOutTaskSts/'+that.barcode,{}, 'get') |
| | | if (code === 200) { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: "success" |
| | | }) |
| | | // 确认后清空,支持再次扫描 |
| | | that.clear() |
| | | |
| | | }else if(code == 401){ |
| | | setTimeout(() => { |
| | | uni.removeStorageSync('token'); |
| | | uni.reLaunch({ |
| | | url: "/pages/login/login" |
| | | }); |
| | | }, 1000); |
| | | }else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: "none", |
| | | position: 'top' |
| | | }) |
| | | } |
| | | } finally { |
| | | that.repeatClick = false |
| | | } |
| | | that.repeatClick = false |
| | | |
| | | }, |
| | | clearCode() { |
| | | this.isClearing = true; |