微信小程序发送POST请求参数格式

微信小程序的wx.request请求,method设为POST并向后台传递数据格式如下:
wx.request({
url: 'https://xcx.hymba.com/sms?token=' + app.globalData.token,
data: {'mobile':tel},
method:'POST',
success:function(res){
console.log(res);
}
})

data里的数据就是我们要传的参数

猜你喜欢

转载自blog.csdn.net/wwj791859814/article/details/72367678
今日推荐