text: import qrcode from '@/assets/js/qrcode'
  import json2vcf from '@/assets/js/json2vcf'
  
  export const ShareBase64 = async (data) => {
      const shareText = json2vcf(data),
          promise = new qrcode({
              render: 'canvas',
              correctLevel: 0,
              pdground: '#0093d5',
              background: '#ffffff',
              foreground: '#666666',
              text: shareText,
              size: 300
          })
      let base64 = ''
      await promise.then(row => {
          base64 = row.toDataURL('image/png')
      })
      return base64
  }
  
  export const MyCardToVfcBase64 = async (data, size) => {
      const logo = require('../../../public/static/images/favicon.png')
      const shareText = json2vcf(data),
          promise = new qrcode({
              render: 'canvas',
              correctLevel: 0,
              pdground: '#0093d5',
              background: '#ffffff',
              foreground: '#454545',
              text: shareText,
              size: size,
              image: logo,
              imageSize: Math.round(size * .25)
          })
      let base64 = ''
      await promise.then(row => {
          base64 = row.toDataURL('image/png')
      })
      return base64
  }