ソースを参照

fix: 修改bug

wuguojie 7 ヶ月 前
コミット
e3b6b3ffa2
1 ファイル変更7 行追加1 行削除
  1. 7 1
      src/views/insurancePolicy/index.vue

+ 7 - 1
src/views/insurancePolicy/index.vue

@@ -2836,7 +2836,7 @@ const handleGetPayCode = () => {
         quoteData.value[underwritingIndex.value]?.quoteResult.ordersNo
     ).then((res: any) => {
         if(res.code == 200) {
-            payCodeSrc.value = res.data?.qrcode
+            srcChange(res.data?.qrcode)
             payCodeShow.value = true
         } else {
             payCodeSrc.value = ''
@@ -2847,6 +2847,12 @@ const handleGetPayCode = () => {
         }
     })
 }
+const srcChange = async (url) => {
+    payCodeSrc.value = await QRCode.toDataURL(url, {
+        width: 150,
+        margin: 2
+    });
+}
 const handlePayCodeClose = () => {
     payCodeSrc.value = ''
     payCodeShow.value = false