IOS wx.request Bug请求header 设置会丢失?

发布于 6 年前作者 fanxia14429 次浏览最后编辑 6 年前来自 ask

getVotes: function() {

var that=this;

wx.request({

url: app.globalData.host + ‘/api/getAllVotes’,

header: app.getToken(),

success: function (res) {

that.data.votes=res.data;

console.log(res)

console.log(res.data)

console.log(that.data.votes)

that.setData({ votes: res.data});

}

})

}

app.getToken()

会返回

{‘X-Auth-Token’: :‘sssss-ssss-ss-sss-s-ss-sss’, ‘X-Requested-With’: ‘XMLHttpRequest’}

android 都是正常得

IOS里面 这个头就会丢失微信都是最新版本

0 回复
暂无回复