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
df97bbc9
authored
Jul 25, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
111
parent
3b3c371e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
100 additions
and
32 deletions
dist/js/chat/index.js
dist/js/home/index.js
dist/js/quoteprice/quote.js
dist/js/chat/index.js
View file @
df97bbc9
...
...
@@ -382,9 +382,22 @@ $(function () {
$
(
'#'
+
userId
).
find
(
'.notice_item_content'
).
append
(
self
.
messageHtml
(
2
,
htmlStr
,
isTemplate
));
}
var
contentHeight
=
$
(
'#'
+
userId
).
find
(
'.notice_item_content'
)
.
height
();
$
(
'#'
+
userId
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
var
imgLen
=
$
(
'#'
+
userId
).
find
(
'img'
).
length
;
if
(
!
imgLen
)
{
setTimeout
(
function
()
{
var
contentHeight
=
$
(
'#'
+
userId
).
find
(
'.notice_item_content'
)
.
height
();
$
(
'#'
+
userId
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
},
200
)
}
else
{
$
(
'#'
+
userId
).
find
(
'img:last'
).
load
(
function
()
{
setTimeout
(
function
()
{
var
contentHeight
=
$
(
'#'
+
userId
).
find
(
'.notice_item_content'
)
.
height
();
$
(
'#'
+
userId
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
},
200
)
})
}
}
else
{
//非当前用户
...
...
@@ -548,9 +561,23 @@ $(function () {
img
:
self
.
img
,
id
:
self
.
id
},
false
));
var
contentHeight
=
$
(
'#'
+
userId
).
find
(
'.notice_item_content'
)
.
height
();
$
(
'#'
+
userId
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
var
imgLen
=
$
(
'#'
+
userId
).
find
(
'img'
).
length
;
if
(
!
imgLen
)
{
setTimeout
(
function
()
{
var
contentHeight
=
$
(
'#'
+
userId
).
find
(
'.notice_item_content'
)
.
height
();
$
(
'#'
+
userId
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
},
200
)
}
else
{
$
(
'#'
+
userId
).
find
(
'img:last'
).
load
(
function
()
{
setTimeout
(
function
()
{
var
contentHeight
=
$
(
'#'
+
userId
).
find
(
'.notice_item_content'
)
.
height
();
$
(
'#'
+
userId
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
},
200
)
})
}
$
(
'#chat_textarea'
).
val
(
''
);
},
...
...
@@ -582,11 +609,22 @@ $(function () {
self
.
addChatMember
(
templateObj
.
targetId
);
$
(
'#'
+
userId
).
find
(
'.notice_item_content'
).
append
(
self
.
messageHtml
(
1
,
params
,
true
));
var
contentHeight
=
$
(
'#'
+
userId
).
find
(
'.notice_item_content'
)
.
height
();
setTimeout
(
function
()
{
$
(
'#'
+
userId
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
},
200
)
var
imgLen
=
$
(
'#'
+
userId
).
find
(
'img'
).
length
;
if
(
!
imgLen
)
{
setTimeout
(
function
()
{
var
contentHeight
=
$
(
'#'
+
userId
).
find
(
'.notice_item_content'
)
.
height
();
$
(
'#'
+
userId
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
},
200
)
}
else
{
$
(
'#'
+
userId
).
find
(
'img:last'
).
load
(
function
()
{
setTimeout
(
function
()
{
var
contentHeight
=
$
(
'#'
+
userId
).
find
(
'.notice_item_content'
)
.
height
();
$
(
'#'
+
userId
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
},
200
)
})
}
},
fail
:
function
()
{
...
...
@@ -631,12 +669,22 @@ $(function () {
img
:
self
.
img
,
id
:
self
.
id
},
false
));
var
contentHeight
=
$
(
'#'
+
userId
).
find
(
'.notice_item_content'
)
.
height
();
// $('#' + userId).find('.notice_list').scrollTop(contentHeight);
setTimeout
(
function
()
{
$
(
'#'
+
userId
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
},
200
)
var
imgLen
=
$
(
'#'
+
userId
).
find
(
'img'
).
length
;
if
(
!
imgLen
)
{
setTimeout
(
function
()
{
var
contentHeight
=
$
(
'#'
+
userId
).
find
(
'.notice_item_content'
)
.
height
();
$
(
'#'
+
userId
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
},
200
)
}
else
{
$
(
'#'
+
userId
).
find
(
'img:last'
).
load
(
function
()
{
setTimeout
(
function
()
{
var
contentHeight
=
$
(
'#'
+
userId
).
find
(
'.notice_item_content'
)
.
height
();
$
(
'#'
+
userId
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
},
200
)
})
}
$
(
'#img_upload'
).
val
(
''
);
},
fail
:
function
()
{
...
...
@@ -706,13 +754,12 @@ $(function () {
return
;
}
}
else
{
var
contentHeight
=
$
(
'#'
+
id
).
find
(
'.notice_item_content'
).
height
();
// $('#' + id).find('.notice_list').scrollTop(contentHeight);
setTimeout
(
function
()
{
$
(
'#'
+
id
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
},
200
)
if
(
newMember
)
{
setTimeout
(
function
()
{
var
contentHeight
=
$
(
'#'
+
id
).
find
(
'.notice_item_content'
)
.
height
();
$
(
'#'
+
id
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
},
200
)
return
}
if
(
firstClick
)
{
...
...
@@ -723,6 +770,12 @@ $(function () {
layer
.
msg
(
'聊天系统出错'
);
return
;
}
}
else
{
setTimeout
(
function
()
{
var
contentHeight
=
$
(
'#'
+
id
).
find
(
'.notice_item_content'
)
.
height
();
$
(
'#'
+
id
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
},
200
)
}
}
});
...
...
@@ -737,7 +790,7 @@ $(function () {
queue
:
id
,
count
:
'50'
,
success
:
function
(
data
)
{
self
.
rendHistoryMessage
(
id
,
data
)
self
.
rendHistoryMessage
(
id
,
data
,
isTemplate
)
if
(
isTemplate
)
{
self
.
sendCmd
(
self
.
templateObj
);
}
...
...
@@ -748,7 +801,7 @@ $(function () {
}
})
},
rendHistoryMessage
:
function
(
id
,
data
)
{
rendHistoryMessage
:
function
(
id
,
data
,
isTemplate
)
{
var
chatCon
=
""
;
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
var
fromId
=
data
[
i
].
from
;
...
...
@@ -794,12 +847,26 @@ $(function () {
}
$
(
'#'
+
id
).
find
(
'.notice_item_content'
).
prepend
(
chatCon
);
var
contentHeight
=
$
(
'#'
+
id
).
find
(
'.notice_item_content'
)
.
height
();
if
(
!
isTemplate
)
{
var
imgLen
=
$
(
'#'
+
id
).
find
(
'img'
).
length
;
if
(
!
imgLen
)
{
setTimeout
(
function
()
{
var
contentHeight
=
$
(
'#'
+
id
).
find
(
'.notice_item_content'
)
.
height
();
$
(
'#'
+
id
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
},
200
)
}
else
{
$
(
'#'
+
id
).
find
(
'img:last'
).
load
(
function
()
{
setTimeout
(
function
()
{
var
contentHeight
=
$
(
'#'
+
id
).
find
(
'.notice_item_content'
)
.
height
();
$
(
'#'
+
id
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
},
200
)
})
}
}
setTimeout
(
function
()
{
$
(
'#'
+
id
).
find
(
'.notice_list'
).
scrollTop
(
contentHeight
);
},
200
)
},
};
...
...
dist/js/home/index.js
View file @
df97bbc9
...
...
@@ -45,7 +45,8 @@ $(function () {
IcController
.
getData
(
apis
.
inquirySearch
,
'GET'
,
{
"offset"
:
5
,
"p"
:
1
,
"add_time/order"
:
"desc"
"add_time/order"
:
"desc"
,
"token"
:
Util
.
getCookie
(
'token'
)
||
""
},
function
(
res
)
{
var
getTpl
=
newTpl
.
innerHTML
;
...
...
dist/js/quoteprice/quote.js
View file @
df97bbc9
...
...
@@ -59,7 +59,7 @@ $(function () {
}
});
});
}
else
if
(
res
.
errcode
==
10501
3
)
{
}
else
if
(
res
.
errcode
==
10501
5
)
{
self
.
listData
=
[];
layui
.
laytpl
(
getTpl
).
render
([],
function
(
html
)
{
$
(
".quote_content .inquiry_data"
).
empty
().
html
(
html
);
...
...
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