Browse Source

解决跨域

master
taozi 3 years ago
parent
commit
730f09176e
  1. 6
      utils/request.js

6
utils/request.js

@ -77,9 +77,9 @@ console.log(options)
...options.headers, ...options.headers,
// hahah: 'Bearer2 ', // hahah: 'Bearer2 ',
} }
if(options.method=='post'){ // if(options.method=='post'){
options.headers.hahah='Bearer2 ' // options.headers.hahah='Bearer2 '
} // }
if (options.login === true) { if (options.login === true) {
options.headers = { options.headers = {

Loading…
Cancel
Save