Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsales
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7aca6baa
authored
Oct 15, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
ic聊天样式修改
parent
b013c7bf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
20 deletions
Application/Home/View/Chat/index.html
dist/css/chat.css
dist/css/chat.less
dist/js/chat/index.js
dist/js/global/global.min.js
Application/Home/View/Chat/index.html
View file @
7aca6baa
...
@@ -65,7 +65,8 @@
...
@@ -65,7 +65,8 @@
accept=
"image/gif, image/jpeg,image/jpg, image/png,image/bmp"
>
accept=
"image/gif, image/jpeg,image/jpg, image/png,image/bmp"
>
</div>
</div>
<div
class=
"edit_input"
>
<div
class=
"edit_input"
>
<textarea
id=
"chat_textarea"
class=
"chat_textarea"
></textarea>
<textarea
id=
"chat_textarea"
class=
"chat_textarea"
placeholder=
"在此输入发送的信息"
></textarea>
<div
class=
"send_btn btn_blue btn"
>
发送
</div>
</div>
</div>
</div>
</div>
...
...
dist/css/chat.css
View file @
7aca6baa
...
@@ -147,13 +147,32 @@
...
@@ -147,13 +147,32 @@
}
}
.chat_content
.content
.content_div
.notice_right
.edit_content
.edit_input
{
.chat_content
.content
.content_div
.notice_right
.edit_content
.edit_input
{
height
:
100px
;
height
:
100px
;
padding
:
10px
;
padding
:
15px
;
background
:
#F5F9FC
;
border
:
1px
solid
#E6ECF2
;
border-top
:
none
;
position
:
relative
;
}
}
.chat_content
.content
.content_div
.notice_right
.edit_content
.edit_input
.chat_textarea
{
.chat_content
.content
.content_div
.notice_right
.edit_content
.edit_input
.chat_textarea
{
height
:
100%
;
height
:
100%
;
width
:
100%
;
width
:
100%
;
line-height
:
20px
;
line-height
:
20px
;
resize
:
none
;
resize
:
none
;
background
:
#F5F9FC
;
font-size
:
14px
;
color
:
#515559
;
}
.chat_content
.content
.content_div
.notice_right
.edit_content
.edit_input
.send_btn
{
font-size
:
16px
;
color
:
#fff
;
border-radius
:
3px
;
height
:
30px
;
width
:
80px
;
line-height
:
30px
;
position
:
absolute
;
bottom
:
15px
;
right
:
15px
;
margin
:
0
;
}
}
.chat_content
.content
.content_div
.notice_right
.title
{
.chat_content
.content
.content_div
.notice_right
.title
{
border-bottom
:
2px
solid
#E6ECF2
;
border-bottom
:
2px
solid
#E6ECF2
;
...
@@ -288,4 +307,3 @@
...
@@ -288,4 +307,3 @@
.chat_content
.content
.content_div
.notice_right
.notice_list
.notice_item
.notice_content
.template
.template_right
.template_right_bottom
div
i
{
.chat_content
.content
.content_div
.notice_right
.notice_list
.notice_item
.notice_content
.template
.template_right
.template_right_bottom
div
i
{
color
:
#515559
;
color
:
#515559
;
}
}
/*# sourceMappingURL=chat.css.map */
\ No newline at end of file
dist/css/chat.less
View file @
7aca6baa
...
@@ -179,13 +179,31 @@
...
@@ -179,13 +179,31 @@
.edit_input {
.edit_input {
height: 100px;
height: 100px;
padding: 10px;
padding:15px;
background: #F5F9FC;
border:1px solid #E6ECF2;
border-top: none;
position: relative;
.chat_textarea {
.chat_textarea {
height: 100%;
height: 100%;
width: 100%;
width: 100%;
line-height: 20px;
line-height: 20px;
resize: none;
resize: none;
background: #F5F9FC;
font-size: 14px;
color:#515559;
}
.send_btn{
font-size: 16px;
color:#fff;
border-radius: 3px;
height:30px;
width:80px;
line-height: 30px;
position: absolute;
bottom:15px;
right:15px;
margin:0;
}
}
}
}
...
...
dist/js/chat/index.js
View file @
7aca6baa
...
@@ -44,7 +44,7 @@ $(function () {
...
@@ -44,7 +44,7 @@ $(function () {
"token"
:
Util
.
getCookie
(
'token'
)
||
''
,
"token"
:
Util
.
getCookie
(
'token'
)
||
''
,
},
function
(
res
)
{
},
function
(
res
)
{
if
(
res
.
errcode
==
0
)
{
if
(
res
.
errcode
==
0
)
{
self
.
img
=
res
.
data
.
avatar
||
(
res
.
data
.
wechat_oauth
?(
res
.
data
.
wechat_oauth
.
oauth_head
||
''
):
''
);
self
.
img
=
res
.
data
.
avatar
||
(
res
.
data
.
wechat_oauth
?
(
res
.
data
.
wechat_oauth
.
oauth_head
||
''
)
:
''
);
console
.
log
(
self
.
img
)
console
.
log
(
self
.
img
)
self
.
name
=
res
.
data
.
company_name
||
'--'
;
self
.
name
=
res
.
data
.
company_name
||
'--'
;
self
.
id
=
res
.
data
.
user_id
+
''
;
self
.
id
=
res
.
data
.
user_id
+
''
;
...
@@ -624,10 +624,10 @@ $(function () {
...
@@ -624,10 +624,10 @@ $(function () {
// console.log('Error', WebIM.utils.stringify(message));
// console.log('Error', WebIM.utils.stringify(message));
// console.log('onError: ', message);
// console.log('onError: ', message);
if
(
message
.
type
==
206
)
{
if
(
message
.
type
==
206
)
{
try
{
try
{
WebIM
.
conn
.
close
();
//断开im重新登入
WebIM
.
conn
.
close
();
//断开im重新登入
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
)
console
.
log
(
e
)
}
}
layer
.
open
({
layer
.
open
({
...
@@ -759,7 +759,7 @@ $(function () {
...
@@ -759,7 +759,7 @@ $(function () {
// console.log(msg.body)
// console.log(msg.body)
this
.
conn
.
send
(
msg
.
body
);
this
.
conn
.
send
(
msg
.
body
);
},
},
sendCmd
:
function
(
templateObj
)
{
//发送模板
sendCmd
:
function
(
templateObj
)
{
//发送模板
var
self
=
this
;
var
self
=
this
;
var
userId
=
$
(
'.notice_left '
).
find
(
'.active'
).
attr
(
'userid'
);
var
userId
=
$
(
'.notice_left '
).
find
(
'.active'
).
attr
(
'userid'
);
var
touserid
=
$
(
'.notice_left '
).
find
(
'.active'
).
attr
(
'touserid'
);
var
touserid
=
$
(
'.notice_left '
).
find
(
'.active'
).
attr
(
'touserid'
);
...
@@ -776,11 +776,11 @@ $(function () {
...
@@ -776,11 +776,11 @@ $(function () {
touserid
:
touserid
,
touserid
:
touserid
,
name1
:
name
,
name1
:
name
,
img1
:
img
,
img1
:
img
,
isTemplate
:
'1'
isTemplate
:
'1'
});
});
delete
params
.
targetId
;
delete
params
.
targetId
;
delete
params
.
userImg
;
delete
params
.
userImg
;
delete
params
.
userName
;
delete
params
.
userName
;
// console.log(params)
// console.log(params)
if
(
status
==
2
)
{
if
(
status
==
2
)
{
layer
.
msg
(
'该用户已被拉黑'
);
layer
.
msg
(
'该用户已被拉黑'
);
...
@@ -884,6 +884,12 @@ $(function () {
...
@@ -884,6 +884,12 @@ $(function () {
}
}
}
}
});
});
$
(
'.send_btn'
).
on
(
'click'
,
function
()
{
var
val
=
$
(
'#chat_textarea'
).
val
();
if
(
val
)
{
self
.
sendPrivateText
(
val
,
{})
}
});
$
(
'.pic'
).
on
(
'click'
,
function
()
{
$
(
'.pic'
).
on
(
'click'
,
function
()
{
$
(
'#img_upload'
).
click
();
$
(
'#img_upload'
).
click
();
});
});
...
...
dist/js/global/global.min.js
View file @
7aca6baa
...
@@ -175,12 +175,12 @@
...
@@ -175,12 +175,12 @@
}
}
});
});
$
(
'#nav_logo'
).
on
(
'click'
,
function
()
{
$
(
'#nav_logo'
).
on
(
'click'
,
function
()
{
var
token
=
Util
.
getCookie
(
'token'
)
||
""
;
//
var token = Util.getCookie('token') || "";
if
(
token
)
{
//
if (token) {
window
.
location
.
href
=
'/'
;
//
window.location.href = '/';
}
else
{
//
} else {
window
.
location
.
href
=
index_url
;
window
.
location
.
href
=
index_url
;
}
//
}
})
})
//退出
//退出
...
...
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