请求验证码方法:
code() {
axios({
url: baseUrl,
responseType:'arraybuffer',
codeImg:true,
}).then(res => {
this.codeImg = 'data:image/png;base64,' + btoa(new Uint8Array(res).reduce((data, byte) => data + String.fromCharCode(byte), ''));
}).catch(res => {
})
}