async checkmsg(){
await app.promiseRequest('/api/wxapp/checkmsg',{content:"*****"}).then(res=>{
if(res.errcode !== 0){
console.log('1');
app.info('对不起,你提交的内容含有非法字符!');
return;
}
})
console.log('2');
},
使用同步方式去请求一个异步函数接口,每次运行到if条件中去,不能return跳出函数;还是能把后面的2打印出来?