wx.request({
  url: 'test.php', //仅为示例,并非真实的接口地址
  data: {
     x: '' ,
     y: ''
  },
  header: {
      'content-type': 'application/json' // 默认值
  },
  success: function(res) {
    console.log(res.data)
  }
})

上边是官方的代码,在开发者工具更新后,header格式改为如下

header:{
    "Content-Type":"json"
},

就可以了

相关文章:

  • 2022-01-27
  • 2022-01-26
  • 2022-12-23
  • 2021-05-23
  • 2021-07-19
  • 2022-12-23
  • 2021-10-18
  • 2021-11-28
猜你喜欢
  • 2021-11-12
  • 2022-12-23
  • 2021-12-24
  • 2022-01-01
  • 2022-12-23
  • 2023-04-10
相关资源
相似解决方案