使用base64编码的解析图片

auroraQ / 2023-08-08 / 原文

 

 使用base64编码的解析图片

 

getCodeImg().then(res => {
        this.captchaEnabled =
          res.captchaEnabled === undefined ? true : res.captchaEnabled;
        if (this.captchaEnabled) {
          this.codeUrl = "data:image/gif;base64," + res.img;
        }
      });