1、点击详情,并勾选项目设置中最后一行。
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) } })
推荐教程:小程序开发教程
以上就是在小程序中怎样调用本地接口的详细内容,更多请关注php中文网其它相关文章!
Copyright 2014-2024 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号