隐藏load ,提高用户体验

This commit is contained in:
张成
2025-09-29 10:35:34 +08:00
parent 090a44fd6e
commit 9b6e3e15d0
5 changed files with 36 additions and 170 deletions

View File

@@ -53,7 +53,7 @@ export const getGamesIntegrateList = async (params?: Record<string, any>) => {
*/
export const getGamesCount = async (params?: Record<string, any>) => {
try {
return httpService.post('/games/count', params, { showLoading: true })
return httpService.post('/games/count', params, { showLoading: false })
} catch (error) {
console.error("列表数量获取失败:", error);
throw error;
@@ -68,7 +68,7 @@ export const getGamesCount = async (params?: Record<string, any>) => {
export const getSearchHistory = async (params) => {
try {
// 调用HTTP服务获取搜索历史记录
return httpService.post('/games/search_history', params, { showLoading: true })
return httpService.post('/games/search_history', params, { showLoading: false })
} catch (error) {
// 捕获并打印错误信息
console.error("历史记录获取失败:", error);
@@ -84,7 +84,7 @@ export const getSearchHistory = async (params) => {
export const clearHistory = async (params) => {
try {
// 调用HTTP服务清除搜索历史记录
return httpService.post('/games/search_history/delete_all', params, { showLoading: true })
return httpService.post('/games/search_history/delete_all', params, { showLoading: false })
} catch (error) {
// 捕获并打印错误信息
console.error("清除历史记录失败:", error);