登录成功后,刷新会话列表
This commit is contained in:
3
main.js
3
main.js
@@ -40,11 +40,12 @@ usqlite.connect({
|
||||
fail: () => {
|
||||
contactModel.create((err, res) => {
|
||||
console.error('SQLITE 创建表格', err, res)
|
||||
uni.setStorageSync('FIRST_RUN', 'X')
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
App.mpType = 'app'
|
||||
const app = new Vue({
|
||||
store,
|
||||
|
||||
@@ -22,7 +22,9 @@ const initIm = (KEY) => {
|
||||
if (store.getters.getToken !== '') {
|
||||
getImToken().then(res => {
|
||||
connect(res.token, res.userInfo, (res) => {
|
||||
console.log('IM.CONNECT', res);
|
||||
console.log('IM.CONNECT', res);
|
||||
// 发布全局事件,有新消息,刷新会话列表
|
||||
uni.$emit('onReceiveMessage')
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user