async getdata () {
const _self = this
await _self.getSwieprList()
//當(dāng)一個await執(zhí)行完成后才會繼續(xù)執(zhí)行下一個
await _self.getNoticeList()...
}
getList() {
const _self = this
return new Promise((s,r)=>{
_self.$Api.dajax('api/swiper' , ' ' , 'get' , res =>{
_self.swiperList = res.data
s()
})
})
}