|
inputField 输入文字 闪退问题
[复制链接]
之前好好的代码也没动,今天一测试,凡是用到inputField 的地方都闪退
安卓,云编译自定义aapploader
小米,三星都有问题
代码:
//二级评论,只评论文字
two_comment:function (cid_, rid_) {
var inputField = api.require('inputField');
inputField.open({
bgColor: '#ffffff',
lineColor: '#757575',
fileBgColor: '#fff',
borderColor: '#757575',
sendImg: 'widget://image/sendcomment.png',
fixedOn: api.frameName,
limitedWordsNumber: 60,
placeholder: '回复',
autoFocus: true,
}, function(ret, err) {
alert(222);
if (ret) {
if (ret.msg) {
alert(111);
//提交二级评论
api.ajax({
url: second_reply,
method: 'post',
timeout: 30,
dataType: 'json',
returnAll: false,
data: {
//以表单方式提交参数,JSON对象{"field1": "value1"}
values: {
comment_id: cid_,
user_id: $api.getStorage('uid'),
second_id: vm.second_id,
reply_id: rid_,
reply_content: ret.msg,
},
}
}, function (ret, err) {
if (ret) {
vm.init();
}
});
//关闭弹窗
inputField.close();
}
} else {
inputField.close();
}
});
//延迟1秒 监听输入框下边缘距离屏幕底边的高度
//根据高度判断是否要关闭
setTimeout(function () {
inputField.setInputFieldListener(function (ret, err) {
if (ret.chatViewH < 200) {
inputField.close();
}
});
}, 1000);
},
|
|