获取网络数据
let data = []; new Promise(function(resolve,reject){
axios.post('api.php').then(function(response){
resolve(response);
},function(error){
reject({data:[]});
});
}).then(function(resolve){
console.log('数据来了');
console.log(resolve.data);
data = resolve.data;
},function(reject){
console.log(reject);
data = reject.data;
});