async在事件函数中的问题
async在input输入第二次的时候直接打印出 [object Promise] 55,这该怎么解决
<input type= "number" placeholder-class= "gd1" bindinput= "inputverifycode" class= "f17" placeholder= "输入验证码" value= "{{code}}" /> |
inputverifycode:async function (e){ console.log(e.detail.value,55) var that = this ; this .setData({ verifycode: e.detail.value }) if (e.detail.value.length == 6) { var data = { "code" : e.detail.value, "phone" : this .data.phone } //app.outTime(that); const result = await request({url: 'phonecode/validateCode' , data, method: 'POST' }) console.log(result,43); } }, |