| @@ -19,40 +19,36 @@ | |||||
| </template> | </template> | ||||
| <script> | <script> | ||||
| import QRCode from 'qrcodejs2' | |||||
| import {mapState} from 'vuex' | |||||
| import QRCode from "qrcodejs2"; | |||||
| import { mapState } from "vuex"; | |||||
| export default { | export default { | ||||
| data() { | data() { | ||||
| return { | |||||
| } | |||||
| return {}; | |||||
| }, | }, | ||||
| computed: { | computed: { | ||||
| ...mapState(['merchant_id_scan']) | |||||
| }, | |||||
| ...mapState(["merchant_id_scan"]), | |||||
| }, | |||||
| methods: { | methods: { | ||||
| goBack() { | goBack() { | ||||
| this.$router.go(-1) | |||||
| }, | |||||
| this.$router.go(-1); | |||||
| }, | |||||
| goToday() { | goToday() { | ||||
| this.$router.push("/todayConsume"); | this.$router.push("/todayConsume"); | ||||
| }, | }, | ||||
| creatQrCode() { | |||||
| var qrcode = new QRCode(this.$refs.RqCode, { | |||||
| text: `{"END":"B","TYPE":"merchant","ID":"${this.merchant_id_scan}"}`, //需要转换为二维码的内容 | |||||
| width: 150, | |||||
| height: 150, | |||||
| colorDark: '#000000', | |||||
| colorLight: '#ffffff', | |||||
| correctLevel: QRCode.CorrectLevel.H | |||||
| }) | |||||
| creatQrCode() { | |||||
| var qrcode = new QRCode(this.$refs.RqCode, { | |||||
| text: `{"END":"B","TYPE":"merchant","ID":"${this.merchant_id_scan}"}`, //需要转换为二维码的内容 | |||||
| width: 175, | |||||
| height: 150, | |||||
| colorDark: "#000000", | |||||
| colorLight: "#ffffff", | |||||
| correctLevel: QRCode.CorrectLevel.H, | |||||
| }); | |||||
| }, | }, | ||||
| }, | }, | ||||
| mounted() { | mounted() { | ||||
| this.creatQrCode() | |||||
| this.creatQrCode(); | |||||
| }, | }, | ||||
| }; | }; | ||||
| </script> | </script> | ||||
| <style scoped> | <style scoped> | ||||
| @@ -93,10 +89,11 @@ export default { | |||||
| color: rgba(51, 51, 51, 1); | color: rgba(51, 51, 51, 1); | ||||
| } | } | ||||
| .Rq { | .Rq { | ||||
| width: 4rem; | |||||
| height: 3rem; | |||||
| width: 4.7rem; | |||||
| height: 4rem; | |||||
| margin: auto; | margin: auto; | ||||
| margin-top: 0.5rem; | margin-top: 0.5rem; | ||||
| text-align: center; | |||||
| } | } | ||||
| .record { | .record { | ||||
| width: 94%; | width: 94%; | ||||