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


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     })  

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM