...
|
...
|
@@ -24,10 +24,11 @@ var cmEntity, |
|
|
$leaveMsg = $('#leaveMsg'),
|
|
|
$sendOrder = $('.send-order'),
|
|
|
$sendImgInput = $('#sendImg'),
|
|
|
$history = $('.about-his.has-his'),
|
|
|
$msgArea = $('.msg-edit .msg-area'),
|
|
|
$makeEvalModal = $('#makeEvaluation'),
|
|
|
$rightHeadTab = $('.right-head .tab'),
|
|
|
$encryptedUid = $('input[name=encryptuid]'),
|
|
|
$encryptedUid = $('input[name=encryptedUid]'),
|
|
|
$panelMainBody = $('.panel-main .main-body');
|
|
|
|
|
|
var processInfo = {
|
...
|
...
|
@@ -350,8 +351,6 @@ function _emojiPrefix(text) { |
|
|
* @private
|
|
|
*/
|
|
|
function _handleCusMsg(rec, msgType, message) {
|
|
|
|
|
|
|
|
|
var liHtml;
|
|
|
|
|
|
message.newContent = _emojiPrefix(message.newContent);
|
...
|
...
|
@@ -372,6 +371,8 @@ function _handleCusMsg(rec, msgType, message) { |
|
|
</div>
|
|
|
</div>`;
|
|
|
|
|
|
|
|
|
// targetItem.replaceWith(liHtml);
|
|
|
$msgList.append(liHtml);
|
|
|
$panelMainBody.scrollTop($panelMainBody[0].scrollHeight);
|
|
|
|
...
|
...
|
@@ -396,6 +397,7 @@ function _breakCountdown(message) { |
|
|
|
|
|
$msgList.append(liHtml);
|
|
|
$panelMainBody.scrollTop($panelMainBody[0].scrollHeight);
|
|
|
|
|
|
// 倒计时信息
|
|
|
countdown(message.newContent, $('.tip .countdown'));
|
|
|
|
...
|
...
|
@@ -607,7 +609,6 @@ function msgResolve(msgList) { |
|
|
|
|
|
msgList = msgList.reverse();
|
|
|
|
|
|
|
|
|
if (endTime === msgList[0].sendTime) {
|
|
|
hasMore = false;
|
|
|
}
|
...
|
...
|
@@ -675,7 +676,7 @@ function fetchHistoryMsg() { |
|
|
success: function(res) {
|
|
|
if (res && res.code === 200) {
|
|
|
hasMore && msgResolve(res.data);
|
|
|
$('.about-his.has-his').hide();
|
|
|
$history.hide();
|
|
|
}
|
|
|
}
|
|
|
});
|
...
|
...
|
@@ -1026,13 +1027,13 @@ $('.img-zoom-in').on('click', function(e) { |
|
|
});
|
|
|
|
|
|
// 显示历史记录
|
|
|
$('.about-his.has-his').click(fetchHistoryMsg);
|
|
|
$history.click(fetchHistoryMsg);
|
|
|
|
|
|
// 滚动加载更多
|
|
|
$panelMainBody.scroll(function() {
|
|
|
var atTop = $panelMainBody.scrollTop() === 0;
|
|
|
var loading = $panelMainBody.scrollTop() === 0;
|
|
|
|
|
|
atTop && hasMore && fetchHistoryMsg();
|
|
|
loading && hasMore && fetchHistoryMsg();
|
|
|
});
|
|
|
|
|
|
|
...
|
...
|
|