添加排行榜数据

This commit is contained in:
kron
2025-06-26 23:41:23 +08:00
parent c730088764
commit 6a3fb2af6d
7 changed files with 176 additions and 42 deletions

View File

@@ -1,15 +1,19 @@
<script setup>
import { ref, onMounted } from "vue";
import Avatar from "@/components/Avatar.vue";
const isIos = ref(true);
import { getRankListAPI } from "@/apis";
onMounted(() => {
const isIos = ref(true);
const selectedIndex = ref(0);
const rankData = ref({});
onMounted(async () => {
const deviceInfo = uni.getDeviceInfo();
isIos.value = deviceInfo.osName === "ios";
const rankList = await getRankListAPI();
rankData.value = rankList;
});
const selectedIndex = ref(0);
const handleSelect = (index) => {
selectedIndex.value = index;
};