Browse Source

大文件分片上传 断点续传 文件秒传先行版更新

main
pixel 5 years ago
parent
commit
65ac6597d1
  1. 4
      QMPlusVuePage/src/utils/request.js

4
QMPlusVuePage/src/utils/request.js

@ -32,9 +32,9 @@ service.interceptors.request.use(
config => { config => {
showLoading() showLoading()
const token = store.getters['user/token'] const token = store.getters['user/token']
config.data = config.headers['Content-Type'] == 'application/json' ? config.data : JSON.stringify(config.data);
config.data = JSON.stringify(config.data);
config.headers = { config.headers = {
'Content-Type': config.headers['Content-Type'] || 'application/json',
'Content-Type': 'application/json',
'x-token': token 'x-token': token
} }
return config; return config;

Loading…
Cancel
Save