### [在小程序中怎样调用本地接口](https://www.prosaas.cn/article/16805) **Published:** 2020-03-25T03:43:05 **Author:** 5201314 **Excerpt:** 1、点击详情,并勾选项目设置中最后一行。2、用小程序请求本地的后台服务接口 推荐教程:小程序开发教程 以上就是… ![](https://img.php.cn/upload/article/000/000/041/5e7ad1c861c01496.jpg) 1、点击详情,并勾选项目设置中最后一行。 ![](https://img.php.cn/upload/image/458/902/509/1585107434432495.png) 2、用小程序请求本地的后台服务接口 wx.request({ url: 'http://localhost:8090/DemoProject/myTest.do', data:{}, method:'POST', header: { 'content-type': 'application/x-www-form-urlencoded' }, success: function (res) { console.log(res.data) } }) 推荐教程:小程序开发教程 以上就是在小程序中怎样调用本地接口的详细内容,更多请关注知企PROSAAS其它相关文章! **Tags:** 接口 **Categories:** 后端开发 ---