验证码接口添加请求头信息Version:v1.0.2

This commit is contained in:
red-deng-deng 2021-12-17 10:05:34 +08:00
parent 8db3d03eea
commit 6ef114fd34
1 changed files with 1 additions and 1 deletions

View File

@ -131,11 +131,11 @@ function FormDom(props) {
const codeyzm = () => { const codeyzm = () => {
const xhr = new XMLHttpRequest() const xhr = new XMLHttpRequest()
xhr.open('GET', window.baseurl + '/auth/login/verify') xhr.open('GET', window.baseurl + '/auth/login/verify')
xhr.setRequestHeader('Version','v1.0.2');
xhr.responseType = "arraybuffer"; xhr.responseType = "arraybuffer";
xhr.onreadystatechange = function (response) { xhr.onreadystatechange = function (response) {
response.header = { response.header = {
'Accept': 'application/json', 'Accept': 'application/json',
'Version':'v1.0.2',
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8', 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
} }
let uniques = xhr.getResponseHeader('Unique-Str') let uniques = xhr.getResponseHeader('Unique-Str')