比如我要在再请求里的header里加一个tick=123456的值,该怎么加上去
这个添加对么 为什么返回信息一致提示tick没加header里
token为什么不加在url上呢,官方例子也是这样的
通用样式表里。有,统一添加
wx.request({
url: that.data.apiUrl,
data: {
name: that.data.userName,
no: that.data.userID,
},
header: {
'content-Type': 'application/json',
'token':'d2d5e09088b202d3dfd5d43ead294a9c'
},
method: 'POST',
success: function (res) {
},
fail: function (res) {
console.log(res);
}
})