This commit is contained in:
杜恒 2021-04-14 14:41:47 +08:00
parent b4dc952e1b
commit 5f8a4ee660
6 changed files with 7 additions and 11 deletions

View File

@ -141,7 +141,7 @@ document.addEventListener('DOMContentLoaded', () => {
`; `;
} }
}; };
let queryData = { page: 1, pageSize: 12, type: 'created' }; let queryData = { page: 1, pageSize: window.Joe.PAGE_SIZE, type: 'created' };
const initDom = () => { const initDom = () => {
$('.joe_index__list .joe_list').html(''); $('.joe_index__list .joe_list').html('');
$('.joe_load').show(); $('.joe_load').show();
@ -179,14 +179,12 @@ document.addEventListener('DOMContentLoaded', () => {
}; };
initDom(); initDom();
pushDom(); pushDom();
$('.joe_index__title-title .item').on('click', async function () { $('.joe_index__title-title .item').on('click', async function () {
if ($(this).attr('data-type') === queryData.type) return; if ($(this).attr('data-type') === queryData.type) return;
queryData = { page: 1, pageSize: 12, type: $(this).attr('data-type') }; queryData = { page: 1, pageSize: window.Joe.PAGE_SIZE, type: $(this).attr('data-type') };
initDom(); initDom();
pushDom(); pushDom();
}); });
$('.joe_load').on('click', async function () { $('.joe_load').on('click', async function () {
if ($(this).attr('loading')) return; if ($(this).attr('loading')) return;
queryData.page++; queryData.page++;

File diff suppressed because one or more lines are too long

View File

@ -29,9 +29,6 @@ function themeInit($self)
Helper::options()->commentsRequireURL = false; Helper::options()->commentsRequireURL = false;
/* 强制用户开启评论回复 */ /* 强制用户开启评论回复 */
Helper::options()->commentsThreaded = true; Helper::options()->commentsThreaded = true;
/* 强制显示一页12篇文章 */
$self->parameter->pageSize = 12;
/* 主题开放API 路由规则 */ /* 主题开放API 路由规则 */
$path_info = $self->request->getPathinfo(); $path_info = $self->request->getPathinfo();

View File

@ -2,7 +2,7 @@
/* 获取主题当前版本号 */ /* 获取主题当前版本号 */
function _getVersion() function _getVersion()
{ {
return "6.3.6"; return "6.3.7";
}; };
/* 判断是否是手机 */ /* 判断是否是手机 */

View File

@ -1,6 +1,6 @@
{ {
"name": "typecho-joe-next", "name": "typecho-joe-next",
"version": "6.3.6", "version": "6.3.7",
"description": "A Theme Of Typecho", "description": "A Theme Of Typecho",
"main": "index.php", "main": "index.php",
"keywords": [ "keywords": [

View File

@ -24,7 +24,8 @@
DOCUMENT_TITLE: `<?php $this->options->JDocumentTitle() ?>`, DOCUMENT_TITLE: `<?php $this->options->JDocumentTitle() ?>`,
LAZY_LOAD: `<?php _getLazyload() ?>`, LAZY_LOAD: `<?php _getLazyload() ?>`,
BIRTHDAY: `<?php $this->options->JBirthDay() ?>`, BIRTHDAY: `<?php $this->options->JBirthDay() ?>`,
MOTTO: `<?php _getAsideAuthorMotto() ?>` MOTTO: `<?php _getAsideAuthorMotto() ?>`,
PAGE_SIZE: `<?php $this->parameter->pageSize() ?>`
} }
</script> </script>
<?php <?php