update:个人训练新版新增靶型标志

This commit is contained in:
2026-07-31 16:07:38 +08:00
parent b386990475
commit 8c834d299b
3 changed files with 26 additions and 0 deletions
+26
View File
@@ -445,6 +445,16 @@ const selectedDifficulty = computed(() => {
);
});
const targetTypeImageMap = {
20: "https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/20cm.png",
40: "https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/40cm.png",
};
// 根据接口返回的 target_type 展示当前难度使用的靶纸类型。
const selectedTargetTypeImage = computed(() => {
return targetTypeImageMap[toNumber(selectedDifficulty.value?.target_type)] || "";
});
// 优先显示配置中的难度进度;没有配置时,再按已解锁等级推导完成态。
const getCompletedDifficultyProgress = (node) => {
const configuredProgress = Number(difficultyProgressMap.value[node?.id]);
@@ -808,6 +818,12 @@ onShow(() => {
:title="selectedDifficulty.title"
:lines="selectedDifficulty.summary"
/>
<image
v-if="selectedTargetTypeImage"
class="difficulty-page__target-type"
:src="selectedTargetTypeImage"
mode="aspectFit"
/>
</view>
<view class="difficulty-page__start">
@@ -866,6 +882,16 @@ onShow(() => {
margin: 0 auto;
}
.difficulty-page__target-type {
position: absolute;
top: 10rpx;
left: 2rpx;
z-index: 2;
width: 100rpx;
height: 74rpx;
pointer-events: none;
}
.difficulty-page__start {
position: relative;
flex: none;
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB