diff --git a/src/components/Container.vue b/src/components/Container.vue index b5ba3f4..3b6e60f 100644 --- a/src/components/Container.vue +++ b/src/components/Container.vue @@ -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 + " /> + + + { + + + + + + + {{ loadingText || "加载中..." }} + + @@ -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; +} diff --git a/src/pages/training/components/BowData.vue b/src/pages/training/components/BowData.vue index cc5fbf6..fadbaf0 100644 --- a/src/pages/training/components/BowData.vue +++ b/src/pages/training/components/BowData.vue @@ -115,7 +115,7 @@ const props = defineProps({ } .header > view:first-child > view:last-child > text:last-child { font-size: 10px; - /* background-color: #5f51ff; */ + background-color: #5f51ff; padding: 2px 5px; border-radius: 10px; margin-top: 5px; diff --git a/src/pages/training/components/ScoreResult.vue b/src/pages/training/components/ScoreResult.vue index f7dfe4f..135a62f 100644 --- a/src/pages/training/components/ScoreResult.vue +++ b/src/pages/training/components/ScoreResult.vue @@ -35,6 +35,10 @@ const props = defineProps({ type: Number, default: 0, }, + hasNextDifficulty: { + type: Boolean, + default: false, + }, result: { type: Object, default: () => ({}), @@ -297,9 +301,7 @@ const resultRows = computed(() => { }); }); -const advancesDifficulty = computed(() => - ["base", "endurance"].includes(resultTrainingType.value) -); +const advancesDifficulty = computed(() => props.hasNextDifficulty); const primaryText = computed(() => advancesDifficulty.value ? "下一难度" : "再来一次" ); diff --git a/src/pages/training/difficulty.vue b/src/pages/training/difficulty.vue index 2529501..384d20d 100644 --- a/src/pages/training/difficulty.vue +++ b/src/pages/training/difficulty.vue @@ -1,6 +1,6 @@