[Base] 修改 API 接口使得支持 GET 请求参数
All checks were successful
Build / build-and-test (push) Successful in 28s

This commit is contained in:
2025-05-24 10:33:57 +08:00
parent 8d248a44ff
commit eb5b28249f
2 changed files with 9 additions and 4 deletions

View File

@ -8,13 +8,13 @@ export const useApiStore = defineStore('api', () => {
return await execute()
}
async function postData(url, payload) {
const { execute } = useApiRequest('POST', url, payload)
async function workSimpleSearch(keyword, page = 1) {
const { execute } = useApiRequest('GET', 'search/simple', { keyword, page })
return await execute()
}
return {
getWork,
postData,
workSimpleSearch
}
})