fix:合并代码并解决冲突

This commit is contained in:
2026-05-09 14:00:20 +08:00
32 changed files with 1577 additions and 345 deletions

View File

@@ -6,6 +6,7 @@ try {
switch (envVersion) {
case "develop": // 开发版
// BASE_URL = "http://localhost:8000/api/shoot";
BASE_URL = "https://apitest.shelingxingqiu.com/api/shoot";
break;
case "trial": // 体验版
@@ -495,3 +496,63 @@ export const kickPlayerAPI = (number, userId) => {
userId,
});
};
// 获取赛季列表
export const getSeasonList = () => {
return request("GET", "/index/season/list");
};
// 获取赛季统计
export const getSeasonStats = (seasonId) => {
const data = {};
if (seasonId !== undefined && seasonId !== null) data.seasonId = seasonId;
return request("GET", "/index/season/stats", data);
};
//获取积分榜
export const getScoreRankList = (seasonId, page, perPage) => {
return request("GET", "/index/score/rank/list", {
seasonId,
page,
perPage
});
};
// 获取10环排行榜
export const getTenRingRankList = (seasonId, page, perPage) => {
return request("GET", "/index/tenRing/rank/list", {
seasonId,
page,
perPage
});
};
// 获取MVP排行榜
export const getMvpRankList = (seasonId, page, perPage) => {
return request("GET", "/index/mvp/rank/list", {
seasonId,
page,
perPage
});
};
// 获取我的积分排名
export const getMyScoreRank = (seasonId) => {
const data = {};
if (seasonId !== undefined && seasonId !== null) data.seasonId = seasonId;
return request("GET", "/index/myScoreRank", data);
};
// 获取我的MVP排名
export const getMyMvpRank = (seasonId) => {
const data = {};
if (seasonId !== undefined && seasonId !== null) data.seasonId = seasonId;
return request("GET", "/index/myMvpRank", data);
};
// 获取我的10环排名
export const getMyTenRingRank = (seasonId) => {
const data = {};
if (seasonId !== undefined && seasonId !== null) data.seasonId = seasonId;
return request("GET", "/index/myTenRingRank", data);
};

View File

@@ -18,31 +18,31 @@ const props = defineProps({
<image
class="bg-image"
v-if="type === 0"
src="../static/app-bg.png"
src="https://static.shelingxingqiu.com/shootmini/static/app-bg.png"
mode="widthFix"
/>
<image
class="bg-image"
v-if="type === 1"
src="../static/app-bg2.png"
src="https://static.shelingxingqiu.com/shootmini/static/app-bg2.png"
mode="widthFix"
/>
<image
class="bg-image"
v-if="type === 2"
src="../static/app-bg3.png"
src="https://static.shelingxingqiu.com/shootmini/static/app-bg3.png"
:style="{ height: capsuleHeight + 50 + 'px' }"
/>
<image
class="bg-image"
v-if="type === 3"
src="../static/app-bg4.png"
src="https://static.shelingxingqiu.com/shootmini/static/app-bg4.png"
mode="widthFix"
/>
<image
class="bg-image"
v-if="type === 4"
src="../static/app-bg5.png"
src="https://static.shelingxingqiu.com/shootmini/static/app-bg5.png"
mode="widthFix"
/>
<image
@@ -51,6 +51,12 @@ const props = defineProps({
src="https://static.shelingxingqiu.com/attachment/2026-01-05/dfgf3b5kp459tfyn0f.png"
mode="widthFix"
/>
<image
class="bg-image"
v-if="type === 6"
src="https://static.shelingxingqiu.com/shootmini/static/rank/rank-bg.png"
mode="widthFix"
/>
<view class="bg-overlay" v-if="type === 0"></view>
</view>
</template>
@@ -67,7 +73,7 @@ const props = defineProps({
.bg-image {
width: 100%;
height: 100%;
/* height: 100%; */
}
.bg-overlay {

View File

@@ -139,7 +139,7 @@ async function onReceiveMessage(msg) {
halfTime.value = false;
audioManager.play("比赛开始");
} else if (msg.type === MESSAGETYPESV2.BattleEnd) {
audioManager.play("比赛结束");
audioManager.play("比赛结束", false);
} else if (msg.type === MESSAGETYPESV2.ShootResult) {
let arrow = {};
if (msg.details && Array.isArray(msg.details)) {

View File

@@ -33,7 +33,7 @@ const onScrollView = (e) => {
>
<image
:style="{ opacity: addBg ? 1 : 0 }"
src="../static/app-bg.png"
src="https://static.shelingxingqiu.com/shootmini/static/app-bg.png"
mode="widthFix"
/>
<navigator open-type="navigateBack">

View File

@@ -13,7 +13,7 @@ import {
getDeviceBatteryAPI,
getHomeData,
getMyDevicesAPI,
getRankListAPI,
getScoreRankList,
silentLoginAPI,
} from "@/apis";
import {topThreeColors} from "@/constants";
@@ -26,15 +26,23 @@ const {
updateConfig,
updateUser,
updateDevice,
updateRank,
getLvlName,
getLvlNameByScore,
updateOnline,
} = store;
const {user, device, rankData, online, game} = storeToRefs(store);
const {user, device, online, game} = storeToRefs(store);
const showModal = ref(false);
const showGuide = ref(false);
const scoreRankList = ref([]);
// 提取积分榜接口返回的榜单数组,兼容数组和对象两种返回格式。
const getScoreRankData = (result) => {
if (Array.isArray(result)) return result;
if (Array.isArray(result?.list)) return result.list;
if (Array.isArray(result?.items)) return result.items;
return [];
};
const toPage = async (path) => {
if (!user.value.id) {
@@ -84,15 +92,15 @@ onShow(async () => {
}
}
const promises = [getRankListAPI()];
const promises = [getScoreRankList(undefined, 1, 10)];
if (token || user.value.id) {
promises.push(getHomeData());
}
const [rankList, homeData] = await Promise.all(promises);
console.log("排行数据", rankList);
updateRank(rankList);
console.log("积分榜数据", rankList);
scoreRankList.value = getScoreRankData(rankList).slice(0, 10);
if (homeData) {
console.log("首页数据:", homeData);
@@ -216,7 +224,7 @@ onShareTimeline(() => {
class="player-avatar"
:style="{
zIndex: 8 - i,
borderColor: rankData.rank[i - 1]
borderColor: scoreRankList[i - 1]
? topThreeColors[i - 1] || '#000'
: '#000',
}"
@@ -227,15 +235,15 @@ onShareTimeline(() => {
<view v-if="i > 3">{{ i }}</view>
<image
:src="
rankData.rank[i - 1]
? rankData.rank[i - 1].avatar
scoreRankList[i - 1]
? (scoreRankList[i - 1].avatar || '../static/user-icon.png')
: '../static/user-icon-dark.png'
"
mode="aspectFill"
/>
</view>
<view class="more-players">
<text>{{ rankData.rank.length }}</text>
<text>{{ scoreRankList.length }}</text>
</view>
</view>
</view>

View File

@@ -107,7 +107,7 @@ const targetTypeName = computed(() => {
<template>
<view class="container" :style="{ paddingTop: paddingTop + 'px' }">
<image
src="../static/app-bg5.png"
src="https://static.shelingxingqiu.com/shootmini/static/app-bg5.png"
class="bg-image"
mode="aspectFill"
:style="{ height: paddingTop + 60 + 'px' }"

View File

@@ -59,7 +59,7 @@ async function onReceiveMessage(msg) {
if (msg.type === MESSAGETYPESV2.ShootResult) {
scores.value = msg.details;
} else if (msg.type === MESSAGETYPESV2.BattleEnd) {
setTimeout(onOver, 1500);
// setTimeout(onOver, 1500);
}
}
@@ -84,6 +84,12 @@ const onClickShare = debounce(async () => {
await wxShare("shareCanvas");
});
function onAudioEnded(s) {
if (s.indexOf("比赛结束") >= 0) {
onOver()
}
}
onMounted(async () => {
// audioManager.play("第一轮");
uni.setKeepScreenOn({
@@ -91,6 +97,7 @@ onMounted(async () => {
});
uni.$on("socket-inbox", onReceiveMessage);
uni.$on("share-image", onClickShare);
uni.$on("audioEnded", onAudioEnded);
const result = await createPractiseAPI(total, 120, targetType.value);
if (result) practiseId.value = result.id;
});
@@ -101,6 +108,7 @@ onBeforeUnmount(() => {
});
uni.$off("socket-inbox", onReceiveMessage);
uni.$off("share-image", onClickShare);
uni.$off("audioEnded", onAudioEnded);
audioManager.stopAll();
endPractiseAPI();
});

View File

@@ -1,58 +1,333 @@
<script setup>
import { ref, onMounted } from "vue";
import { computed, nextTick, onMounted, ref } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import Avatar from "@/components/Avatar.vue";
import {
getMvpRankList,
getMyMvpRank,
getMyScoreRank,
getMyTenRingRank,
getScoreRankList,
getTenRingRankList,
} from "@/apis";
import { capsuleHeight } from "@/util";
import useStore from "@/store";
import { storeToRefs } from "pinia";
const PAGE_SIZE = 10;
const store = useStore();
const { user, rankData } = storeToRefs(store);
const { user } = storeToRefs(store);
const { getLvlName } = store;
const selectedIndex = ref(0);
const currentList = ref([]);
const myData = ref({});
const addBg = ref(false);
onMounted(async () => {
handleSelect(0);
const createRankState = () => ({
list: [],
page: 0,
pageSize: PAGE_SIZE,
loading: false,
noMore: false,
loaded: false,
scrollTop: 0,
myData: null,
myDataLoaded: false,
});
const handleSelect = (index) => {
selectedIndex.value = index;
myData.value = {};
currentList.value = [];
if (index === 0) {
currentList.value = rankData.value.rank;
} else if (index === 1) {
currentList.value = rankData.value.mvpRank;
} else if (index === 2) {
currentList.value = rankData.value.ringRank;
const rankTabs = [
{
key: "score",
title: "积分榜",
subTitle: "排位赛积分",
listApi: getScoreRankList,
myApi: getMyScoreRank,
},
{
key: "mvp",
title: "MVP榜",
subTitle: "MVP次数",
listApi: getMvpRankList,
myApi: getMyMvpRank,
},
{
key: "tenRing",
title: "十环榜",
subTitle: "十环次数",
listApi: getTenRingRankList,
myApi: getMyTenRingRank,
},
];
// 解析 ranking 页面传入的榜单参数,进入页面时默认选中对应 tab。
const getTabIndexByRouteParam = (tab) => {
if (tab === "mvp") return 1;
if (tab === "tenRing") return 2;
return 0;
};
const rankStates = ref({
score: createRankState(),
mvp: createRankState(),
tenRing: createRankState(),
});
const selectedIndex = ref(0);
const initialTabIndex = ref(0);
const pageMounted = ref(false);
const initializedFromRoute = ref(false);
const addBg = ref(false);
const currentScrollTop = ref(0);
const restoreScrollTop = ref(0);
const tabSwitchAnimating = ref(false);
const suppressScrollSync = ref(false);
const suppressLoadMore = ref(false);
const stickyTabsTop = capsuleHeight + 50;
const stickyTabsActive = ref(false);
const tabsStickyThreshold = ref(0);
const tabsStickyReady = ref(false);
const tabsHeight = ref(0);
const getTabConfig = (index = selectedIndex.value) => rankTabs[index];
const getTabKey = (index = selectedIndex.value) => getTabConfig(index).key;
// 统一提取榜单接口返回的列表数据,兼容数组和对象两种返回格式。
const getRankListFromResponse = (result) => {
if (Array.isArray(result)) return result;
if (Array.isArray(result?.list)) return result.list;
if (Array.isArray(result?.items)) return result.items;
return [];
};
// 为当前登录用户构造默认的个人榜单信息,避免接口未返回时底部区域缺数据。
const buildDefaultMyData = () => ({
rank: null,
userId: user.value.id,
name: user.value.nickName,
avatar: user.value.avatar,
totalScore: 0,
mvpCount: 0,
tenRings: 0,
totalGames: 0,
totalCount: 0,
rankName: user.value.lvlName,
rankLvl: user.value.rankLvl,
});
const currentTabKey = computed(() => getTabKey(selectedIndex.value));
const currentState = computed(() => rankStates.value[currentTabKey.value]);
const currentList = computed(() => currentState.value.list);
const currentSubTitle = computed(() => getTabConfig(selectedIndex.value).subTitle);
const currentMyData = computed(() => {
if (!user.value.id) return null;
return currentState.value.myData || buildDefaultMyData();
});
// 统一格式化段位和场次文案,兼容不同接口的字段命名。
const formatLevelText = (item = {}) => {
const levelName = item.rankName || getLvlName(item.rankLvl) || "暂无段位";
const totalGames = item.totalGames ?? item.TotalGames ?? 0;
return `${levelName}${totalGames}`;
};
// 统一读取榜单项的排名字段,没有后端 rank 时回退到前端序号。
const getDisplayRank = (item = {}, index = 0) => {
return item.rank ?? index + 1;
};
// 底部个人排名在未上榜时展示占位符,而不是空白。
const getDisplayMyRank = (item = {}) => {
return item.rank ?? "-";
};
const getScoreValue = (item = {}) => item.totalScore ?? 0;
const getMvpValue = (item = {}) => item.mvpCount ?? item.totalScore ?? 0;
const getTenRingValue = (item = {}) =>
item.tenRings ?? item.TenRings ?? item.totalScore ?? 0;
// 根据当前选中的榜单类型,读取对应的展示值。
const getRankValue = (item = {}, index = selectedIndex.value) => {
if (index === 0) return getScoreValue(item);
if (index === 1) return getMvpValue(item);
return getTenRingValue(item);
};
const getRankUnit = (index = selectedIndex.value) => {
if (index === 0) return "分";
return "次";
};
// 统一设置页面当前的视觉滚动状态,避免吸顶和顶部背景不同步。
const syncScrollVisualState = (scrollTop = 0) => {
currentScrollTop.value = scrollTop;
addBg.value = scrollTop > 100;
if (!tabsStickyReady.value) {
stickyTabsActive.value = false;
return;
}
if (user.value.id) {
currentList.value.some((item) => {
if (item.userId === user.value.id) {
myData.value = item;
return true;
}
return false;
});
if (!myData.value.userId) {
myData.value = {
userId: user.value.id,
TotalGames: 0,
totalScore: 0,
mvpCount: 0,
TenRings: 0,
};
stickyTabsActive.value = scrollTop >= tabsStickyThreshold.value;
};
// 只保留一条滚动恢复链路:从当前滚动位置平滑滚到目标位置,避免多套控制同时生效造成闪烁。
const applyScrollPosition = async (
fromScrollTop = currentScrollTop.value,
toScrollTop = 0,
withAnimation = false
) => {
tabSwitchAnimating.value = withAnimation;
restoreScrollTop.value = fromScrollTop;
await nextTick();
restoreScrollTop.value = toScrollTop;
syncScrollVisualState(toScrollTop);
};
// 请求指定榜单的某一页数据,只有当前榜单会追加分页,不影响其他榜单的浏览状态。
const loadRankPage = async (tabKey, { reset = false } = {}) => {
const state = rankStates.value[tabKey];
const config = rankTabs.find((item) => item.key === tabKey);
if (!config || state.loading) return;
if (!reset && state.noMore) return;
const nextPage = reset ? 1 : state.page + 1;
state.loading = true;
if (reset) state.noMore = false;
try {
const result = await config.listApi(undefined, nextPage, PAGE_SIZE);
const list = getRankListFromResponse(result);
state.list = reset ? list : state.list.concat(list);
state.page = nextPage;
state.loaded = true;
state.noMore = list.length < PAGE_SIZE;
} catch (error) {
if (reset) {
state.list = [];
state.page = 0;
state.loaded = false;
state.noMore = false;
}
uni.showToast({
title: "排行榜加载失败",
icon: "none",
});
console.error("load rank page error", error);
} finally {
state.loading = false;
}
};
const onScrollView = (e) => {
addBg.value = e.detail.scrollTop > 100;
// 每个榜单独立请求一次个人排名信息,切回该榜单时直接复用,避免打断浏览上下文。
const loadMyRankData = async (tabKey) => {
if (!user.value.id) return;
const state = rankStates.value[tabKey];
const config = rankTabs.find((item) => item.key === tabKey);
if (!config || state.myDataLoaded) return;
try {
const result = await config.myApi();
state.myData = {
...buildDefaultMyData(),
...(result || {}),
};
} catch (error) {
state.myData = buildDefaultMyData();
console.error("load my rank data error", error);
} finally {
state.myDataLoaded = true;
}
};
const subTitles = ["排位赛积分", "MVP次数", "十环次数"];
// 首次进入或切换到未加载过的榜单时,初始化它的分页数据和个人横条数据。
const ensureTabReady = async (index = selectedIndex.value) => {
const tabKey = getTabKey(index);
const state = rankStates.value[tabKey];
if (!state.loaded) {
await loadRankPage(tabKey, { reset: true });
}
if (user.value.id && !state.myDataLoaded) {
await loadMyRankData(tabKey);
}
await nextTick();
return state.scrollTop || 0;
};
onLoad((options = {}) => {
initialTabIndex.value = getTabIndexByRouteParam(options.tab);
selectedIndex.value = initialTabIndex.value;
if (pageMounted.value && !initializedFromRoute.value) {
initializePage();
}
});
// 页面初始化同时兼容 onLoad 和 onMounted 的先后顺序,确保首屏一定落到路由指定的榜单。
const initializePage = async () => {
if (initializedFromRoute.value) return;
initializedFromRoute.value = true;
const nextScrollTop = await ensureTabReady(selectedIndex.value);
await applyScrollPosition(0, nextScrollTop, false);
setTimeout(() => {
measureTabsMetrics();
}, 0);
};
onMounted(async () => {
pageMounted.value = true;
await initializePage();
});
// 切换榜单时保留原榜单的列表和滚动位置,切回来后继续从之前的位置浏览。
const handleSelect = async (index) => {
if (index === selectedIndex.value) return;
const previousTabKey = currentTabKey.value;
rankStates.value[previousTabKey].scrollTop = currentScrollTop.value;
const previousScrollTop = currentScrollTop.value;
suppressScrollSync.value = true;
suppressLoadMore.value = true;
selectedIndex.value = index;
const nextScrollTop = await ensureTabReady(index);
await applyScrollPosition(previousScrollTop, nextScrollTop, false);
setTimeout(() => {
tabSwitchAnimating.value = false;
suppressScrollSync.value = false;
suppressLoadMore.value = false;
}, 220);
};
// 触底后只加载当前榜单的下一页数据,其他榜单的数据和页码保持不变。
const loadMore = async () => {
if (suppressLoadMore.value) return;
await loadRankPage(currentTabKey.value);
};
// 实时记录当前榜单的滚动位置,切换回来时恢复到上一次浏览位置。
const onScrollView = (e) => {
const scrollTop = e.detail.scrollTop || 0;
if (suppressScrollSync.value) return;
syncScrollVisualState(scrollTop);
rankStates.value[currentTabKey.value].scrollTop = scrollTop;
};
// 计算 tab 在滚动内容中的真实位置和高度,作为吸顶切换的唯一依据。
const measureTabsMetrics = () => {
const query = uni.createSelectorQuery();
query
.select("#rank-list-content-start")
.boundingClientRect()
.select(".rank-tabs-anchor")
.boundingClientRect()
.exec((res = []) => {
const [startRect, rect] = res;
if (!startRect || !rect) return;
const tabOffset = rect.top - startRect.top;
tabsStickyThreshold.value = Math.max(0, tabOffset - 92);
tabsHeight.value = rect.height || 0;
tabsStickyReady.value = true;
syncScrollVisualState(currentScrollTop.value);
});
};
</script>
<template>
@@ -65,7 +340,7 @@ const subTitles = ["排位赛积分", "MVP次数", "十环次数"];
>
<image
:style="{ opacity: addBg ? 1 : 0 }"
src="../static/app-bg.png"
src="https://static.shelingxingqiu.com/shootmini/static/app-bg.png"
mode="widthFix"
/>
<navigator open-type="navigateBack">
@@ -75,18 +350,32 @@ const subTitles = ["排位赛积分", "MVP次数", "十环次数"];
</view>
<scroll-view
scroll-y
:scroll-with-animation="tabSwitchAnimating"
:scroll-top="restoreScrollTop"
@scroll="onScrollView"
:style="{ height: myData.userId ? '90vh' : '100vh' }"
@scrolltolower="loadMore"
:style="{ height: user.id ? '90vh' : '100vh' }"
>
<view id="rank-list-content-start" class="content-start-anchor"></view>
<image
src="https://static.shelingxingqiu.com/attachment/2025-09-25/dd1p9b3wcrwnlnghiq.png"
mode="widthFix"
class="header-bg"
@load="measureTabsMetrics"
/>
<view class="rank-tabs">
<view
v-if="stickyTabsActive"
class="rank-tabs-placeholder"
:style="{ height: `${tabsHeight}px` }"
/>
<view
class="rank-tabs rank-tabs-anchor"
:class="{ 'rank-tabs-anchor-fixed': stickyTabsActive }"
:style="stickyTabsActive ? { top: `${stickyTabsTop}px` } : {}"
>
<view
v-for="(rankType, index) in ['积分榜', 'MVP榜', '十环榜']"
:key="index"
v-for="(rankType, index) in rankTabs"
:key="rankType.key"
:style="{
fontSize: index === selectedIndex ? '16px' : '14px',
color: index === selectedIndex ? '#000' : '#fff',
@@ -94,18 +383,18 @@ const subTitles = ["排位赛积分", "MVP次数", "十环次数"];
}"
@tap="handleSelect(index)"
>
{{ rankType }}
{{ rankType.title }}
</view>
</view>
<view class="rank-list">
<view class="rank-list-header">
<text>排名</text>
<text>用户ID</text>
<text>{{ subTitles[selectedIndex] }}</text>
<text>{{ currentSubTitle }}</text>
</view>
<view
v-for="(item, index) in currentList"
:key="index"
:key="`${currentTabKey}-${index}-${item.userId || item.name}`"
class="rank-list-item"
:style="{
backgroundColor: index % 2 === 0 ? '#9898981f' : 'transparent',
@@ -147,65 +436,60 @@ const subTitles = ["排位赛积分", "MVP次数", "十环次数"];
src="../static/champ3.png"
mode="widthFix"
/>
<view v-if="index > 2" class="view-crown">{{ index + 1 }}</view>
<view v-if="index > 2" class="view-crown">
{{ getDisplayRank(item, index) }}
</view>
<Avatar :src="item.avatar" />
<view class="rank-item-content">
<text class="truncate">{{ item.name }}</text>
<text>{{ getLvlName(item.rankLvl) }}{{ item.TotalGames }}</text>
<text>{{ formatLevelText(item) }}</text>
</view>
<text class="rank-item-integral" v-if="selectedIndex === 0">
<text class="rank-item-integral">
<text
:style="{ fontSize: '14px', color: '#fff', marginRight: '5px' }"
>{{ item.totalScore }} </text
>
</text>
<text class="rank-item-integral" v-if="selectedIndex === 1">
<text
:style="{ fontSize: '14px', color: '#fff', marginRight: '5px' }"
>{{ item.mvpCount }} </text
>
</text>
<text class="rank-item-integral" v-if="selectedIndex === 2">
<text
:style="{ fontSize: '14px', color: '#fff', marginRight: '5px' }"
>{{ item.TenRings }} </text
>
>
{{ getRankValue(item) }}
</text>
{{ getRankUnit() }}
</text>
</view>
<view v-if="!currentList.length" class="no-data">
<text>筹备中...</text>
<view
v-if="currentState.loading && !currentList.length"
class="no-data"
>
<text>加载中...</text>
</view>
<view
v-else-if="!currentState.loading && !currentList.length"
class="no-data"
>
<text>暂无数据</text>
</view>
<view v-else class="list-tip">
<text v-if="currentState.loading">加载中...</text>
<text v-else-if="currentState.noMore">没有更多了</text>
</view>
</view>
</scroll-view>
<view class="my-rank-data" v-if="myData.userId">
<view class="my-rank-data" v-if="currentMyData">
<image
src="https://static.shelingxingqiu.com/attachment/2025-08-05/dbuaf19pf7qd8ps0uh.png"
mode="widthFix"
/>
<text>{{ myData.rank }}</text>
<Avatar :src="user.avatar" />
<text>{{ getDisplayMyRank(currentMyData) }}</text>
<Avatar :src="currentMyData.avatar || user.avatar" />
<view class="rank-item-content">
<text class="truncate">{{ user.nickName }}</text>
<text>{{ user.lvlName }}{{ myData.TotalGames }}</text>
<text class="truncate">{{ currentMyData.name || user.nickName }}</text>
<text>{{ formatLevelText(currentMyData) }}</text>
</view>
<text class="rank-item-integral" v-if="selectedIndex === 0">
<text class="rank-item-integral">
<text
:style="{ fontSize: '14px', color: '#fff', marginRight: '5px' }"
>{{ myData.totalScore || 0 }}</text
></text
>
<text class="rank-item-integral" v-if="selectedIndex === 1">
<text
:style="{ fontSize: '14px', color: '#fff', marginRight: '5px' }"
>{{ myData.mvpCount || 0 }}</text
></text
>
<text class="rank-item-integral" v-if="selectedIndex === 2">
<text
:style="{ fontSize: '14px', color: '#fff', marginRight: '5px' }"
>{{ myData.TenRings || 0 }}</text
></text
>
>
{{ getRankValue(currentMyData) }}
</text>
{{ getRankUnit() }}
</text>
</view>
</view>
</template>
@@ -214,9 +498,16 @@ const subTitles = ["排位赛积分", "MVP次数", "十环次数"];
.container {
width: 100%;
}
.content-start-anchor {
width: 100%;
height: 0;
}
.header-bg {
width: 100%;
}
.header {
width: 100%;
height: 50px;
@@ -227,6 +518,7 @@ const subTitles = ["排位赛积分", "MVP次数", "十环次数"];
z-index: 10;
overflow: hidden;
}
.header-back {
width: 22px;
height: 22px;
@@ -234,6 +526,7 @@ const subTitles = ["排位赛积分", "MVP次数", "十环次数"];
margin-top: 5px;
position: relative;
}
.header > image:first-child {
width: 100vw;
height: 100vh;
@@ -242,25 +535,40 @@ const subTitles = ["排位赛积分", "MVP次数", "十环次数"];
left: 0;
transition: all 0.5s ease;
}
.header > text {
color: #fff;
font-weight: bold;
transition: all 0.5s ease;
position: relative;
}
.rank-tabs {
width: calc(100% - 20px);
display: flex;
justify-content: space-around;
padding: 0 10px;
margin-top: -15px;
padding: 20rpx 10px;
}
.rank-tabs > view {
width: 25%;
padding: 10px;
text-align: center;
border-radius: 20px;
}
.rank-tabs-placeholder {
width: 100%;
}
.rank-tabs-anchor-fixed {
position: fixed;
left: 0;
z-index: 11;
background: #000000;
backdrop-filter: blur(8px);
}
.rank-list {
display: flex;
flex-direction: column;
@@ -268,11 +576,12 @@ const subTitles = ["排位赛积分", "MVP次数", "十环次数"];
width: calc(100% - 20px);
color: #fff9;
font-size: 12px;
margin: 10px;
margin: 0 10px 10px 10px;
border: 1px solid rgb(255 217 71 / 0.2);
border-radius: 10px;
background-color: #313131;
}
.rank-list > view {
display: flex;
align-items: center;
@@ -281,20 +590,25 @@ const subTitles = ["排位赛积分", "MVP次数", "十环次数"];
overflow: hidden;
position: relative;
}
.rank-list-header {
width: calc(100% - 20px) !important;
padding: 10px;
}
.rank-list-header > text:nth-child(2) {
width: 14%;
}
.rank-list-header > text:last-child {
width: 30%;
text-align: right;
}
.rank-list-item {
padding: 10px 0;
}
.player-bg {
position: absolute;
width: 100%;
@@ -302,12 +616,14 @@ const subTitles = ["排位赛积分", "MVP次数", "十环次数"];
top: 0;
left: 0;
}
.player-crown {
position: relative;
width: 27px;
height: 27px;
margin: 0 15px;
}
.view-crown {
width: 27px;
height: 27px;
@@ -319,6 +635,7 @@ const subTitles = ["排位赛积分", "MVP次数", "十环次数"];
background-color: #676767;
position: relative;
}
.rank-item-content {
display: flex;
flex-direction: column;
@@ -328,17 +645,20 @@ const subTitles = ["排位赛积分", "MVP次数", "十环次数"];
position: relative;
padding-left: 10px;
}
.rank-item-content > text:first-child {
color: #fff;
font-size: 14px;
margin-bottom: 3px;
width: 120px;
}
.rank-list-item > text:last-child {
margin-right: 10px;
width: 56px;
text-align: right;
}
.my-rank-data {
width: calc(100% - 30px);
padding: 15px;
@@ -352,12 +672,14 @@ const subTitles = ["排位赛积分", "MVP次数", "十环次数"];
overflow: hidden;
border-radius: 10px;
}
.my-rank-data > image:first-child {
position: absolute;
width: 100%;
left: 0;
top: -5px;
}
.my-rank-data > text:nth-child(2) {
background-color: #c1a434;
position: relative;
@@ -369,20 +691,24 @@ const subTitles = ["排位赛积分", "MVP次数", "十环次数"];
min-width: 15px;
text-align: center;
}
.my-rank-data > text:last-child {
position: relative;
margin-right: 10px;
width: 65px;
text-align: right;
}
.my-rank-data > .rank-item-content > text:first-child {
color: #fed847;
}
.my-rank-data > .rank-item-integral {
color: #fff9;
font-size: 12px;
margin-right: 0 !important;
}
.no-data {
width: 100%;
height: 400px;
@@ -392,4 +718,11 @@ const subTitles = ["排位赛积分", "MVP次数", "十环次数"];
color: #fff9;
font-size: 14px;
}
.list-tip {
justify-content: center !important;
color: #fff9;
font-size: 12px;
min-height: 60rpx;
}
</style>

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="110px" height="54px" viewBox="0 0 110 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 5</title>
<defs>
<linearGradient x1="50%" y1="1.43983214%" x2="50%" y2="100%" id="linearGradient-1">
<stop stop-color="#FF7EAF" offset="0%"></stop>
<stop stop-color="#C36AFF" offset="100%"></stop>
</linearGradient>
<rect id="path-2" x="0" y="0" width="110" height="54" rx="8"></rect>
<radialGradient cx="50%" cy="50%" fx="50%" fy="50%" r="50%" id="radialGradient-4">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#FFFFFF" stop-opacity="0" offset="100%"></stop>
</radialGradient>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-5">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#FFFFFF" stop-opacity="0" offset="100%"></stop>
</linearGradient>
</defs>
<g id="训练功能改版" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="排位赛" transform="translate(-251.000000, -155.000000)">
<g id="编组-9" transform="translate(3.000000, 93.000000)">
<g id="编组-5" transform="translate(248.000000, 62.000000)">
<g id="编组-4">
<mask id="mask-3" fill="white">
<use xlink:href="#path-2"></use>
</mask>
<use id="矩形" fill="url(#linearGradient-1)" xlink:href="#path-2"></use>
<circle id="椭圆形" fill="url(#radialGradient-4)" mask="url(#mask-3)" cx="52" cy="64.5" r="64"></circle>
<rect id="矩形" fill="url(#linearGradient-5)" opacity="0.100000001" mask="url(#mask-3)" transform="translate(85.406727, 10.201587) rotate(51.000000) translate(-85.406727, -10.201587) " x="78.4067275" y="-14.2984126" width="14" height="49" rx="7"></rect>
</g>
<text id="10人大乱斗" font-family="DOUYINSANSBOLD-GB, Douyin Sans" font-size="16" font-weight="bold" fill="#FFFFFF">
<tspan x="15" y="32">10人大乱斗</tspan>
</text>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="111px" height="54px" viewBox="0 0 111 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 5@2x</title>
<defs>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
<stop stop-color="#896CFF" offset="0%"></stop>
<stop stop-color="#9754FF" offset="100%"></stop>
</linearGradient>
<rect id="path-2" x="0" y="0" width="110" height="54" rx="8"></rect>
<radialGradient cx="50%" cy="50%" fx="50%" fy="50%" r="50%" id="radialGradient-4">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#FFFFFF" stop-opacity="0" offset="100%"></stop>
</radialGradient>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-5">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#FFFFFF" stop-opacity="0" offset="100%"></stop>
</linearGradient>
</defs>
<g id="训练功能改版" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="排位赛" transform="translate(-132.000000, -93.000000)">
<g id="编组-9" transform="translate(3.000000, 93.000000)">
<g id="编组-5" transform="translate(129.500000, 0.000000)">
<g id="编组-4">
<mask id="mask-3" fill="white">
<use xlink:href="#path-2"></use>
</mask>
<use id="矩形" fill="url(#linearGradient-1)" xlink:href="#path-2"></use>
<circle id="椭圆形" fill="url(#radialGradient-4)" mask="url(#mask-3)" cx="55" cy="64.5" r="64"></circle>
<rect id="矩形" fill="url(#linearGradient-5)" opacity="0.100000001" mask="url(#mask-3)" transform="translate(89.406727, 10.201587) rotate(51.000000) translate(-89.406727, -10.201587) " x="82.4067275" y="-14.2984126" width="14" height="49" rx="7"></rect>
</g>
<g id="1v1备份" transform="translate(43.000000, 21.000000)" fill="#FFFFFF" fill-rule="nonzero">
<polygon id="路径" points="0 1.625 0 3.64722222 2.69090909 2.22083333 2.69090909 13 5 13 5 0 3.07272727 0"></polygon>
<polygon id="路径" points="17 3 14.4705882 3 12.0196078 10.5384615 9.60784314 3 7 3 10.5490196 13 13.2941176 13"></polygon>
<polygon id="路径" points="19 1.625 19 3.64722222 21.6909091 2.22083333 21.6909091 13 24 13 24 0 22.0727273 0"></polygon>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="110px" height="54px" viewBox="0 0 110 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 5@2x</title>
<defs>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
<stop stop-color="#4A8CFF" offset="0%"></stop>
<stop stop-color="#669DFF" offset="100%"></stop>
</linearGradient>
<rect id="path-2" x="0" y="0" width="110" height="54" rx="8"></rect>
<radialGradient cx="50%" cy="50%" fx="50%" fy="50%" r="50%" id="radialGradient-4">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#FFFFFF" stop-opacity="0" offset="100%"></stop>
</radialGradient>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-5">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#FFFFFF" stop-opacity="0" offset="100%"></stop>
</linearGradient>
</defs>
<g id="训练功能改版" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="排位赛" transform="translate(-251.000000, -93.000000)">
<g id="编组-9" transform="translate(3.000000, 93.000000)">
<g id="编组-5" transform="translate(248.000000, 0.000000)">
<g id="编组-4">
<mask id="mask-3" fill="white">
<use xlink:href="#path-2"></use>
</mask>
<use id="矩形" fill="url(#linearGradient-1)" xlink:href="#path-2"></use>
<circle id="椭圆形" fill="url(#radialGradient-4)" mask="url(#mask-3)" cx="56" cy="64.5" r="64"></circle>
<rect id="矩形" fill="url(#linearGradient-5)" opacity="0.100000001" mask="url(#mask-3)" transform="translate(85.406727, 10.201587) rotate(51.000000) translate(-85.406727, -10.201587) " x="78.4067275" y="-14.2984126" width="14" height="49" rx="7"></rect>
</g>
<text id="2v2" font-family="DOUYINSANSBOLD-GB, Douyin Sans" font-size="18" font-weight="bold" fill="#FFFFFF">
<tspan x="40.408" y="33">2v2</tspan>
</text>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="110px" height="54px" viewBox="0 0 110 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 5@2x</title>
<defs>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
<stop stop-color="#FF8787" offset="0%"></stop>
<stop stop-color="#FF9696" offset="100%"></stop>
</linearGradient>
<rect id="path-2" x="0" y="0" width="110" height="54" rx="8"></rect>
<radialGradient cx="50%" cy="50%" fx="50%" fy="50%" r="50%" id="radialGradient-4">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#FFFFFF" stop-opacity="0" offset="100%"></stop>
</radialGradient>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-5">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#FFFFFF" stop-opacity="0" offset="100%"></stop>
</linearGradient>
</defs>
<g id="训练功能改版" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="排位赛" transform="translate(-14.000000, -155.000000)">
<g id="编组-9" transform="translate(3.000000, 93.000000)">
<g id="编组-5" transform="translate(11.000000, 62.000000)">
<g id="编组-4">
<mask id="mask-3" fill="white">
<use xlink:href="#path-2"></use>
</mask>
<use id="矩形" fill="url(#linearGradient-1)" xlink:href="#path-2"></use>
<circle id="椭圆形" fill="url(#radialGradient-4)" mask="url(#mask-3)" cx="56" cy="64.5" r="64"></circle>
<rect id="矩形" fill="url(#linearGradient-5)" opacity="0.100000001" mask="url(#mask-3)" transform="translate(85.406727, 10.201587) rotate(51.000000) translate(-85.406727, -10.201587) " x="78.4067275" y="-14.2984126" width="14" height="49" rx="7"></rect>
</g>
<text id="3v3" font-family="DOUYINSANSBOLD-GB, Douyin Sans" font-size="18" font-weight="bold" fill="#FFFFFF">
<tspan x="40.408" y="33">3v3</tspan>
</text>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="111px" height="54px" viewBox="0 0 111 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 5</title>
<defs>
<linearGradient x1="50%" y1="3.4527039%" x2="50%" y2="99.6818489%" id="linearGradient-1">
<stop stop-color="#FFA052" offset="0%"></stop>
<stop stop-color="#FFBC4E" offset="100%"></stop>
</linearGradient>
<rect id="path-2" x="0" y="0" width="110" height="54" rx="8"></rect>
<radialGradient cx="50%" cy="50%" fx="50%" fy="50%" r="50%" id="radialGradient-4">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#FFFFFF" stop-opacity="0" offset="100%"></stop>
</radialGradient>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-5">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#FFFFFF" stop-opacity="0" offset="100%"></stop>
</linearGradient>
</defs>
<g id="训练功能改版" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="排位赛" transform="translate(-132.000000, -155.000000)">
<g id="编组-9" transform="translate(3.000000, 93.000000)">
<g id="编组-5" transform="translate(129.500000, 62.000000)">
<g id="编组-4">
<mask id="mask-3" fill="white">
<use xlink:href="#path-2"></use>
</mask>
<use id="矩形" fill="url(#linearGradient-1)" xlink:href="#path-2"></use>
<circle id="椭圆形" fill="url(#radialGradient-4)" mask="url(#mask-3)" cx="56" cy="64.5" r="64"></circle>
<rect id="矩形" fill="url(#linearGradient-5)" opacity="0.100000001" mask="url(#mask-3)" transform="translate(85.406727, 10.201587) rotate(51.000000) translate(-85.406727, -10.201587) " x="78.4067275" y="-14.2984126" width="14" height="49" rx="7"></rect>
</g>
<text id="5人大乱斗" font-family="DOUYINSANSBOLD-GB, Douyin Sans" font-size="16" font-weight="bold" fill="#FFFFFF">
<tspan x="18.976" y="32">5人大乱斗</tspan>
</text>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/static/rank/star.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

View File

@@ -14,6 +14,7 @@ function createWebSocket(token, onMessage) {
switch (envVersion) {
case "develop": // 开发版
// url = "ws://localhost:8000/socket";
url = "wss://apitest.shelingxingqiu.com/socket";
break;
case "trial": // 体验版