|
|
@@ -3,7 +3,7 @@
|
|
|
<view class="page-section" v-if="mainGates.length > 0">
|
|
|
<text class="section-title">主线关卡</text>
|
|
|
<view class="gate-list">
|
|
|
- <view class="gate-card" v-for="(g, i) in mainGates" :key="g.id || i"
|
|
|
+ <view class="gate-card" v-for="(g, i) in mainGates" :key="getGateKey(g, i)"
|
|
|
:class="'gate-card--' + (g.status === 'UNLOCKED' ? 'done' : (g.status === 'CURRENT' ? 'current' : 'locked'))">
|
|
|
<view class="gate-status-icon">
|
|
|
<text v-if="g.status === 'UNLOCKED'">✅</text>
|
|
|
@@ -32,7 +32,7 @@
|
|
|
<text class="section-title">推荐挑战</text>
|
|
|
<view class="gate-list">
|
|
|
<view class="gate-card" :class="'gate-card--' + (g.status === 'UNLOCKED' ? 'done' : 'current')"
|
|
|
- v-for="(g, i) in softGates" :key="'soft' + (g.id || i)">
|
|
|
+ v-for="(g, i) in softGates" :key="getGateKey(g, i)">
|
|
|
<view class="gate-status-icon">
|
|
|
<text v-if="g.status === 'UNLOCKED'">✅</text>
|
|
|
<text v-else>🎯</text>
|
|
|
@@ -57,7 +57,7 @@
|
|
|
<view class="page-section" v-if="valueGates.length > 0">
|
|
|
<text class="section-title">增值关卡</text>
|
|
|
<view class="gate-list">
|
|
|
- <view class="gate-card gate-card--value" v-for="(g, i) in valueGates" :key="'val' + (g.id || i)">
|
|
|
+ <view class="gate-card gate-card--value" v-for="(g, i) in valueGates" :key="getGateKey(g, i)">
|
|
|
<view class="gate-status-icon">
|
|
|
<text v-if="g.status === 'UNLOCKED'">✅</text>
|
|
|
<text v-else>💎</text>
|
|
|
@@ -110,6 +110,7 @@ export default {
|
|
|
this.loadData()
|
|
|
},
|
|
|
methods: {
|
|
|
+ getGateKey: function(g, i) { return (g && g.id) ? g.id : i },
|
|
|
loadData: function() {
|
|
|
var self = this
|
|
|
self.loading = true
|