FWQ
微信小程序中的网络请求(post请求和get请求)
这篇文章主要介绍了微信小程序 网络请求(post请求,get请求)的相关资料,需要的朋友可以参考下 微信小程序 网络请求 1.post请求: onLoad: function() { that = this; wx.request( { url: "url", header: { "Content-Type": "application/x-www-form-urlencoded" }, method: "POST", data: {}, complete: function( res ) { console.log(res.data) }); if( res == null || res.data == null ) { console.error( '网络请求失败' ); return; } } }) }, 登录后复制 2.GET请求 onLoad: function () { console.log('onLoad')…