在微信小程序中调用本地接口

mac2022-06-30  25

1.点击详情,并勾选项目设置中最后一行。

 

2.用小程序请求本地的后台服务接口

1 wx.request({ 2 url: 'http://localhost:8090/DemoProject/myTest.do', 3 data:{}, 4 method:'POST', 5 header: { 6 'content-type': 'application/x-www-form-urlencoded' 7 }, 8 success: function (res) { 9 console.log(res.data) 10 } 11 })

 

转载于:https://www.cnblogs.com/yanduanduan/p/8628974.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)