Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@
<div class="joe_archive__title-title">
<span>搜索到</span>
<span class="muted"><?php echo $this->getTotal(); ?></span>
<span>篇与</span>
<span class="muted ellipsis"><?php echo $this->_keywords; ?></span>
<span>的结果</span>
<span>篇&nbsp;</span>
<?php
$sp='<span class="muted ellipsis"> %s </span>';
$this->archiveTitle(array(
'category' => '分类为'.$sp.'的文章',
'search' => '包含关键字'.$sp.'的文章',
'tag' => '标签为'.$sp.'的文章',
'author' => $sp.'发布的文章')
, '', '');
?>
</div>
</div>

Expand Down
22 changes: 20 additions & 2 deletions assets/js/joe.global.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,28 @@ document.addEventListener('DOMContentLoaded', () => {
window.location.reload();
}
},
error() {
error(res) {
isSubmit = false;
$('.joe_comment__respond-form .foot .submit button').html('发表评论');
Qmsg.warning('发送失败!请刷新重试!');
/*
*解析其他错误提示。
*如未登录状态下,使用注册用户的昵称回复,可正常显示错误提示:您所使用的用户名已经被注册,请登录后再次提交
*/
if(res.responseText){
let arr = [],
str = '';
arr = $(res.responseText).contents();
Array.from(arr).forEach(_ => {
if (_.parentNode.className === 'container') str = _;
});
if (!/Joe/.test(res.responseText)) {
Qmsg.warning(str.textContent.trim() || '');
}else{
Qmsg.warning('发送失败!请刷新重试!');
}
}else{
Qmsg.warning('发送失败!请刷新重试!');
}
}
});
});
Expand Down
Loading