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
}
const result = await request({url:'phonecode/validateCode', data, method:'POST'})
console.log(result,43);
}
},
|
用then 解决了
同遇到这个问题,楼主解决了吗?
单独输出input会这样吗?