成交行情按日期获取全部数据
This commit is contained in:
parent
afa217e1b5
commit
4f6de4d3ac
|
|
@ -82,11 +82,13 @@ export default function News() {
|
||||||
const headers = token ? { Authorization: `Bearer ${token}` } : {}
|
const headers = token ? { Authorization: `Bearer ${token}` } : {}
|
||||||
|
|
||||||
// 构建URL参数
|
// 构建URL参数
|
||||||
let url = `${API_BASE}/api/information/list?info_type=${type}&page=${currentPage}&page_size=50`
|
let url = `${API_BASE}/api/information/list?info_type=${type}`
|
||||||
|
|
||||||
// 如果是成交行情tab,添加日期过滤
|
// 如果是成交行情tab,获取当天所有数据(不分页)
|
||||||
if (activeTab === 'deal' && dealDate) {
|
if (activeTab === 'deal' && dealDate) {
|
||||||
url += `&deal_date=${dealDate}`
|
url += `&deal_date=${dealDate}&page_size=500`
|
||||||
|
} else {
|
||||||
|
url += `&page=${currentPage}&page_size=50`
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await fetch(url, { headers })
|
const res = await fetch(url, { headers })
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue