axios({
headers: {
'X-Requested-With': 'XMLHttpRequest',
'Content-Type': 'application/json; charset=UTF-8',
'Access-Control-Allow-Origin': '*'
},//设置跨域请求
method: "POST",
url: "https://solelynet.com/public/index.php/api/v1/UserMenu/GetTree",
data: {
"menu_id":1,
"thirdapp_id":1
}
})
.then(function(res) {
console.log(res.data);
for(var i=0;i<res.data.length;i++){
console.log(res.data[i].name)
}
})
.catch(function(err) {
console.log(err);
});
headers: {
'X-Requested-With': 'XMLHttpRequest',
'Content-Type': 'application/json; charset=UTF-8',
'Access-Control-Allow-Origin': '*'
},//设置跨域请求
method: "POST",
url: "https://solelynet.com/public/index.php/api/v1/UserMenu/GetTree",
data: {
"menu_id":1,
"thirdapp_id":1
}
})
.then(function(res) {
console.log(res.data);
for(var i=0;i<res.data.length;i++){
console.log(res.data[i].name)
}
})
.catch(function(err) {
console.log(err);
});