细节完善

This commit is contained in:
kron
2025-07-10 15:34:00 +08:00
parent db419ae003
commit 7972dae398
12 changed files with 144 additions and 112 deletions

View File

@@ -189,9 +189,14 @@ const onClose = () => {
<view style="height: 570px" v-if="step === 1">
<Swiper
:data="[
'https://api.shelingxingqiu.com/attachment/2025-07-01/db0ehhek5yutxsetyi.png',
'https://api.shelingxingqiu.com/attachment/2025-07-01/db0ehhek5yutxsetyi.png',
'https://api.shelingxingqiu.com/attachment/2025-07-01/db0ehhek5yutxsetyi.png',
'https://api.shelingxingqiu.com/attachment/2025-07-09/db77x68bs7z5elwvw7.png',
'https://api.shelingxingqiu.com/attachment/2025-07-09/db77x68qmi7grgreen.png',
'https://api.shelingxingqiu.com/attachment/2025-07-09/db77x68hgrw1ip4wae.png',
'https://api.shelingxingqiu.com/attachment/2025-07-09/db77x684x8zmfrmbla.png',
'https://api.shelingxingqiu.com/attachment/2025-07-09/db77x67sding7fodnk.png',
'https://api.shelingxingqiu.com/attachment/2025-07-09/db77x68mpug7cac4yt.png',
'https://api.shelingxingqiu.com/attachment/2025-07-09/db77x68my783mlmgxv.png',
'https://api.shelingxingqiu.com/attachment/2025-07-09/db77x68p48ylzirtb0.png',
]"
/>
</view>
@@ -249,7 +254,7 @@ const onClose = () => {
}
.try-tip {
width: calc(100% - 20px);
margin: 10px 10px;
margin: 0 10px;
}
.infos {
display: flex;

View File

@@ -36,6 +36,12 @@ const toPage = (path) => {
icon: "none",
});
}
if (!user.value.trio) {
return uni.showToast({
title: "请先完成新手试炼",
icon: "none",
});
}
}
uni.navigateTo({
url: path,
@@ -52,26 +58,23 @@ onMounted(async () => {
try {
const deviceInfo = uni.getDeviceInfo();
isIos.value = deviceInfo.osName === "ios";
const token = uni.getStorageSync("token");
if (token) {
const result = await getHomeData();
console.log("首页数据:", result);
if (result.user) {
updateUser(result.user);
const devices = await getMyDevicesAPI();
if (devices.bindings && devices.bindings.length) {
updateDevice(
devices.bindings[0].deviceId,
devices.bindings[0].deviceName
);
}
}
}
const config = await getAppConfig();
updateConfig(config);
console.log("全局配置:", config);
const rankList = await getRankListAPI();
updateRank(rankList);
const result = await getHomeData();
console.log("首页数据:", result);
if (result.user) {
updateUser(result.user);
const devices = await getMyDevicesAPI();
if (devices.bindings && devices.bindings.length) {
updateDevice(
devices.bindings[0].deviceId,
devices.bindings[0].deviceName
);
}
}
} catch (error) {
console.error("获取配置失败:", error);
}

View File

@@ -97,12 +97,12 @@ const backToHome = () => {
:onClose="() => (showTip = false)"
>
<view class="scan-tips">
<text>不知道如何连接弓箭</text>
<text>1. 确认弓箭是智能弓箭</text>
<text>2.确认开启手机的摄像头权限</text>
<text>3. 开启进入绑定弓箭功能扫弓箭二维码</text>
<text>找不到我的弓箭 </text>
<text>1.确认弓箭是智能弓箭 </text>
<text>2.确认弓箭有电且电源已开启 </text>
<text>3.进入弓箭绑定功能弓箭上的二维码 </text>
<image src="../static/scan-tip.png" mode="widthFix" />
<text>4. 连接成功后</text>
<text>4.连接成功后</text>
<view>联系在线客服</view>
</view>
</ScreenHint>

View File

@@ -11,6 +11,7 @@ const isIos = ref(true);
const selectedIndex = ref(0);
const currentList = ref([]);
const myData = ref(null);
const headerColor = ref("");
onMounted(async () => {
const deviceInfo = uni.getDeviceInfo();
@@ -36,18 +37,28 @@ const handleSelect = (index) => {
);
};
const onScrollView = (e) => {
headerColor.value = e.detail.scrollTop > 100 ? "orange" : "";
console.log(1111, e.detail);
};
const subTitles = ["排位赛积分", "本周MVP次数", "本周十环次数"];
</script>
<template>
<view class="container">
<navigator
open-type="navigateBack"
class="back-btn"
:style="{ top: `${isIos ? 55 : 45}px` }"
<scroll-view class="container" scroll-y @scroll="onScrollView">
<view
class="header"
:style="{
paddingTop: isIos ? '38px' : '25px',
backgroundColor: headerColor,
}"
>
<image src="../static/back.png" mode="widthFix" />
</navigator>
<navigator open-type="navigateBack">
<image src="../static/back.png" mode="widthFix" />
</navigator>
<text :style="{ opacity: headerColor ? 1 : 0 }">本赛季排行榜</text>
</view>
<image src="../static/rankbg.png" mode="widthFix" class="header-bg" />
<view class="rank-tabs">
<view
@@ -144,26 +155,36 @@ const subTitles = ["排位赛积分", "本周MVP次数", "本周十环次数"];
></text
>
</view>
</view>
</scroll-view>
</template>
<style scoped>
.container {
position: relative;
width: 100%;
height: 100vh;
padding-bottom: 100px;
}
.header-bg {
width: 100%;
}
.back-btn {
.header {
width: 100%;
height: 60px;
display: flex;
align-items: center;
position: absolute;
align-items: flex-center;
position: fixed;
top: 0;
transition: all 0.3s ease;
z-index: 10;
}
.back-btn > image {
.header image {
width: 22px;
height: 22px;
margin: 0 10px;
margin: 20px 15px;
}
.header text {
transition: all 0.3s ease;
line-height: 60px;
}
.rank-tabs {
width: calc(100% - 20px);

View File

@@ -90,6 +90,12 @@ const toMeleeMatchPage = async (gameType, teamSize) => {
icon: "none",
});
}
if (!user.value.trio) {
return uni.showToast({
title: "请先完成新手试炼",
icon: "none",
});
}
const isGaming = await isGamingAPI();
if (isGaming) {
uni.$showHint(1);