1.1.0 • Published 4 years ago
im_plugin v1.1.0
调用方法
1400183358:1400205071
window.txim.login({
role: 'member',//可传'member','teacher','kefu'默认member
token: 't4L35Olq7Idf0kLkKdyGfuXvKH2mhJxQ'//(必传)
}).then(res => {
if(res.status === 1){
//务必在成功登录后再调用打开,否则会打开失败
window.txim.open(options)
}else{
//若登录失败则自行调整业务逻辑
console.log(res.msg)
}
})
window.txim.open(options)传参
options = { hideChat: '', hideList: '', hideMy: '', width: '', height: '', theme: '', limitedInChat: '', getUnreadMessage: '' }
Vue调用
npm install im_plugin --save import txim from 'im_plugin' import 'im_plugin/lib/index.css'