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)
        }
      })
    },

分类:

技术点:

相关文章: