后台提供的接口

前端axios
export function relationWords(day) {
return request({
url: '/test/statistics/relation/' + day, // 主要是这儿
method: 'get'
})
}
接口使用
relationWords(10).then(res => {
console.log(res);
}).catch(err => {
console.log(err);
})
本文介绍了一个使用前端Axios库调用后台提供的接口的示例,展示了如何通过export function relationWords(day)函数发送GET请求到指定URL,并处理返回的数据。
3053

被折叠的 条评论
为什么被折叠?



