我做了一个区块链的钱包.使用 vue 和SDAG jssdk
演示地址 https://the-fucking-monkeys.github.io/#/
源码在 https://github.com/the-fucking-monkeys
目前能收款能付款,但是摄像头不好使.
使用的是 vue-qrcode-reader 这款 vue 库.
涉及到调动摄像头的代码是:
<template>
<div class="scan">
<h1>Scan</h1>
<qrcode-stream @decode="onDecode"></qrcode-stream>
</div>
</template>
<style scoped>
</style>
<script>
import { QrcodeStream, QrcodeDropZone, QrcodeCapture } from "vue-qrcode-reader";
export default {
components: {
QrcodeStream,
QrcodeDropZone,
QrcodeCapture
},
methods: {
onDecode(decodedString) {
console.log(decodedString);
}
}
};
</script>
谁知道为什么不能访问摄像头?