Commit 4669e85c authored by 罗超's avatar 罗超

no message

parent 93929c38
...@@ -79,6 +79,8 @@ const addnewuserUrl = process.env.NODE_ENV === 'development' ? `http://localhost ...@@ -79,6 +79,8 @@ const addnewuserUrl = process.env.NODE_ENV === 'development' ? `http://localhost
const appXmlPath = process.execPath.substring(0, process.execPath.lastIndexOf('\\') + 1) + 'app.json' const appXmlPath = process.execPath.substring(0, process.execPath.lastIndexOf('\\') + 1) + 'app.json'
const forwardUrl = process.env.NODE_ENV === 'development' ? `http://localhost:9080/#/forwardMsg` : `file://${__dirname}/index.html#/forwardMsg` const forwardUrl = process.env.NODE_ENV === 'development' ? `http://localhost:9080/#/forwardMsg` : `file://${__dirname}/index.html#/forwardMsg`
if (process.env.NODE_ENV !== 'development') { if (process.env.NODE_ENV !== 'development') {
global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\') global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')
...@@ -290,8 +292,8 @@ app.on('activate', () => { ...@@ -290,8 +292,8 @@ app.on('activate', () => {
createWindow() createWindow()
} }
}) })
ipc.on('reconnect',function(event){ ipc.on('reconnect', function(event) {
nim=null nim = null
initNIM(global.LOGINUSER.ImAccount, global.LOGINUSER.ImToken) initNIM(global.LOGINUSER.ImAccount, global.LOGINUSER.ImToken)
}) })
ipc.on('loginSuccess', function(event, userInfo) { ipc.on('loginSuccess', function(event, userInfo) {
...@@ -697,6 +699,7 @@ ipc.on('send-file', function(event, obj) { ...@@ -697,6 +699,7 @@ ipc.on('send-file', function(event, obj) {
custom: JSON.stringify(customMsg), custom: JSON.stringify(customMsg),
uploadprogress: function(data) { uploadprogress: function(data) {
file.progess = data.percentage file.progess = data.percentage
console.log(file)
event.sender.send('sending-process', file) event.sender.send('sending-process', file)
}, },
uploaderror: function() { uploaderror: function() {
...@@ -936,7 +939,8 @@ let getNoticeWindows = function() { ...@@ -936,7 +939,8 @@ let getNoticeWindows = function() {
width: 300, width: 300,
height: 115, height: 115,
skipTaskbar: true, skipTaskbar: true,
alwaysOnTop: true alwaysOnTop: false,
focusable: false
}) })
noticeWindows.setBounds({ noticeWindows.setBounds({
y: electron.screen.getPrimaryDisplay().workAreaSize.height - 115, y: electron.screen.getPrimaryDisplay().workAreaSize.height - 115,
...@@ -1099,7 +1103,6 @@ let initNIM = function(uid, token) { ...@@ -1099,7 +1103,6 @@ let initNIM = function(uid, token) {
function onDisconnect(error) { function onDisconnect(error) {
// 此时说明 SDK 处于断开状态, 开发者此时应该根据错误码提示相应的错误信息, 并且跳转到登录页面 // 此时说明 SDK 处于断开状态, 开发者此时应该根据错误码提示相应的错误信息, 并且跳转到登录页面
if (error) { if (error) {
switch (error.code) { switch (error.code) {
// 账号或者密码错误, 请跳转到登录页面并提示错误 // 账号或者密码错误, 请跳转到登录页面并提示错误
...@@ -1115,6 +1118,7 @@ let initNIM = function(uid, token) { ...@@ -1115,6 +1118,7 @@ let initNIM = function(uid, token) {
break; break;
} }
} }
console.log('异常了');
} }
function onError(error) { function onError(error) {
......
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
export default { export default {
name: "MageOffice", name: "MageOffice",
mounted() { mounted() {
window.alert = function() {
return false;
}
document.querySelector('#app').addEventListener( document.querySelector('#app').addEventListener(
"dragover", "dragover",
function(e) { function(e) {
......
...@@ -195,7 +195,6 @@ export default { ...@@ -195,7 +195,6 @@ export default {
}, 8*1000); }, 8*1000);
}, },
atMsg(){ atMsg(){
console.log(11111111111111)
this.MsgBus.$emit('send-at-name', this.atInfo.atName) this.MsgBus.$emit('send-at-name', this.atInfo.atName)
}, },
showCard(e){ showCard(e){
......
...@@ -85,6 +85,7 @@ export default { ...@@ -85,6 +85,7 @@ export default {
}); });
this.$electron.ipcRenderer.on("sending-process", (event, file) => { this.$electron.ipcRenderer.on("sending-process", (event, file) => {
console.log(file)
this.GLOBALSENDING.forEach(x => { this.GLOBALSENDING.forEach(x => {
if ((x.msgId = file.msgId)) { if ((x.msgId = file.msgId)) {
x = file; x = file;
......
...@@ -590,7 +590,9 @@ export default { ...@@ -590,7 +590,9 @@ export default {
lastMsg.type === "notification" && lastMsg.type === "notification" &&
lastMsg.attach && lastMsg.attach &&
lastMsg.attach.team && lastMsg.attach.team &&
lastMsg.attach.team.custom lastMsg.attach.team.custom &&
this.$store.state.msgs[item.id] &&
this.$store.state.msgs[item.id].length>0
) { ) {
for (let i = this.$store.state.msgs[item.id].length-1; i >= 0; i--) { for (let i = this.$store.state.msgs[item.id].length-1; i >= 0; i--) {
lastMsg=this.$store.state.msgs[item.id][i] lastMsg=this.$store.state.msgs[item.id][i]
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
import store from '../' import store from '../'
// 如果会话对象不是好友,需要更新好友名片 // 如果会话对象不是好友,需要更新好友名片
function updateSessionAccount (sessions) { function updateSessionAccount(sessions) {
let accountsNeedSearch = [] let accountsNeedSearch = []
sessions.forEach(item => { sessions.forEach(item => {
if (item.scene === 'p2p') { if (item.scene === 'p2p') {
...@@ -23,18 +23,18 @@ function updateSessionAccount (sessions) { ...@@ -23,18 +23,18 @@ function updateSessionAccount (sessions) {
} }
// onSessions只在初始化完成后回调 // onSessions只在初始化完成后回调
export function onSessions (sessions) { export function onSessions(sessions) {
updateSessionAccount(sessions) updateSessionAccount(sessions)
store.commit('updateSessions', sessions) store.commit('updateSessions', sessions)
} }
export function onUpdateSession (session) { export function onUpdateSession(session) {
let sessions = [session] let sessions = [session]
updateSessionAccount(sessions) updateSessionAccount(sessions)
store.commit('updateSessions', sessions) store.commit('updateSessions', sessions)
} }
export function deleteSession ({state, commit}, sessionId) { export function deleteSession({ state, commit }, sessionId) {
const nim = state.nim const nim = state.nim
sessionId = sessionId || '' sessionId = sessionId || ''
let scene = null let scene = null
...@@ -50,7 +50,7 @@ export function deleteSession ({state, commit}, sessionId) { ...@@ -50,7 +50,7 @@ export function deleteSession ({state, commit}, sessionId) {
nim.deleteSession({ nim.deleteSession({
scene, scene,
to: account, to: account,
done: function deleteServerSessionDone (error, obj) { done: function deleteServerSessionDone(error, obj) {
if (error) { if (error) {
//alert(error) //alert(error)
...@@ -58,7 +58,7 @@ export function deleteSession ({state, commit}, sessionId) { ...@@ -58,7 +58,7 @@ export function deleteSession ({state, commit}, sessionId) {
} }
nim.deleteLocalSession({ nim.deleteLocalSession({
id: sessionId, id: sessionId,
done: function deleteLocalSessionDone (error, obj) { done: function deleteLocalSessionDone(error, obj) {
if (error) { if (error) {
//alert(error) //alert(error)
return return
...@@ -71,7 +71,7 @@ export function deleteSession ({state, commit}, sessionId) { ...@@ -71,7 +71,7 @@ export function deleteSession ({state, commit}, sessionId) {
} }
} }
export function setCurrSession ({state, commit, dispatch}, sessionId) { export function setCurrSession({ state, commit, dispatch }, sessionId) {
const nim = state.nim const nim = state.nim
if (sessionId) { if (sessionId) {
commit('updateCurrSessionId', { commit('updateCurrSessionId', {
...@@ -91,7 +91,7 @@ export function setCurrSession ({state, commit, dispatch}, sessionId) { ...@@ -91,7 +91,7 @@ export function setCurrSession ({state, commit, dispatch}, sessionId) {
} }
} }
export function resetCurrSession ({state, commit}) { export function resetCurrSession({ state, commit }) {
const nim = state.nim const nim = state.nim
nim.resetCurrSession() nim.resetCurrSession()
commit('updateCurrSessionMsgs', { commit('updateCurrSessionMsgs', {
......
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