标签:api ons ISE post 获取 erro new 使用 resolve
获取网络数据
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; });
标签:api ons ISE post 获取 erro new 使用 resolve
原文地址:https://www.cnblogs.com/wntd/p/9050251.html