|
|
@@ -316,8 +316,10 @@ const _handlerScan = (code) => {
|
|
|
}
|
|
|
// 数字0-9,大写字母A-Z,部分特殊字符(空格、! " % & ' ( ) * + , - . / : ; < = > ? _)
|
|
|
const code128BPattern = /^[\x20-\x7F]+$/;
|
|
|
+ // 新增:过滤以430300开头的正则
|
|
|
+ const startsWithPattern = /^430300.*/;
|
|
|
// 检查是否只包含有效字符
|
|
|
- if (!code128BPattern.test(code)) {
|
|
|
+ if (!code128BPattern.test(code) || startsWithPattern.test(code)) {
|
|
|
console.log(code)
|
|
|
scanErr()
|
|
|
showNotify({ type: 'danger', style: 'font-size: 30px !important;height:50px', message: '请扫描正确的快递单号!' });
|