微信小程序提交数据到后台服务汉字乱码
文章目录
wx.request({
url: app.globalData.yzmUrl + "?method=sendsmsCode",
method: 'POST',
header: { 'content-type': 'application/x-www-form-urlencoded;charset=utf-8' },
data: { phone: param.phone},
success: function (data) {
console.log(data);
}
});
wx.request({})使用POST请求,添加header属性{ 'content-type': 'application/x-www-form-urlencoded;charset=utf-8' }
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论