实现promise的另一种方式,ajax 顺序请求
1 let url = './#/task/list/datapick' 2 this.$http.get(url) 3 .then(response => { 4 console.log(response) 5 return this.$http.get('./#/task/type') 6 }) 7 .then(response =>{ 8 console.log(response) 9 return this.$http.get('url2',{params:params}) 10 }) 11 .then(response =>{ 12 console.log(response) 13 return this.$http.get('url3',{params:params}) 14 }) 15 .catch(response => { 16 console.log(response); 17 });

浙公网安备 33010602011771号