|
|
@@ -19,40 +19,36 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import QRCode from 'qrcodejs2' |
|
|
|
import {mapState} from 'vuex' |
|
|
|
import QRCode from "qrcodejs2"; |
|
|
|
import { mapState } from "vuex"; |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
|
|
|
|
} |
|
|
|
return {}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapState(['merchant_id_scan']) |
|
|
|
}, |
|
|
|
...mapState(["merchant_id_scan"]), |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
goBack() { |
|
|
|
this.$router.go(-1) |
|
|
|
}, |
|
|
|
this.$router.go(-1); |
|
|
|
}, |
|
|
|
goToday() { |
|
|
|
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() { |
|
|
|
this.creatQrCode() |
|
|
|
this.creatQrCode(); |
|
|
|
}, |
|
|
|
|
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
@@ -93,10 +89,11 @@ export default { |
|
|
|
color: rgba(51, 51, 51, 1); |
|
|
|
} |
|
|
|
.Rq { |
|
|
|
width: 4rem; |
|
|
|
height: 3rem; |
|
|
|
width: 4.7rem; |
|
|
|
height: 4rem; |
|
|
|
margin: auto; |
|
|
|
margin-top: 0.5rem; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
.record { |
|
|
|
width: 94%; |
|
|
|