var _token=...............................
mui.ajax({
url: 'http://192.168........',
data: {},
async: true,
dataType: 'json',
crossDomain: true, //强制使用5+跨域
type: 'get',
timeout: 60000,
headers: {
Authorization: 'Bearer' + _token //看这里,是直接这样写吗?
},
success: function(msg) {
console.log('ss:' + msg);
},
error: function(xhr, type, errorThrown) {
console.log(errorThrown);
}
});
e***@163.com
- 发布:2020-06-03 10:43
- 更新:2020-06-03 10:51
- 阅读:1153
1 个回复
e***@163.com (作者) - zzyhost
以解决:'Bearer' + _token,少个空格,'Bearer ' + _token