update:优化个人训练

This commit is contained in:
2026-07-27 16:38:53 +08:00
parent c5618fb60b
commit e6f11d3684
6 changed files with 221 additions and 48 deletions
+88
View File
@@ -25,6 +25,10 @@ const props = defineProps({
type: Boolean,
default: true,
},
usePageScroll: {
type: Boolean,
default: false,
},
isHome: {
type: Boolean,
default: false,
@@ -53,6 +57,14 @@ const props = defineProps({
type: Boolean,
default: true,
},
loading: {
type: Boolean,
default: false,
},
loadingText: {
type: String,
default: "",
},
});
const isIOS = uni.getDeviceInfo().osName === "ios";
const showHint = ref(false);
@@ -125,9 +137,22 @@ const goCalibration = async () => {
:onBack="onBack"
:whiteBackArrow="whiteBackArrow"
:titleStyle="titleStyle"
:style="
usePageScroll
? {
position: 'sticky',
top: capsuleHeight + 'px',
zIndex: 10,
}
: undefined
"
/>
<BackToGame v-if="showBackToGame" />
<view v-if="usePageScroll">
<slot></slot>
</view>
<scroll-view
v-else
:scroll-y="scroll"
:enhanced="true"
:bounces="false"
@@ -189,6 +214,18 @@ const goCalibration = async () => {
</view>
</view>
</ScreenHint>
<view v-if="loading" class="audio-progress">
<image
src="https://static.shelingxingqiu.com/attachment/2025-11-26/deihtj15xjwcz3c1tx.png"
mode="widthFix"
/>
<view>
<view :style="{ width: '100%' }"></view>
</view>
<view>
<text>{{ loadingText || "加载中..." }}</text>
</view>
</view>
</view>
</template>
@@ -230,4 +267,55 @@ const goCalibration = async () => {
color: #666;
opacity: 0.6;
}
.audio-progress {
z-index: 999;
width: 100vw;
height: 100vh;
position: fixed;
top: 0;
left: 0;
background: rgb(0 0 0 / 0.8);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.audio-progress > image:nth-child(1) {
width: 140rpx;
height: 150rpx;
margin-bottom: 20rpx;
}
.audio-progress > view:nth-child(2) {
width: 380rpx;
height: 6rpx;
background: #595959;
border-radius: 4rpx;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
}
.audio-progress > view:nth-child(2) > view {
width: 100%;
min-height: 6rpx;
background: #ffe431;
border-radius: 4rpx;
}
.audio-progress > view:nth-child(3) {
display: flex;
align-items: center;
justify-content: center;
}
.audio-progress > view:nth-child(3) > text {
font-size: 22rpx;
color: #a2a2a2;
text-align: center;
line-height: 32rpx;
}
</style>