Promise 方法

functionB(){

this.functionA()

}

functionA(){

return new Promise((resolve, reject) => {
this.$http({
url:XXXX,
type:'get',
data:{

}
}).then(res=>{

resolve();
}).catch(err=>{
})
})

}

posted @ 2020-05-19 13:20  就想来看看  阅读(147)  评论(1编辑  收藏  举报