|
@@ -46,7 +46,7 @@
|
|
|
<div>
|
|
|
<!-- <div class="knowledgeField-content-item" onclick="triggerButtonClick(${item.id})"> -->
|
|
|
<div class="knowledgeField-content-item">
|
|
|
- <a href="/articleTemplate/articleDetail/${item.id}">
|
|
|
+ <a href="/articleTemplate/articleDetail/${item.id}.html">
|
|
|
<div class="image"><img src="${item.coverImgUrl}" class="wh100" class="wh100"></img>
|
|
|
</div>
|
|
|
<div class="textContent">
|
|
@@ -58,7 +58,7 @@
|
|
|
${item.viewCount}
|
|
|
</div>
|
|
|
<!-- <button class="linkButtonss" onclick="learnMore(${item.id})">了解详情></button> -->
|
|
|
- <a class="linkButtonss" href="/articleTemplate/articleDetail/${item.id}">查看详情></a>
|
|
|
+ <a class="linkButtonss" href="/articleTemplate/articleDetail/${item.id}.html">查看详情></a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</a>
|
|
@@ -101,7 +101,7 @@
|
|
|
// const params = new URLSearchParams(window.location.search);
|
|
|
const url = window.location.href
|
|
|
const match = url.match(/pageList\/(\d+)/);
|
|
|
- const number = match ? match[1] : null;
|
|
|
+ const number = match ? match[1].substring(0,match[1].indexOf('\\.')) : null;
|
|
|
const pageIndex = +number || 1
|
|
|
const pageSize = 10
|
|
|
console.log(number, '<==== number')
|
|
@@ -118,10 +118,10 @@
|
|
|
|
|
|
function search() {
|
|
|
const inputVal = document.getElementById("knowledgeInput").value;
|
|
|
- window.location.href = knowledgeUrl + fixedParameters + '?&info=' + inputVal
|
|
|
+ window.location.href = knowledgeUrl + fixedParameters + '.html?&info=' + inputVal
|
|
|
}
|
|
|
function learnMore(id) {
|
|
|
- window.location.href = knowledgeDetails + `/` + id
|
|
|
+ window.location.href = knowledgeDetails + `/` + id + '.html';
|
|
|
}
|
|
|
function triggerButtonClick(itemId) {
|
|
|
// 找到该 item 对应的按钮并触发点击事件
|
|
@@ -141,7 +141,7 @@
|
|
|
if(!inputVal) {
|
|
|
return
|
|
|
}
|
|
|
- window.location.href = knowledgeUrl + '/' + inputVal
|
|
|
+ window.location.href = knowledgeUrl + '/' + inputVal + '.html';
|
|
|
}
|
|
|
|
|
|
// 初始化分页组件
|
|
@@ -164,7 +164,7 @@
|
|
|
|
|
|
// 跳转到指定页面
|
|
|
function goToPage(page) {
|
|
|
- window.location.href = knowledgeUrl + '/' + page
|
|
|
+ window.location.href = knowledgeUrl + '/' + page + '.html';
|
|
|
}
|
|
|
|
|
|
// 初始化分页
|