This commit is contained in:
kron
2025-07-07 12:51:02 +08:00
parent 9ad65370b5
commit 3e70de349a
3 changed files with 13 additions and 10 deletions

View File

@@ -168,7 +168,7 @@ watch(
} }
.level-tag-second { .level-tag-second {
width: 30px; width: 25px;
background: #09c504; background: #09c504;
} }

View File

@@ -52,11 +52,6 @@ onMounted(async () => {
try { try {
const deviceInfo = uni.getDeviceInfo(); const deviceInfo = uni.getDeviceInfo();
isIos.value = deviceInfo.osName === "ios"; isIos.value = deviceInfo.osName === "ios";
const config = await getAppConfig();
updateConfig(config);
console.log("全局配置:", config);
const rankList = await getRankListAPI();
updateRank(rankList);
const token = uni.getStorageSync("token"); const token = uni.getStorageSync("token");
if (token) { if (token) {
const result = await getHomeData(); const result = await getHomeData();
@@ -70,8 +65,12 @@ onMounted(async () => {
); );
} }
} }
console.log("首页数据:", result);
} }
const config = await getAppConfig();
updateConfig(config);
console.log("全局配置:", config);
const rankList = await getRankListAPI();
updateRank(rankList);
} catch (error) { } catch (error) {
console.error("获取配置失败:", error); console.error("获取配置失败:", error);
} }
@@ -100,9 +99,12 @@ const comingSoon = () => {
<text v-if="!user.id">我的弓箭</text> <text v-if="!user.id">我的弓箭</text>
<text v-if="user.id && !device.deviceId">请绑定设备</text> <text v-if="user.id && !device.deviceId">请绑定设备</text>
<text v-if="user.id && device.deviceId">{{ <text
device.deviceName v-if="user.id && device.deviceId"
}}</text> class="truncate"
:style="{ width: '90%', textAlign: 'center' }"
>{{ device.deviceName }}</text
>
<image <image
src="../static/a2@2x.png" src="../static/a2@2x.png"
mode="widthFix" mode="widthFix"

View File

@@ -89,6 +89,7 @@ export default defineStore("store", {
if (this.user.scores) { if (this.user.scores) {
rankInfos.some((r, index) => { rankInfos.some((r, index) => {
lvlName = rankInfos[index].name; lvlName = rankInfos[index].name;
lvlImage = rankInfos[index].icoin;
if (r.upgrade_scores > this.user.scores) { if (r.upgrade_scores > this.user.scores) {
if (rankInfos[index - 1]) { if (rankInfos[index - 1]) {
lvlName = rankInfos[index - 1].name; lvlName = rankInfos[index - 1].name;