原创

fetch请求实例,浏览器原生得ajax请求


  1. fetch(createUrl,
  2. {
  3. method: 'POST',
  4. headers: {
  5. 'Content-Type': 'application/json'
  6. },
  7. body: JSON.stringify(data)
  8. }
  9. )
  10. .then(response => response.json())
  11. .then(data => {
  12. if (data.code == 200) {
  13. success(data.msg);
  14. this.list.unshift({
  15. "content": this.title,
  16. "status" : 0
  17. })
  18. this.title = ''
  19. } else {
  20. error(data.msg)
  21. }
  22. })
留言反馈
问题反馈渠道,如有软件无法下载或者其他问题可反馈。【由于某种原因,目前留言不展示】
用户需要登录后才能留言反馈