funing-z
downloadJpgImg() {
      this.loading = true
      const data = {
        backSvg: this.tmpDatas.backSvg,
        frontSvg: this.tmpDatas.frontSvg,
        code: this.tmpDatas.code,
        type: 1
      }
      editingServer.downLoadPdfFiles(data).then(res => {
        this.loading = false
        const blob = res// 接口返回的文件流
        const reader = new FileReader()
        reader.readAsDataURL(blob)
        reader.onload = (e) => {
          const a = document.createElement(\'a\')
          a.download = `${this.tmpDatas.code}模板.jpg`
          a.href = e.target.result
          document.body.appendChild(a)
          a.click()
          document.body.removeChild(a)
        }
      })
    },

分类:

技术点:

相关文章:

  • 2021-12-04
  • 2021-11-17
  • 2021-11-19
  • 2021-07-26
  • 2021-07-01
  • 2021-11-30
  • 2021-07-01
猜你喜欢
  • 2021-05-11
  • 2021-06-06
  • 2021-07-13
  • 2021-07-08
  • 2021-11-24
  • 2021-12-11
  • 2021-11-18
相关资源
相似解决方案