Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Madara
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
Madara
Commits
340b946e
Commit
340b946e
authored
Sep 27, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
聊天窗口重复打开
parent
07c00112
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
8 deletions
+30
-8
chatitem.vue
src/renderer/components/msssage/chatitem.vue
+6
-1
index.vue
src/renderer/components/msssage/index.vue
+9
-0
newMsgPop.vue
src/renderer/components/msssage/newMsgPop.vue
+10
-2
netError.vue
src/renderer/components/system/netError.vue
+1
-1
contenteditor.vue
src/renderer/components/tools/contenteditor.vue
+1
-1
initNimSDK.js
src/store/actions/initNimSDK.js
+2
-2
index.js
src/store/mutations/index.js
+1
-1
No files found.
src/renderer/components/msssage/chatitem.vue
View file @
340b946e
...
...
@@ -328,9 +328,14 @@ export default {
.
querySelector
(
".msg-text"
).
innerText
;
this
.
$electron
.
ipcRenderer
.
send
(
"setClipboard"
,
text
,
1
);
}
else
if
(
this
.
msg
.
type
==
"image"
)
{
let
url
=
this
.
msg
.
file
.
url
;
if
(
url
.
indexOf
(
'nim.nosdn.127.net'
)
!==
-
1
)
{
url
=
url
.
replace
(
'nim.nosdn.127.net'
,
'nim-nosdn.netease.im'
)
//url += `?createTime=&`
}
this
.
$electron
.
ipcRenderer
.
send
(
"getNetworkImage"
,
this
.
msg
.
file
.
url
.
replace
(
"https://"
,
"http://"
)
url
.
replace
(
"https://"
,
"http://"
)
);
}
},
...
...
src/renderer/components/msssage/index.vue
View file @
340b946e
...
...
@@ -426,12 +426,21 @@ export default {
return
isplay
;
},
createSession
(
obj
){
console
.
log
(
'obj.id'
,
obj
.
id
)
console
.
log
(
'this.createSessions'
,
this
.
createSessions
)
let
h
=
null
this
.
sessionlist
.
forEach
(
x
=>
{
if
(
x
.
id
==
obj
.
id
){
h
=
x
}
})
if
(
!
h
)
{
this
.
createSessions
.
forEach
(
x
=>
{
if
(
x
.
id
==
obj
.
id
){
h
=
x
}
})
}
if
(
h
)
{
this
.
enterChat
(
h
)
}
else
{
...
...
src/renderer/components/msssage/newMsgPop.vue
View file @
340b946e
...
...
@@ -38,12 +38,20 @@ export default {
},
mounted
:
function
()
{
this
.
userInfo
=
this
.
$electron
.
remote
.
getGlobal
(
"LOGINUSER"
);
this
.
se
ssionlist
=
this
.
$electron
.
remote
.
getGlobal
(
"NEWMESSAGE"
);
this
.
se
tSessionlist
(
);
setInterval
(()
=>
{
this
.
se
ssionlist
=
this
.
$electron
.
remote
.
getGlobal
(
"NEWMESSAGE"
);
this
.
se
tSessionlist
(
);
},
2000
);
},
methods
:
{
setSessionlist
(){
let
sessionlist
=
this
.
$electron
.
remote
.
getGlobal
(
"NEWMESSAGE"
);
let
list
=
[];
for
(
let
i
=
0
;
i
<
4
;
i
++
)
{
list
.
push
(
sessionlist
[
i
])
}
this
.
sessionlist
=
list
},
openMsg
(
session
)
{
var
sessions
=
new
Array
();
sessions
.
push
(
session
);
...
...
src/renderer/components/system/netError.vue
View file @
340b946e
...
...
@@ -22,7 +22,7 @@ export default {
methods
:
{
reconnect
()
{
this
.
resetCount
++
;
this
.
$store
.
dispatch
(
"connect"
);
//
this.$store.dispatch("connect");
this
.
splitTime
=
10
;
clearInterval
(
this
.
splitTimer
);
this
.
splitTimer
=
null
;
...
...
src/renderer/components/tools/contenteditor.vue
View file @
340b946e
...
...
@@ -284,7 +284,7 @@ export default {
});
},
createImage(dataurl){
console.log('图片来了!!!!!!!!!!!')
console.log('图片来了!!!!!!!!!!!'
, dataurl
)
var strLen = dataurl.length;
var size = strLen-(strLen/8)*2;
let f = {
...
...
src/store/actions/initNimSDK.js
View file @
340b946e
...
...
@@ -18,7 +18,7 @@ import { onTeams, onSynCreateTeam, onCreateTeam, onUpdateTeam, onTeamMembers, on
const
SDK
=
require
(
'../../sdk/NIM_Web_SDK_v6.1.0'
)
// 重新初始化 NIM SDK
export
function
initNimSDK
({
state
,
commit
,
dispatch
},
loginInfo
)
{
export
function
initNimSDK
({
state
,
commit
,
dispatch
},
loginInfo
)
{
if
(
state
.
nim
)
{
state
.
nim
.
disconnect
()
}
...
...
@@ -48,7 +48,7 @@ export function initNimSDK ({ state, commit, dispatch }, loginInfo) {
commit
(
'updateNetError'
,
true
)
console
.
log
(
'断网了'
)
},
onwillreconnect
:
function
onWillReconnect
()
{
onwillreconnect
:
function
onWillReconnect
()
{
commit
(
'updateNetError'
,
true
)
},
ondisconnect
:
function
onDisconnect
(
error
)
{
...
...
src/store/mutations/index.js
View file @
340b946e
...
...
@@ -137,7 +137,7 @@ export default {
state
.
mutelist
=
nim
.
mergeRelations
(
state
.
mutelist
,
mutelist
)
state
.
mutelist
=
nim
.
cutRelations
(
state
.
mutelist
,
mutelist
.
invalid
)
},
updateNetError
(
state
,
status
)
{
updateNetError
(
state
,
status
)
{
state
.
isNetError
=
status
},
// 初始化,收到离线漫游消息时调用
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment