Browse Source

base64改成png

xuqiaoying 3 năm trước cách đây
mục cha
commit
ee11078f32
2 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 2 2
      pages2/appointment/order.vue
  2. 1 1
      pages2/exam/signCommit.vue

+ 2 - 2
pages2/appointment/order.vue

@@ -333,7 +333,7 @@ export default {
                   url: this.commitment_electr_signature, //临时路径
                   responseType: 'arraybuffer', //设置返回的数据格式为arraybuffer
                   success: res => {
-                    const base64 = "data:image/jpeg;base64," + uni.arrayBufferToBase64(res.data)
+                    const base64 = "data:image/png;base64," + uni.arrayBufferToBase64(res.data)
                     console.log('sfs签名转成base64', base64)
                     this.baseAddress = base64
                     this.submits()
@@ -470,7 +470,7 @@ export default {
     //       url: this.commitment_electr_signature, //临时路径
     //       responseType: 'arraybuffer', //设置返回的数据格式为arraybuffer
     //       success: res => {
-    //         const base64 = "data:image/jpeg;base64," + uni.arrayBufferToBase64(res.data)
+    //         const base64 = "data:image/png;base64," + uni.arrayBufferToBase64(res.data)
     //         console.log('sfs签名转成base64', base64)
     //         this.baseAddress = base64
     //       }

+ 1 - 1
pages2/exam/signCommit.vue

@@ -140,7 +140,7 @@ export default {
                 url: this.commitment_electr_signature, //临时路径
                 responseType: 'arraybuffer', //设置返回的数据格式为arraybuffer
                 success: res => {
-                    const base64 = "data:image/jpeg;base64," + uni.arrayBufferToBase64(res.data)
+                    const base64 = "data:image/png;base64," + uni.arrayBufferToBase64(res.data)
                     console.log('sfs签名转成base64', base64)
                     this.baseAddress = base64
                     this.$http({