迁移为next项目
This commit is contained in:
22
old/js/http.js
Normal file
22
old/js/http.js
Normal 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())
|
||||
}
|
||||
Reference in New Issue
Block a user