阅读背景:

微信小程序发起请求

来源:互联网 

一.示例代码

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



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: