function getStockQty(element, objFilter) {
objFilter.QueryType = "L";
mui.ajax(constHost, {
data: JSON.stringify(objFilter),
dataType: 'json',
type: 'post',
contentType: 'application/json; charset=utf-8',
timeout: 10000,
success: function(data, status, xhr) {
listDatabind(element, data);
},
error: function(xhr, type, errorThrown) {
alert("Type:" + type, "Message:" + errorThrown);
},
headers: {
"Authorization": 'Digest username="you_name",realm="RealmOfBadri",nonce="776f1eaabb0d38306358b5ca04e90e67",uri="/api/employees/12345",cnonce="1f6557d6df952f0b1524b37f1c127f01",nc=00000001,response="916e6536c9677b6f2d655b054bb8c62e",qop="auth"'
}
});
}
这样就可以了!!
4 个回复
MrP
同求答案~
伟石
同求答案+1
伟石
这样就可以了!!
c***@163.com
你这个方法怎么不行啊,报错了:10:45:38.029 已拦截跨源请求:同源策略禁止读取位于 http://192.168.4.116:8080/zwt/orgDept/queryOrgDept 的远程资源。(原因:CORS 头缺少 'Access-Control-Allow-Origin')。1(未知)
2016-11-22 10:47
5***@qq.com - 业余dcloud开发
headers:{'Authorization': "Bearer "+token},