<style> .priceCodeDiv { width: 280px; height: 210px; display: flex; justify-content: center; align-items: center; } </style> <template> <div class="priceCodeDiv"> <img :src="'data:image/png;base64,'+TCQrCode" /> </div> </template> <script> export default { props: ["priceInfo", "showSurveyType"], data() { return { loading: false, TCQrCode: "" }; }, components: { }, methods: { //生成车行意见调查表二维码 createPriceImg() { let urlObj = this.domainManager(); let msg = { TCID: this.priceInfo.TCID, pUrl: "", }; if (this.showSurveyType == 1) { msg.pUrl = "/html/ImpressionOpinionSurvey/guestlogin.html" } else { msg.pUrl = "/html/ImpressionOpinionSurvey/busSign.html" } this.$http({ headers: { 'Content-Type': 'application/json' }, method: 'post', url: urlObj.DomainUrl + '/api/file/GetSurveyQrCode?', data: { "msg": msg } }).then(res => { if (res.data.resultCode === 1) { this.TCQrCode = res.data.data; } }).catch(err => {}) }, closeCode() { } }, mounted() { this.createPriceImg(); } }; </script>