import { async, resolve, reject } from 'q'
aaa(){
try{
let res = await this.bbb()
console.log(res)
jiekoua({
p:1
}).then(res => {
console.log(res)
}).catch(err => {
console.log(err)
})
} catch (err) {
console.log(err)
}
bbb() {
return new Promise((resolve, reject) => {
jiekoub({
q:1
}).then(res => {
console.log(res)
resolve(res)
}).catch(err => {
console.log(err)
reject(err)
})
}
})
}
bbb()得到响应后再执行aaa()