IOS开发者试水:微信小程序开发教程 从零开始(3)

上传:licy63953 浏览: 20 推荐: 0 文件:PDF 大小:247.75KB 上传时间:2021-04-30 19:24:17 版权申诉
这篇文章我将讲解列表的网络请求以及网络数据的对接。 首先找到我们的index.js文件,然后看看微信小程序的网络请求文档很轻松的就可以找到我们的示例代码: wx.request({ url: 'test.php', data: { x: '' , y: '' }, header: { 'Content-Type': 'application/json' }, success: function(res) { console.log(res.data) } }) url为我们需要请求的接口 data为我们的请求参数 header
上传资源
用户评论