使用webpack + iview + axios,在获取钉钉token是出现如下现象,响应里已经得到相关的JSON,但是ajax却提示ERROR,不知道问题是出在哪里,求解
query: function () {
let url = 'https://oapi.dingtalk.com/gettoken';
let CorpID = 'xxxx';
let CorpSecret = 'xxxx';
let accessTokenRequest = {
url: url,
method: 'get',
params: {
corpid: CorpID,
corpsecret: CorpSecret
},
};
axios(accessTokenRequest).then(response => {
console.info(response);
}).catch(error => {
console.info(error);
});
},