优化游戏页面进度显示逻辑,新增剩余积分计算和展示格式选择,提升用户体验

This commit is contained in:
yahaozhang
2025-09-15 14:58:46 +08:00
parent e0b644b2d5
commit d32738631a
3 changed files with 27 additions and 1 deletions

View File

@@ -9,7 +9,9 @@
<div class="tab-header">
<div class="tab-item active">{{ regionDesc || (region === 'Q' ? 'QQ区' : region === 'V' ? '微信区' : region) }}</div>
<div class="tab-item status-tab">{{ displayStatus }}</div>
<div class="tab-item target-tab">{{ completedPoints || 0 }}/{{ totalPoints || 0 }}</div>
<div class="tab-item target-tab" v-if="progressDisplayFormat === '1'">{{ completedPoints || 0 }}/{{ totalPoints || 0 }}</div>
<div class="tab-item target-tab" v-else>{{ remainingPoints }}</div>
</div>
@@ -93,6 +95,10 @@ export default {
codeNo: {
type: String,
default: null
},
progressDisplayFormat: {
type: String,
default: '1'
}
},
data() {
@@ -100,6 +106,14 @@ export default {
timestamp: Date.now()
}
},
computed: {
remainingPoints() {
const total = this.totalPoints || 0
const completed = this.completedPoints || 0
const diff = total - completed
return diff > 0 ? diff : 0
}
},
mounted() {
this.setupImageRefresh()
},