Commit 0d9bfe5b authored by 罗超's avatar 罗超

no message

parent 4800d9fb
...@@ -17,3 +17,4 @@ dist/ ...@@ -17,3 +17,4 @@ dist/
package/ package/
build/ build/
node_modules.rar node_modules.rar
node_modules.zip
...@@ -4,28 +4,28 @@ import cookie from '../../utils/cookie' ...@@ -4,28 +4,28 @@ import cookie from '../../utils/cookie'
import pageUtil from '../../utils/page' import pageUtil from '../../utils/page'
/* 导出actions方法 */ /* 导出actions方法 */
import {showLoading, hideLoading, showFullscreenImg, hideFullscreenImg} from './widgetUi' import { showLoading, hideLoading, showFullscreenImg, hideFullscreenImg } from './widgetUi'
import {initNimSDK} from './initNimSDK' import { initNimSDK } from './initNimSDK'
import {initChatroomSDK, resetChatroomSDK} from './initChatroomSDK' import { initChatroomSDK, resetChatroomSDK } from './initChatroomSDK'
import {updateBlack} from './blacks' import { updateBlack } from './blacks'
import {updateFriend, addFriend, deleteFriend} from './friends' import { updateFriend, addFriend, deleteFriend } from './friends'
import {resetSearchResult, searchUsers, searchTeam} from './search' import { resetSearchResult, searchUsers, searchTeam } from './search'
import {deleteSession, setCurrSession, resetCurrSession} from './session' import { deleteSession, setCurrSession, resetCurrSession } from './session'
import {sendMsg, sendTip,markInMutelist, sendFileMsg,sendDataUrlMsg,sendDataUrlMsgCall, sendMsgReceipt, sendRobotMsg, revocateMsg, updateLocalMsg, getHistoryMsgs, resetNoMoreHistoryMsgs, continueRobotMsg} from './msgs' import { sendMsg, sendTip, forwardMsg, markInMutelist, sendFileMsg, sendDataUrlMsg, sendDataUrlMsgCall, sendMsgReceipt, sendRobotMsg, revocateMsg, updateLocalMsg, getHistoryMsgs, resetNoMoreHistoryMsgs, continueRobotMsg } from './msgs'
import {markSysMsgRead, resetSysMsgs, deleteSysMsgs, markCustomSysMsgRead} from './sysMsgs' import { markSysMsgRead, resetSysMsgs, deleteSysMsgs, markCustomSysMsgRead } from './sysMsgs'
import {sendChatroomMsg, sendChatroomRobotMsg, sendChatroomFileMsg, getChatroomHistoryMsgs} from './chatroomMsgs' import { sendChatroomMsg, sendChatroomRobotMsg, sendChatroomFileMsg, getChatroomHistoryMsgs } from './chatroomMsgs'
import {initChatroomInfos, getChatroomInfo, getChatroomMembers, clearChatroomMembers} from './chatroomInfos' import { initChatroomInfos, getChatroomInfo, getChatroomMembers, clearChatroomMembers } from './chatroomInfos'
import { delegateTeamFunction, getNotifyForNewTeamMsg,onTeamNotificationMsg, enterSettingPage, getTeamMembers, checkTeamMsgReceipt, getTeamMsgReads} from './team' import { delegateTeamFunction, getNotifyForNewTeamMsg, onTeamNotificationMsg, enterSettingPage, getTeamMembers, checkTeamMsgReceipt, getTeamMsgReads } from './team'
function connectNim ({state, commit, dispatch}, obj) { function connectNim({ state, commit, dispatch }, obj) {
let {force} = Object.assign({}, obj) let { force } = Object.assign({}, obj)
// 操作为内容页刷新页面,此时无nim实例 // 操作为内容页刷新页面,此时无nim实例
// //
if (!state.nim || force) { if (!state.nim || force) {
let loginuser= require('electron').remote.getGlobal("LOGINUSER"); let loginuser = require('electron').remote.getGlobal("LOGINUSER");
let loginInfo = { let loginInfo = {
uid: loginuser.ImAccount, uid: loginuser.ImAccount,
sdktoken:loginuser.ImToken, sdktoken: loginuser.ImToken,
} }
if (!loginInfo.uid) { if (!loginInfo.uid) {
// 无cookie,直接跳转登录页 // 无cookie,直接跳转登录页
...@@ -37,14 +37,14 @@ function connectNim ({state, commit, dispatch}, obj) { ...@@ -37,14 +37,14 @@ function connectNim ({state, commit, dispatch}, obj) {
} }
} }
function connectChatroom ({state, commit, dispatch}, obj) { function connectChatroom({ state, commit, dispatch }, obj) {
let {chatroomId} = Object.assign({}, obj) let { chatroomId } = Object.assign({}, obj)
const nim = state.nim const nim = state.nim
if (nim) { if (nim) {
dispatch('showLoading') dispatch('showLoading')
nim.getChatroomAddress({ nim.getChatroomAddress({
chatroomId, chatroomId,
done: function getChatroomAddressDone (error, obj) { done: function getChatroomAddressDone(error, obj) {
if (error) { if (error) {
//alert(error.message) //alert(error.message)
//location.href = '#/room' //location.href = '#/room'
...@@ -57,7 +57,7 @@ function connectChatroom ({state, commit, dispatch}, obj) { ...@@ -57,7 +57,7 @@ function connectChatroom ({state, commit, dispatch}, obj) {
} }
export default { export default {
updateRefreshState ({commit}) { updateRefreshState({ commit }) {
commit('updateRefreshState') commit('updateRefreshState')
}, },
...@@ -69,8 +69,8 @@ export default { ...@@ -69,8 +69,8 @@ export default {
continueRobotMsg, continueRobotMsg,
// 连接sdk请求,false表示强制重连 // 连接sdk请求,false表示强制重连
connect (store, obj) { connect(store, obj) {
let {type} = Object.assign({}, obj) let { type } = Object.assign({}, obj)
// type 可为 nim chatroom // type 可为 nim chatroom
type = type || 'nim' type = type || 'nim'
switch (type) { switch (type) {
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
}, },
// 用户触发的登出逻辑 // 用户触发的登出逻辑
logout ({ state, commit }) { logout({ state, commit }) {
cookie.delCookie('uid') cookie.delCookie('uid')
cookie.delCookie('sdktoken') cookie.delCookie('sdktoken')
if (state.nim) { if (state.nim) {
...@@ -113,6 +113,7 @@ export default { ...@@ -113,6 +113,7 @@ export default {
resetCurrSession, resetCurrSession,
// 发送消息 // 发送消息
sendMsg, sendMsg,
forwardMsg,
sendTip, sendTip,
sendFileMsg, sendFileMsg,
sendDataUrlMsg, sendDataUrlMsg,
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment