|
[BUG]
UIChatBox 点表情按钮即导致APP崩掉
[复制链接]
上午打的包还好好的,下午重新打包就出这个问题了
function openChat() {
var sourcePath = "widget://image/emotion";//表情存放目录
var emotionData;//存储表情
var obj = api.require('UIChatBox');
UIChatBox = obj;
obj.open({
placeholder: '',
maxRows: 4,
emotionPath: sourcePath,
styles: {
inputBar: {
borderColor: '#d9d9d9',
bgColor: '#f2f2f2'
},
inputBox: {
borderColor: '#B3B3B3',
bgColor: '#FFFFFF'
},
emotionBtn: {
normalImg: 'widget://image/chatBox/face1.png'
},
keyboardBtn: {
normalImg: 'widget://image/chatBox/key1.png'
}
}
},function(ret,err){
alert($api.jsonToStr(ret));
//点击附加功能面板
if(ret.eventType == 'clickExtras'){
alert("用户点击了第"+ ret.index +"个按钮");
}
//点击发送按钮
if(ret.eventType == 'send'){
if(ret.msg==''){
api.toast({
msg:'请输入内容.',
location:'top'
});
return;
}
}
});
}
apiready = function(){
openChat();
};
|
|