2021.11.23
<script>
/*
then response
then data
*/
fetch('./00 data.json',{})
.then(function (response) {
// resole
console.log(response)
return response.json();
})
.then(function (data) {
console.log(data);
})
.catch(function(){
// reject
})
</script>
/*
参数 params
数据 .data
*/
axios.get("./00 data.json",{
// Headers:{
// }
params:{
id:1001
}
})
.then(function(response){
console.log(response.data)
})
.catch(function(err){
console.log(err);
})
浙公网安备 33010602011771号