|
@@ -73,8 +73,11 @@ export default {
|
|
|
this.scanner = new QrScanner(
|
|
|
this.$refs.video,
|
|
|
result => {
|
|
|
- this.$toast(result)
|
|
|
- this.$emit('success', result)
|
|
|
+ if (result) {
|
|
|
+ this.$toast(result)
|
|
|
+ this.$emit('success', result)
|
|
|
+ }
|
|
|
+
|
|
|
// this.scanner.stop() // 扫描一次后停止
|
|
|
// this.close()
|
|
|
},
|