diff --git a/src/components/UserUpgrade.vue b/src/components/UserUpgrade.vue
index a45bce0..56d27ad 100644
--- a/src/components/UserUpgrade.vue
+++ b/src/components/UserUpgrade.vue
@@ -49,6 +49,7 @@ onMounted(() => {
恭喜你升级到
射灵{{ lvl }}级
+ !
@@ -102,7 +103,7 @@ onMounted(() => {
left: calc(50% - 40vw);
height: 60px;
}
-.text-content > text:last-child {
+.text-content > text:nth-child(3) {
color: #fed847;
}
.content > button:last-child {
diff --git a/src/constants.js b/src/constants.js
index 9979746..b24f42a 100644
--- a/src/constants.js
+++ b/src/constants.js
@@ -20,6 +20,8 @@ export const MESSAGETYPES = {
BackToGame: 1899960424,
FinalShootResult: 3813452544,
PaySuccess: 3793388244,
+ RankUpdate: 1121669910,
+ LvlUpdate: 3958625354,
};
export const topThreeColors = ["#FFD947", "#D2D2D2", "#FFA515"];
diff --git a/src/pages/battle-result.vue b/src/pages/battle-result.vue
index 9ac83a0..949f2b0 100644
--- a/src/pages/battle-result.vue
+++ b/src/pages/battle-result.vue
@@ -1,5 +1,5 @@
@@ -181,7 +168,7 @@ const checkBowData = () => {
diff --git a/src/pages/battle-room.vue b/src/pages/battle-room.vue
index 2da1cb7..5ad0be8 100644
--- a/src/pages/battle-room.vue
+++ b/src/pages/battle-room.vue
@@ -445,7 +445,7 @@ async function onReceiveMessage(messages = []) {
tips.value = "准备下半场";
}
if (msg.constructor === MESSAGETYPES.MatchOver) {
- uni.setStorageSync("last-battle", { ...msg.endStatus, lvl: msg.lvl });
+ uni.setStorageSync("last-battle", msg.endStatus);
if (msg.endStatus.nosaved) {
uni.showToast({
title: "游戏结束",
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 8f53a7a..575b3e5 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -59,7 +59,8 @@ const toRankListPage = () => {
};
onShow(async () => {
- if (user.value.id) {
+ const token = uni.getStorageSync("token");
+ if (token) {
const result = await getHomeData();
updateRank(result);
console.log("首页数据:", result);
diff --git a/src/pages/melee-match.vue b/src/pages/melee-match.vue
index 6331274..52b30ed 100644
--- a/src/pages/melee-match.vue
+++ b/src/pages/melee-match.vue
@@ -1,6 +1,6 @@