update: 优化

This commit is contained in:
2026-08-05 17:38:34 +08:00
parent 4835993639
commit 6a78093d31
9 changed files with 434 additions and 140 deletions
+14 -3
View File
@@ -8,7 +8,7 @@ try {
switch (envVersion) {
case "develop": // 开发版
// BASE_URL = "http://192.168.1.2:8000/api/shoot";
// BASE_URL = "http://192.168.1.30:8000/api/shoot";
BASE_URL = "https://apitest.shelingxingqiu.com/api/shoot";
break;
case "trial": // 体验版
@@ -186,8 +186,19 @@ export const getDailyCountAPI = () => {
return request("GET", "/index/dailyCount", {}, ADDONS_BASE_URL);
};
export const getHomeData = (seasonId) => {
return request("GET", `/user/myHome?seasonId=${seasonId}`);
export const getHomeData = async (seasonId) => {
const data = await request("GET", `/user/myHome?seasonId=${seasonId}`);
if (!data?.user) return data;
// 段位信息由 myHome 接口直接返回,统一并入用户数据供各页面展示。
return {
...data,
user: {
...data.user,
rankIcon: data.rankIcon,
rankName: data.rankName,
},
};
};
export const getProvinceData = () => {