feat: 添加行业资讯模块及相关功能

新增行业资讯列表页和详情页,实现文章数据的获取和展示功能
添加导航菜单项到所有页面,并移除部分冗余代码
创建HTTP请求工具函数用于获取文章数据
This commit is contained in:
砂糖
2026-04-04 11:10:07 +08:00
parent aed959eb2f
commit 2cf1b252e3
8 changed files with 612 additions and 233 deletions

22
js/http.js Normal file
View File

@@ -0,0 +1,22 @@
// 获取咨询列表
async function getArticleList(params) {
const urlParams = new URLSearchParams(params)
return fetch(`http://49.232.154.205/prod-api/export/article/list?${urlParams.toString()}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
},
})
.then(res => res.json())
}
// 获取咨询详情
async function getArticleDetail(id) {
return fetch(`http://49.232.154.205/prod-api/export/article/${id}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
})
.then(res => res.json())
}