text上加bindtap,安卓点击text没反应,苹果没有这个问题

发布于 6 年前作者 panxiulan2051 次浏览最后编辑 6 年前来自 ask

如题:

xml:

<text bindtap=‘getVerificationCode’ style=‘position:absolute;right:70rpx;color: {{timeColor}};font-size:30rpx;’>{{time}}</text>

js:

getVerificationCode: function() {

var that = this

if (that.data.sendCodeNewrequst.mobileAccount.length != ‘11’ || that.data.timeColor == ‘#999999’) {

return;

}

that.getcode();

},

安卓根本就不执行getVerificationCode()方法,之前是好的,突然就点击没用了

3 回复
qiang94
qiang941 楼6 年前

哈哈,不告诉你

laixia
laixia2 楼6 年前

你好,试了下,安卓的text绑定bintap事件是没有问题的,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

fangxiulan
fangxiulan3 楼5 年前

换成view试下