利用fetch进行POST传参

fetch(config.host+"url",{
     method:"POST",
     mode: 'cors',跨域请求
  headers: {
    'Content-Type': 'application/json'
  },
  body:JSON.stringify({
   'id' : 'XXX'
  })
  }).then(response => response.json()).then(json => {})
原文地址:https://www.cnblogs.com/luffe/p/7744228.html