Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wechat_lung
Project
Overview
Details
Activity
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
hanpeng
wechat_lung
Commits
552ba942
Commit
552ba942
authored
Dec 02, 2019
by
zujiaozhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'修改聊天功能医生助手发送图片与链接展示'
parent
25829ed3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
3 deletions
+63
-3
freeChat.js
wechat_lung_chat/javaScript/freeChat.js
+59
-3
imgConsultChat.js
wechat_lung_chat/javaScript/imgConsultChat.js
+4
-0
No files found.
wechat_lung_chat/javaScript/freeChat.js
View file @
552ba942
...
...
@@ -3,6 +3,7 @@ define([ 'zepto', 'medtap','mui'], function($, medtap,mui) {
doctorId
:
medtap
.
getRequest
(
'doctorId'
),
relationId
:
''
,
userId
:
''
,
helperId
:
''
,
doctorName
:
''
,
doctorProfile
:
''
,
helperName
:
''
,
...
...
@@ -198,6 +199,7 @@ define([ 'zepto', 'medtap','mui'], function($, medtap,mui) {
chat
.
userName
=
res
.
content
.
talkRealtion
.
username
;
chat
.
userProfile
=
res
.
content
.
talkRealtion
.
userProfile
;
chat
.
helperName
=
res
.
content
.
talkRealtion
.
helperName
;
chat
.
helperId
=
res
.
content
.
talkRealtion
.
helperId
;
chat
.
helperProfile
=
res
.
content
.
talkRealtion
.
helperProfile
;
$
(
'.doctor_profile'
).
attr
(
'src'
,
chat
.
doctorProfile
);
$
(
'.doctor_name'
).
html
(
chat
.
doctorName
);
...
...
@@ -270,7 +272,7 @@ define([ 'zepto', 'medtap','mui'], function($, medtap,mui) {
});
});
},
//
// 点击图片信息预览图片
// 点击图片信息预览图片
previewImg
:
function
()
{
$
(
'.chat_list'
).
on
(
'click'
,
'.chat_nopadding img'
,
function
(
e
)
{
console
.
log
(
e
);
...
...
@@ -429,12 +431,16 @@ define([ 'zepto', 'medtap','mui'], function($, medtap,mui) {
'<p class="chat_from_name">'
+
chat
.
helperName
+
'</p>'
+
'<div class="chat_message chat_message_from">'
+
'<div class="chat_message chat_message_from
chat_message_helper
">'
+
chat
.
record
[
i
].
content
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
;
if
(
chat
.
record
[
i
].
content
.
includes
(
'http'
)){
var
html1
=
'<a href="'
+
chat
.
record
[
i
].
content
+
'">'
+
chat
.
record
[
i
].
content
+
'</a>'
$
(
'.chat_list .chat_message_helper'
).
html
(
html1
)
}
}
}
else
if
(
type
==
10
)
{
var
content
=
JSON
.
parse
(
chat
.
record
[
i
].
content
);
...
...
@@ -527,6 +533,29 @@ define([ 'zepto', 'medtap','mui'], function($, medtap,mui) {
'</div>'
+
'</div>'
+
'</div>'
;
}
else
if
(
chat
.
record
[
i
].
senderId
==
chat
.
helperId
){
html
+=
'<div class="chat_item chat_item_left">'
+
'<p class="message_time">'
+
chat
.
record
[
i
].
createTime
.
substring
(
5
,
16
)
+
'</p>'
+
'<div class="chat_info_warp clearfix">'
+
'<img src="'
+
chat
.
helperProfile
+
'" class="chat_profile from_profile">'
+
'<div class="chat_message_warp">'
+
'<p class="chat_from_name">'
+
chat
.
helperName
+
'</p>'
+
'<div class="chat_message chat_message_from chat_nopadding">'
+
// 图片消息
'<img src="'
+
chat
.
record
[
i
].
contentPic
[
0
]
+
'" />'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
;
}
}
}
...
...
@@ -664,12 +693,16 @@ define([ 'zepto', 'medtap','mui'], function($, medtap,mui) {
'<p class="chat_from_name">'
+
chat
.
helperName
+
'</p>'
+
'<div class="chat_message chat_message_from">'
+
'<div class="chat_message chat_message_from
chat_message_helper
">'
+
record
[
i
].
content
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
;
if
(
record
[
i
].
content
.
includes
(
'http'
)){
var
html1
=
'<a href="'
+
record
[
i
].
content
+
'">'
+
record
[
i
].
content
+
'</a>'
$
(
'.chat_list .chat_message_helper'
).
html
(
html1
)
}
}
}
else
if
(
type
==
10
)
{
var
content
=
JSON
.
parse
(
chat
.
record
[
i
].
content
);
...
...
@@ -762,6 +795,29 @@ define([ 'zepto', 'medtap','mui'], function($, medtap,mui) {
'</div>'
+
'</div>'
+
'</div>'
;
}
else
if
(
record
[
i
].
senderId
==
chat
.
helperId
){
html
+=
'<div class="chat_item chat_item_left">'
+
'<p class="message_time">'
+
record
[
i
].
createTime
.
substring
(
5
,
16
)
+
'</p>'
+
'<div class="chat_info_warp clearfix">'
+
'<img src="'
+
chat
.
helperProfile
+
'" class="chat_profile from_profile">'
+
'<div class="chat_message_warp">'
+
/* '<p class="chat_from_name">' +
chat.doctorName +
'医生</p>' + */
'<div class="chat_message chat_message_from chat_nopadding">'
+
// 图片消息
'<img src="'
+
record
[
i
].
contentPic
[
0
]
+
'" />'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
;
}
}
}
...
...
wechat_lung_chat/javaScript/imgConsultChat.js
View file @
552ba942
...
...
@@ -6,6 +6,7 @@ define([ 'zepto', 'medtap' ], function($, medtap) {
doctorName
:
''
,
doctorProfile
:
''
,
helperName
:
''
,
helperId
:
''
,
helperProfile
:
''
,
userName
:
''
,
userProfile
:
''
,
...
...
@@ -323,6 +324,9 @@ define([ 'zepto', 'medtap' ], function($, medtap) {
chat
.
doctorProfile
=
res
.
content
.
talkRealtion
.
doctorProfile
;
chat
.
userName
=
res
.
content
.
talkRealtion
.
username
;
chat
.
userProfile
=
res
.
content
.
talkRealtion
.
userProfile
;
chat
.
helperName
=
res
.
content
.
talkRealtion
.
helperName
;
chat
.
helperId
=
es
.
content
.
talkRealtion
.
helperId
;
chat
.
helperProfile
=
res
.
content
.
talkRealtion
.
helperProfile
;
$
(
'.doctor_profile'
).
attr
(
'src'
,
chat
.
doctorProfile
);
$
(
'.doctor_name'
).
html
(
chat
.
doctorName
);
$
(
'.doctor_title'
).
html
(
res
.
content
.
talkRealtion
.
technologyProfessional
.
value
);
...
...
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