k-line/test4.html
2024-12-11 09:52:47 +08:00

31 lines
656 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.bootcdn.net/ajax/libs/axios/1.7.2/axios.js"></script>
<title>Document</title>
</head>
<body>
<script>
axios.get('http://127.0.0.1:8015/stock',{
params:{
symbol: 'sz000001', // 股票代码
start_date: '2022-01-01', // 起始日期
end_date: '2022-12-31' // 结束日期
}
}
)
.then(response => {
console.log(response.data)
})
.catch(error => {
console.error(error)
})
</script>
</body>
</html>